JP2007163173A - Apparatus, method, and program for measuring vehicle - Google Patents
Apparatus, method, and program for measuring vehicle Download PDFInfo
- Publication number
- JP2007163173A JP2007163173A JP2005356495A JP2005356495A JP2007163173A JP 2007163173 A JP2007163173 A JP 2007163173A JP 2005356495 A JP2005356495 A JP 2005356495A JP 2005356495 A JP2005356495 A JP 2005356495A JP 2007163173 A JP2007163173 A JP 2007163173A
- Authority
- JP
- Japan
- Prior art keywords
- vehicle
- image
- background
- dimensional image
- color
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、車両の外形寸法を計測する車両計測装置、車両計測方法および車両計測プログラムに関する。 The present invention relates to a vehicle measurement device, a vehicle measurement method, and a vehicle measurement program for measuring an outer dimension of a vehicle.
車両の外形寸法を計測する技術として、車両を撮影し、その画像から車両の外形寸法を計測する車両計測装置が知られている。例えば、特許文献1においては、縞模様の路面上を走行する車両を上から車両を撮影し、この車両の画像において車両と路面との濃度差に基づいて車両のエッジを抽出し、車幅を計測している。
しかしながら、上述した技術においては、外形寸法の計測精度が低かった。すなわち、上述した技術においては、車両と路面との濃度差に基づいて車両のエッジを抽出しているため、路面に影が生じていたり、泥汚れが付着しているなど路面の濃度にとってのノイズが生じていると、濃度差に基づいて車両のエッジを抽出することができない。従って、車幅を誤検出してしまう。
本発明は、このような点に鑑みてなされたものであり、影や泥など路面上のノイズに影響を受けることなく高精度に車両の外形寸法を計測することの可能な技術を提供することを目的とする。
However, in the above-described technique, the measurement accuracy of the outer dimensions is low. In other words, in the above-described technique, the edge of the vehicle is extracted based on the density difference between the vehicle and the road surface, so that noise for the road surface density such as shadows on the road surface or mud dirt is attached. If this occurs, the vehicle edge cannot be extracted based on the density difference. Therefore, the vehicle width is erroneously detected.
The present invention has been made in view of these points, and provides a technique capable of measuring the external dimensions of a vehicle with high accuracy without being affected by noise on the road surface such as shadows and mud. With the goal.
上記目的を達成するため、本発明においては、1次元画像取得手段で背景の前を横切る車両を撮影して背景と車両の画像を含む2次元画像を生成し、車両を含まない画像に基づいて特定した基準画像と他の画像とを比較することによって車両の画像を抽出する。車両の画像が抽出されると、その画像に基づいて車両の外形寸法を計測する。 In order to achieve the above object, in the present invention, a one-dimensional image acquisition unit captures a vehicle crossing the front of the background to generate a two-dimensional image including the background and the vehicle image, and based on the image not including the vehicle. A vehicle image is extracted by comparing the identified reference image with another image. When the image of the vehicle is extracted, the outer dimensions of the vehicle are measured based on the image.
すなわち、1次元画像取得手段においては、固定された所定範囲を撮影範囲とし、所定のサンプリング周期で撮影して2次元画像を生成する。従って、撮影範囲を車両が横切らなければ同じ撮影対象を撮影し続けることになる。このため、車両が通過していない部分の画像は常に同じ撮影対象であり、2次元画像上で常に同じ画像となる。そこで、2次元画像上で車両を含まない部分に基づいて基準画像を特定し、他の画像と比較すれば、比較対象に車両が含まれるときに両者の差分が大きくなり、比較対象に車両が含まれないときに両者の差分がほぼ"0"となる。従って、両者の差分が所定の閾値を超えた場合にその画像を抽出することで、車両の画像を抽出することができる。 That is, in the one-dimensional image acquisition means, a fixed predetermined range is set as a photographing range, and a two-dimensional image is generated by photographing at a predetermined sampling period. Therefore, if the vehicle does not cross the shooting range, the same shooting object is continuously shot. For this reason, the image of the part where the vehicle does not pass is always the same subject of photography, and is always the same image on the two-dimensional image. Therefore, if a reference image is specified based on a part that does not include a vehicle on a two-dimensional image and compared with other images, the difference between the two increases when the vehicle is included in the comparison target. When they are not included, the difference between them is almost “0”. Therefore, when the difference between the two exceeds a predetermined threshold, the image of the vehicle can be extracted by extracting the image.
なお、本発明では、1次元画像取得手段によって1次元の撮影範囲を撮影しているので、仮に背景部の上に影等のノイズが存在していたとしても、これらの影響を全く受けることなく車両の画像を抽出することができる。すなわち、1次元画像取得手段にて車両の撮影を行っている間に影等のノイズが背景部の上に存在したとしても、その撮影結果においては、常に同じノイズが生じている。 In the present invention, since the one-dimensional image capturing range is imaged by the one-dimensional image acquisition means, even if noise such as a shadow is present on the background portion, it is not affected at all by these. An image of the vehicle can be extracted. That is, even if noise such as a shadow is present on the background portion while the vehicle is photographed by the one-dimensional image acquisition means, the same noise is always generated in the photographing result.
従って、このノイズを含めて基準画像を定義したとしても、車両を含まない部分においては常に基準画像と同じ画像であり、他の画像と対比することによって確実に車両とそれ以外の画像(背景あるいはノイズ)とを区別することができる。このため、影等の影響を全く受けることなく車両の画像を抽出することができ、この画像に基づいて正確に車両の外形寸法(車長(車体の進行方向の長さ),車高(路面に対して垂直な方向の車体の長さ),車幅(車体左右方向の長さ))を計測することが可能になる。 Therefore, even if the reference image including the noise is defined, the image is always the same as the reference image in the portion not including the vehicle, and the vehicle and other images (background or Noise). For this reason, it is possible to extract a vehicle image without being affected by shadows at all, and based on this image, the vehicle's external dimensions (vehicle length (length in the traveling direction of the vehicle body), vehicle height (road surface) The vehicle body length in the direction perpendicular to the vehicle body) and the vehicle width (length in the vehicle body left-right direction)) can be measured.
前記1次元画像取得手段は、少なくとも車両の進行方向に対して垂直な方向で所定範囲を撮影することができればよく、例えば、カラーラインセンサカメラ(以下、ラインカメラと呼ぶ)を採用可能である。むろん、2次元センサを利用し、その画像から特定の方向の撮影結果を抽出してもよく、種々の構成を採用可能である。但し、一般に、ラインセンサを利用すれば2次元センサを利用する場合と比較して高速に画像を取得する処理を行うことができ、短いサンプリング周期で画像を取得することができる。 The one-dimensional image acquisition unit only needs to be able to photograph a predetermined range in at least a direction perpendicular to the traveling direction of the vehicle. For example, a color line sensor camera (hereinafter referred to as a line camera) can be employed. Of course, a two-dimensional sensor may be used to extract a photographing result in a specific direction from the image, and various configurations can be employed. However, in general, when a line sensor is used, processing for acquiring an image can be performed at a higher speed than when a two-dimensional sensor is used, and an image can be acquired with a short sampling period.
また、本発明においては基準画像と他の画像との比較を行って車両の画像を抽出するので、両者の差分が現れやすいように画像を取得するのが好ましく、例えば、色情報を取得可能に構成すれば、色の比較(明度、色相、彩度)をすることが可能であり、濃淡のみで比較する場合と比較して高精度の計測が可能である。色情報を取得するセンサとしては、種々のセンサを採用可能であり、RGB(レッド、グリーン、ブルー)やCMY(シアン、マゼンタ、イエロー)等の3色の信号出力を備えた撮像素子等を採用可能である。むろん、色は前記の色に限られず、例えば、CMYの3色に緑色の信号出力を加えて1画素を構成するセンサ等であってもよい。色の情報としては、前記RGB等の情報を比較してもよいし、RGB等の情報から前記明度、色相、彩度を算出し、後述する色差を求めてもよい。あるいは、1画素毎に分光反射率等、各種の光学データを取得して明度、色相、彩度を直接取得するセンサを採用することも可能である。 In the present invention, since the vehicle image is extracted by comparing the reference image with another image, it is preferable to acquire the image so that the difference between the two images easily appears. For example, the color information can be acquired. If configured, it is possible to compare colors (lightness, hue, saturation), and to perform measurement with higher accuracy than in the case of comparison only with shading. Various sensors can be used as sensors for acquiring color information, such as image sensors with three color signal outputs such as RGB (red, green, blue) and CMY (cyan, magenta, yellow). Is possible. Of course, the color is not limited to the above-described color, and for example, a sensor that forms one pixel by adding a green signal output to the three colors of CMY may be used. As the color information, the information such as RGB may be compared, or the lightness, hue, and saturation may be calculated from the information such as RGB to obtain a color difference described later. Alternatively, it is possible to employ a sensor that directly acquires brightness, hue, and saturation by acquiring various optical data such as spectral reflectance for each pixel.
さらに、1次元画像取得手段においては、車両の進行方向に対して垂直な方向の所定範囲を撮影することができればよいので、車両の進行を妨げない位置に撮像素子を配置し、かつその視野に背景を含めるように設置できればよい。従って、路面の脇に設置された柱や路面の脇に設置された柱の上部から路面方向に延びる梁等にセンサを設置する構成等を採用可能である。 Furthermore, in the one-dimensional image acquisition means, it is only necessary to capture a predetermined range in a direction perpendicular to the traveling direction of the vehicle. Therefore, an image sensor is arranged at a position that does not interfere with the traveling of the vehicle, and in its field of view. It only needs to be installed so that the background is included. Therefore, it is possible to adopt a configuration in which sensors are installed on a pillar installed on the side of the road surface or a beam extending in the road surface direction from the top of the column installed on the side of the road surface.
背景部は、1次元画像取得手段の撮影範囲に設置され、車両が路面を走行する際に車両の画像の背景となればよい。従って、路面上に背景を設置してもよいし、路面に対して垂直な方向に延びる柱等に設置してもよく、むろん、双方に設置してもよい。2次元画像生成手段においては、1次元の撮影範囲を横切る車両を撮影して蓄積したデータから2次元画像を形成することができればよく、所定のサンプリング周期で複数回1次元画像を取得し、取得順に1次元画像を並べることによって2次元画像を生成すればよい。 The background portion may be installed in the shooting range of the one-dimensional image acquisition unit and may be the background of the vehicle image when the vehicle travels on the road surface. Therefore, the background may be installed on the road surface, may be installed on a pillar extending in a direction perpendicular to the road surface, or may be installed on both sides. The two-dimensional image generation means only needs to be able to form a two-dimensional image from data accumulated by photographing a vehicle crossing a one-dimensional photographing range, and obtain and obtain a one-dimensional image a plurality of times at a predetermined sampling period. A two-dimensional image may be generated by arranging the one-dimensional images in order.
画像抽出手段においては、基準画像と他の画像とを比較することによって車両の画像を抽出することができればよい。基準画像は、車両の画像を含まない部分に基づいて特定することができればよく、背景やその上の影等のいずれであってもよいし、双方であってもよい。上述のように、撮影範囲に含まれる影等のノイズは、撮影を行っている間、同じ位置にとどまるので、2次元画像上で横方向に同じ画像が連続することになる。従って、基準画像は1次元の撮影範囲の全域と同じ広さで定義するのが好ましい。例えば、車両の画像を含まない特定の1ラインを基準画像としてもよいし、車両の画像を含まない複数のラインの平均を基準画像としてもよく、種々の構成を採用可能である。 The image extracting means only needs to be able to extract the vehicle image by comparing the reference image with another image. The reference image only needs to be specified based on a portion that does not include the vehicle image, and may be either the background or a shadow on the background, or both. As described above, noises such as shadows included in the shooting range remain at the same position during shooting, and thus the same image continues in the horizontal direction on the two-dimensional image. Therefore, the reference image is preferably defined with the same width as the entire one-dimensional imaging range. For example, a specific line that does not include the vehicle image may be used as the reference image, or an average of a plurality of lines that do not include the vehicle image may be used as the reference image, and various configurations may be employed.
車両の画像を抽出する際の閾値は、車両と他の背景(ノイズを含む)とを区別するための差分を示していればよく、例えば、1次元画像取得手段において同じ対象物の画像を撮影したときに生じる撮影誤差の大きさの絶対値Tを閾値とし、差分の絶対値がTを超えるときに比較対象が車両であるとする構成等を採用可能である。 The threshold for extracting the vehicle image only needs to indicate a difference for distinguishing the vehicle from other backgrounds (including noise). For example, a one-dimensional image acquisition unit captures an image of the same object. It is possible to adopt a configuration in which the absolute value T of the magnitude of the shooting error that occurs when the threshold value is used as a threshold and the comparison target is a vehicle when the absolute value of the difference exceeds T.
また、計測手段においては、車両の画像から車長、車高、車幅のいずれかまたは組み合わせを算出することができればよい。すなわち、車両の画像においてその進行方向の画素数はその車両の長さに対応しているので、当該進行方向の画素数から車長を算出すればよい。また、車両の進行方向に対して垂直な方向の画素数から車高を算出すればよく、車両の左右方向の画素数から車幅を算出すればよい。 Further, the measuring means only needs to be able to calculate any one or a combination of the vehicle length, the vehicle height, and the vehicle width from the image of the vehicle. That is, since the number of pixels in the traveling direction corresponds to the length of the vehicle in the vehicle image, the vehicle length may be calculated from the number of pixels in the traveling direction. Further, the vehicle height may be calculated from the number of pixels in the direction perpendicular to the traveling direction of the vehicle, and the vehicle width may be calculated from the number of pixels in the left-right direction of the vehicle.
さらに、基準画像と他の画像との比較に際して好ましい構成として、基準画像を車両の前後で定義し、2次元画像において車両の前側から後側に向けたスキャンと後側から前側に向けたスキャンとを行う構成を採用可能である。すなわち、前記1次元画像取得手段によって車両が撮影範囲を通過する以前から撮影を開始すれば、2次元画像において車両の前方に車両を含まない部分が存在するので、この部分の画像に基づいて第1の基準画像を設定する。当該第1の基準画像と他の画像とを比較する際に、2次元画像において車両の前側から後側に向けて逐次比較対象のラインを変更するようにスキャンすれば、車両の画像を抽出することができる。 Further, as a preferable configuration when comparing the reference image with another image, the reference image is defined in front and rear of the vehicle, and in the two-dimensional image, scanning from the front side to the rear side of the vehicle and scanning from the rear side to the front side are performed. It is possible to adopt a configuration for performing the above. That is, if shooting is started before the vehicle passes through the shooting range by the one-dimensional image acquisition means, there is a portion that does not include the vehicle in front of the vehicle in the two-dimensional image. 1 reference image is set. When comparing the first reference image with another image, a vehicle image is extracted by scanning the two-dimensional image so as to change the line to be sequentially compared from the front side to the rear side of the vehicle. be able to.
また、前記1次元画像取得手段によって車両が撮影範囲を通過した後、所定時間経過してから撮影を終了すれば、2次元画像において車両の後方に車両を含まない部分が存在するので、この部分の画像に基づいて第2の基準画像を設定する。当該第2の基準画像と他の画像とを比較する際に、2次元画像において車両の後側から前側に向けて逐次比較対象のラインを変更するようにスキャンすれば、車両の画像を抽出することができる。 In addition, if the photographing is finished after a predetermined time has elapsed after the vehicle has passed through the photographing range by the one-dimensional image acquisition means, there is a portion that does not include the vehicle behind the vehicle in the two-dimensional image. A second reference image is set based on the image. When comparing the second reference image with another image, a vehicle image is extracted by scanning the two-dimensional image so as to change the line to be sequentially compared from the rear side to the front side of the vehicle. be able to.
以上の構成によれば、車両の通過に起因して撮影範囲におけるノイズの様子が変動した場合であっても正確に車両の画像を抽出することが可能である。例えば、後輪に泥が付着している車両が撮影範囲を通過することにより、後輪の通過後に撮影範囲の背景を構成する路面に泥が残った場合、2次元画像においては後輪の後側に泥の画像が含まれることになる。しかし、上述の第2の基準画像は車両の後側における画像に基づいて定義されるので、当該第2の基準画像にはこの泥の画像が含まれ、車両の後側から前側に向けてスキャンすれば、画像において泥との差分が生じている車両を抽出することができる。 According to the above configuration, it is possible to accurately extract an image of the vehicle even when the state of noise in the imaging range varies due to the passage of the vehicle. For example, if a vehicle with mud on the rear wheel passes through the shooting range, and mud remains on the road surface constituting the background of the shooting range after passing the rear wheel, the rear wheel is A mud image will be included on the side. However, since the second reference image is defined based on the image on the rear side of the vehicle, the second reference image includes this mud image and is scanned from the rear side to the front side of the vehicle. Then, it is possible to extract a vehicle in which a difference from mud is generated in the image.
また、車両の通過前に泥が付着している路面を車両が通過したことによって泥の様子が変動した場合、2次元画像においては、車両の通過前後で路面の画像の様子が変動する。しかし、上述の第1の基準画像によって車両の前側から後側に向けてスキャンし、第2の基準画像によって車両の後側から前側に向けてスキャンすることで、路面上の泥等による影響を受けることなく正確に車両の画像を抽出することが可能である。 Further, when the state of the mud changes due to the vehicle passing through the road surface on which mud adheres before the vehicle passes, in the two-dimensional image, the state of the road surface image changes before and after the vehicle passes. However, scanning from the front side to the rear side of the vehicle with the first reference image described above, and scanning from the rear side to the front side of the vehicle with the second reference image makes it possible to influence the mud on the road surface. It is possible to accurately extract an image of the vehicle without receiving it.
なお、上述の背景は特定の有彩色であることが好ましく、画像抽出手段によって差分を評価する際には色差を含めて基準画像と他の画像との差分を評価することが好ましい。すなわち、背景が特定の有彩色のみで構成されていれば、基準画像と車両との差分が明確になり、容易に車両の画像を抽出することができる。有彩色は限定されないが、任意の色から選択可能であることから、車両の色として使用される頻度が少ない有彩色を背景として採用すれば極めて誤認識の少ない画像処理を実施することが可能になる。 The background described above is preferably a specific chromatic color, and when the difference is evaluated by the image extracting means, it is preferable to evaluate the difference between the reference image and other images including the color difference. That is, if the background is composed only of a specific chromatic color, the difference between the reference image and the vehicle becomes clear, and the vehicle image can be easily extracted. Chromatic colors are not limited, but can be selected from any color, so if you use a chromatic color that is less frequently used as a vehicle color as a background, you can perform image processing with very little misrecognition. Become.
ここで、前記有彩色としては、車両の色として使用されている頻度が他の色と比較して相対的に小さい有彩色を採用するのが好ましい。すなわち、車両の色と背景の色とが近い場合には、その差分によって背景の画像と車両の画像とを区別することは困難である。しかし、車両の色として使用されている頻度が他の色と比較して相対的に小さい有彩色で背景を構成すれば、背景の画像と車両の画像とを区別できなくなる状況の発生頻度が極めて小さくなり、エラーの発生頻度の極めて少ない車両計測装置を実現することができる。 Here, as the chromatic color, it is preferable to adopt a chromatic color that is used as a vehicle color and is relatively small in comparison with other colors. That is, when the vehicle color and the background color are close, it is difficult to distinguish the background image from the vehicle image based on the difference. However, if the background is configured with a chromatic color that is relatively low in frequency compared to other colors, the frequency of occurrence of a situation in which the background image and the vehicle image cannot be distinguished is extremely high. It is possible to realize a vehicle measurement device that is reduced in size and extremely low in error occurrence frequency.
なお、車両の色として使用されている頻度が他の色と比較して相対的に小さい有彩色としては、例えば、車両計測装置を運用する国で走行している車両の色について統計を取り、使用されている頻度が"0"あるいは使用されている頻度が他の色と比較して小さい色を採用すればよい。使用されている頻度が"0"の色であれば、エラーの発生頻度を実質的に"0"にすることができる。なお、色の区別としては、予め決められた色差を超える色同士を異なる色と定義すればよい。 In addition, as a chromatic color whose frequency used as the color of the vehicle is relatively small compared to other colors, for example, take statistics on the color of the vehicle running in the country where the vehicle measurement device is operated, A color having a frequency of “0” or a frequency of being used may be smaller than that of other colors. If the frequency used is “0”, the error frequency can be substantially set to “0”. In order to distinguish colors, colors that exceed a predetermined color difference may be defined as different colors.
ここで、基準画像と他の画像との差分を評価する際には、明度と色相と彩度との全てを含めた色差を評価してもよいし、明度と色相と彩度とのいずれかまたは任意の2つの組み合わせで評価してもよいが、色相を含む差分を評価することが好ましい。すなわち、背景の色や車両の色において、色相は天候や周りの明るさによって変動しづらいし、車両の色として使用される頻度を評価する際には、色相に基づく色の差異を評価すると色の差異がより明確になる。従って、色の成分のうち色相を含めて差分を評価することで、正確に背景と車両とを区別することが可能になる。 Here, when evaluating the difference between the reference image and another image, the color difference including all of the brightness, hue, and saturation may be evaluated, or any one of the brightness, hue, and saturation may be evaluated. Alternatively, evaluation may be performed using any two combinations, but it is preferable to evaluate a difference including a hue. That is, in the background color and the vehicle color, the hue is difficult to change depending on the weather and surrounding brightness, and when evaluating the frequency of use as the color of the vehicle, the color difference based on the hue is evaluated. The difference becomes clearer. Therefore, the background and the vehicle can be accurately distinguished by evaluating the difference including the hue among the color components.
なお、背景部を形成する有彩色は、少なくとも1次元画像取得手段の撮影範囲においてその色であればよく、部材に対して塗料を塗布してもよいし、この有彩色の表面を有するシート等を柱等に貼り付けてもよいし、発光素子によってこの有彩色を表示してもよく、種々の構成を採用可能である。 Note that the chromatic color forming the background portion may be at least that color in the photographing range of the one-dimensional image acquisition means, and a paint may be applied to the member, a sheet having a surface of this chromatic color, etc. May be affixed to a pillar or the like, or this chromatic color may be displayed by a light emitting element, and various configurations can be employed.
また、屋外において車両計測装置を運用することを想定すると、1次元画像取得手段と背景部との間を横切る車両の画像を1次元画像取得手段によって取得し、2次元画像を生成後に背景を除去する際に、背景の色を抽出して背景を除去したり基準画像と他の画像との差分に基づいて背景を除去する構成を採用した場合、車両自体の影を含めて車両の画像としてしまうことがあり得る。 Assuming that the vehicle measurement device is operated outdoors, the vehicle image crossing between the one-dimensional image acquisition unit and the background is acquired by the one-dimensional image acquisition unit, and the background is removed after the two-dimensional image is generated. When a configuration is adopted in which the background color is extracted and the background is removed or the background is removed based on the difference between the reference image and another image, the vehicle image including the shadow of the vehicle itself is used. It can happen.
そこで、背景を除去した画像において、車両の影から、少なくとも車両の画像の端部より外側に存在する影を除去することで、車両の外形寸法を正確に計測することが可能になる。すなわち、車両の画像からその外形寸法を算出する際には、車両の画像において車両の進行方向の先端と終端とから車長、車両の高さ方向の先端と終端とから車高、車両の左右方向の端部から車幅を算出する。 Therefore, in the image from which the background is removed, it is possible to accurately measure the outer dimensions of the vehicle by removing the shadow existing at least outside the end of the vehicle image from the shadow of the vehicle. That is, when calculating the external dimensions from the vehicle image, the vehicle length is determined from the front end and the end in the vehicle traveling direction, the vehicle height is determined from the front end and the end in the vehicle height direction, and the vehicle left and right are calculated. The vehicle width is calculated from the end of the direction.
従って、車両の画像においてその外側(車両の前後方向、高さ方向、左右方向の端部より外側)に影の像が存在すると、影の影響を受けて先端や終端、端部の位置を誤認識する可能性がある。しかし、少なくとも車両の端部より外側に存在する影を除去すれば、この誤認識が生じる可能性がなくなり、正確に車両の外形寸法を計測することが可能になる。 Therefore, if there is a shadow image outside the vehicle image (outside the vehicle front-rear direction, height direction, and left-right end), the position of the tip, end, or end is erroneously affected by the shadow. There is a possibility of recognition. However, if at least the shadow that exists outside the end of the vehicle is removed, there is no possibility that this erroneous recognition will occur, and the external dimensions of the vehicle can be accurately measured.
以上のようにして影を除去する際の好適な構成例としては、背景部の色より低明度または低彩度あるいはその双方の色であって、さらにタイヤの色より高明度または高彩度あるいはその双方の色である影を除去する構成を採用可能である。すなわち、車両の影は背景上に形成されるので、背景より濃い色(背景より低明度または背景より低彩度あるいは背景より低明度かつ低彩度)となっている。 As a preferable configuration example when removing the shadow as described above, the lightness is lower than the background color and / or the lower saturation color, and further, the lightness is higher than the tire color or the higher saturation or both. It is possible to adopt a configuration that removes the shadow that is the color of the. That is, since the shadow of the vehicle is formed on the background, it has a darker color than the background (lower brightness than the background, lower saturation than the background, or lower brightness and lower saturation than the background).
一方、車両におけるタイヤは通常黒であり、僅かであるが背景上の影の周縁部より低明度または低彩度あるいは低明度かつ低彩度である。従って、タイヤの色(例えば黒)より高明度または高彩度あるいはその双方の色を影と想定すればタイヤを除去することなく影を除去することが可能になる。なお、影を除去する際には、少なくとも車両の画像の端部より外側に存在する影を除去することができればよいので、影の周縁部のみを除去すれば充分である。 On the other hand, the tire in a vehicle is usually black, and although it is a little, it is low brightness or low saturation or low brightness and low saturation from the peripheral part of the shadow on a background. Therefore, if it is assumed that the color of the lightness and / or saturation is higher than the color of the tire (for example, black), the shadow can be removed without removing the tire. It should be noted that when removing the shadow, it is sufficient to remove at least the shadow existing outside the edge of the vehicle image, so it is sufficient to remove only the peripheral edge of the shadow.
当該影の周縁部において、その色は比較的背景部の色と近く、影の中央部においては比較的背景部の色から遠く、黒に近い。従って、上述のように、背景部の色より低明度または低彩度あるいはその双方の色かつタイヤの色より高明度または高彩度あるいはその双方の色を除去する構成とすることで、影の周縁部は確実に除去することができ、車両の外形寸法を計測する際に誤認識が生じることを防止することができる。 At the periphery of the shadow, the color is relatively close to the color of the background, and at the center of the shadow is relatively far from the color of the background and close to black. Therefore, as described above, the peripheral portion of the shadow is formed by removing the lightness and / or low saturation or both of the colors of the background portion and the lightness and / or high saturation or both of the colors of the tire. Can be reliably removed, and erroneous recognition can be prevented when measuring the outer dimensions of the vehicle.
さらに、以上のように背景上に形成されている影の色に基づいて背景を抽出する構成においては、天候や時刻による影響をできるだけ排除して色の評価を行うことが好ましい。そこで、背景部の一部を既知の色からなる基準色部として構成し、上述のようにして取得した2次元画像においてこの基準色部の像が当該既知の色になるように画像全体の色を補正してもよい。この補正によれば、基準色部が既知の色に近づくことにより、色かぶり(夕日の色によって赤みがかったり、遅い時刻に明度が低下するなど)を排除し、常に背景部の画像における色を一定の色に近づけることができる。 Furthermore, in the configuration in which the background is extracted based on the color of the shadow formed on the background as described above, it is preferable to evaluate the color while eliminating the influence of weather and time as much as possible. Therefore, a part of the background portion is configured as a reference color portion made of a known color, and the color of the entire image is set so that the image of the reference color portion becomes the known color in the two-dimensional image acquired as described above. May be corrected. This correction eliminates color casts (such as redness due to the color of the sunset or a decrease in brightness at a later time) as the reference color part approaches a known color, and the color in the background image is always constant. Can be close to the color.
この結果、極めて容易に背景を除去したり、影を除去することが可能になる。特に、背景より濃い色であることに基づいて車両の影を除去する際に、閾値に基づいて車両の影を除去する場合には、上述の補正を行うことにより、影の周縁部を適切に除去することが可能になる。 As a result, it is possible to remove the background and shadows very easily. In particular, when removing the vehicle shadow based on the threshold when removing the vehicle shadow based on the color darker than the background, the above-mentioned correction is performed to appropriately remove the shadow edge. It becomes possible to remove.
さらに、計測手段においては、車両の画像に基づいて車両の外形寸法を計測すればよい。また、車長を算出する際には車両の速度に基づいて車長を計測することが可能である。この場合、車両の速度を計測する速度計測部によって車両の速度を取得し、1次元画像取得手段のサンプリング周期と前記車両の速度とから1ラインにおける車両進行方向の長さを算出する。なお、車速計測部においては車両の速度を取得することができればよく、種々のセンサを採用可能である。 Furthermore, the measuring means may measure the outer dimensions of the vehicle based on the vehicle image. Further, when calculating the vehicle length, it is possible to measure the vehicle length based on the speed of the vehicle. In this case, the speed of the vehicle is acquired by a speed measuring unit that measures the speed of the vehicle, and the length in the vehicle traveling direction in one line is calculated from the sampling period of the one-dimensional image acquisition means and the speed of the vehicle. The vehicle speed measuring unit only needs to be able to acquire the vehicle speed, and various sensors can be employed.
なお、上述した車両計測装置は、本願特有の手順で処理を進めていくことから、その手順を特徴とした方法の発明としても実現可能である。また、その手順をコンピュータに実現させるためのプログラムの発明としても実現可能である。むろん、車両計測装置、方法、プログラムは他の装置、方法、プログラムの一部として実現されていてもよいし、複数の装置、方法、プログラムの一部を組み合わせることによって実現されていてもよく、種々の態様を採用可能である。むろん、前記プログラムを記録した記録媒体として本発明を実現することも可能である。 In addition, since the vehicle measurement apparatus mentioned above advances a process in the procedure peculiar to this application, it is realizable also as invention of the method characterized by the procedure. Moreover, it is realizable also as invention of the program for making a computer implement | achieve the procedure. Of course, the vehicle measurement device, method, and program may be realized as a part of another device, method, and program, or may be realized by combining a plurality of devices, methods, and programs, Various modes can be adopted. Of course, the present invention can be realized as a recording medium on which the program is recorded.
以下、下記の順序に従って本発明の実施の形態について説明する。
(1)車両計測装置の構成:
(2)車両計測処理:
(2−1)車両画像の抽出処理:
(3)他の実施形態:
Hereinafter, embodiments of the present invention will be described in the following order.
(1) Configuration of the vehicle measurement device:
(2) Vehicle measurement processing:
(2-1) Vehicle image extraction processing:
(3) Other embodiments:
(1)車両計測装置の構成:
図1は、本発明の一実施形態に係る車両計測装置10を示す斜視図である。車両計測装置10は、路面の脇に設置された柱に取り付けられたセンサとセンサの背景となる背景部とデータ処理を行うコンピュータとを備えている。すなわち、計測対象の車両が走行可能な路面11の両脇には、複数の柱20a〜20eが設置されており、これらの柱20a〜20eにはセンサが取り付けられている。また、柱20cには梁20fが取り付けられており、この梁20fにもセンサが取り付けられている。さらに、路面11を挟んで柱20cの反対側には柱21が立てられており、柱21における路面側の一面と柱21,20cの間における路面11は有彩色(例えば緑色)に着色されており背景部21a,21bを形成している。
(1) Configuration of the vehicle measurement device:
FIG. 1 is a perspective view showing a
柱20a,20bのそれぞれには一対のセンサからなる進入センサ30a,30bが取り付けられている。進入センサ30bは進入センサ30aに向けて電磁波(可視光や赤外線等)を出力しており、進入センサ30aはこの電磁波を検出している。従って、車両12が路面11を走行し、進入センサ30bからの電磁波を遮ると進入センサ30aにおいて電磁波が検出されなくなり、車両12が車両計測装置10の計測系に進入したことを検出することができる。
なお、進入センサ30aの路面11からの高さhaと進入センサ30bの路面11からの高さhbとは異なっている。従って、進入センサ30bからの電磁波は上方から下方に向けて進行しながら路面11上を横切ることになる。この結果、どのような高さの車両12であっても路面11を走行する際に進入センサ30bからの電磁波を遮ることになり、同じ高さに配置された進入センサを利用する場合と比較して広い範囲の高さの車両12について進入検知が可能である。
The height ha of the
柱20d,20eのそれぞれには一対のセンサからなる退出センサ30c,30dが取り付けられている。これらの退出センサ30c,30dは、前記進入センサ30a,30bと同様の構成であり、退出センサ30dは退出センサ30cに向けて電磁波を出力し、退出センサ30cはこの電磁波を検出している。従って、車両12が路面11を走行し、一旦遮られた退出センサ30dからの電磁波が再び退出センサ30cに到達すると、車両12が車両計測装置10の計測系を通過したことを検出することができ、車両計測装置10からの退出を検出することができる。
退出センサ30c,30dにおいても、退出センサ30cの路面11からの高さhcと退出センサ30dの路面11からの高さhdとは異なっている。従って、同じ高さに配置された退出センサを利用する場合と比較して広い範囲の高さの車両12について退出検知が可能である。また、進入センサ30a,30bと退出センサ30c,30dとは車両12の速度を検出するためにも利用されており、センサ30a,30cの距離Dが既知であるとともに進入センサ30aの高さhaと退出センサ30cの高さhcが同じ高さ、かつ、進入センサ30bの高さhbと退出センサ30dの高さhdが同じ高さとなるように設置されている。
Also in the
柱20cは路面11に対して垂直に延びており、その上端には路面に平行かつ路面側に延びる梁20fが取り付けられている。これらの柱20c,梁20fには、車両12を撮影するためのラインセンサ31a〜31dが取り付けられている。すなわち、柱20cに2つのラインセンサ31a,31bが取り付けられ、梁20fに2つのラインセンサ31c,31dが取り付けられており、これらのラインセンサ31a〜31dによって路面11を走行する車両を撮影する。
The
本実施形態におけるラインセンサ31a〜31dは、1方向に長い視野を備えたセンサであり、1方向に並べられた複数の画素毎に3色の色成分値(本実施形態では、RGBの階調値)を取得する。本実施形態においては、所定の時間間隔(サンプリング周期)毎に1ラインのデータを取得するようになっている。また、柱20cに取り付けられたラインセンサ31a,31bにおける視野は共通の直線上に存在し、この直線は背景部21aの中央の直線21a1および背景部21bの中央の直線21b1に一致している。従って、ラインセンサ31a,31bは、直線21a1,21b1を含む平面上の所定範囲を視野にしてその画像を撮影することができる。
The
梁20fに取り付けられたラインセンサ31c,31dにおける視野も共通の直線上に存在し、この直線は背景部21bの中央の直線21b1および背景部21aの中央の直線21a1に一致している。従って、ラインセンサ31c,31dは、直線21a1,21b1を含む平面上の所定範囲を視野にしてその画像を撮影することができる。
The field of view of the
また、この直線21a1,21b1を含む平面は、車両12の進行方向Gに対して垂直であり、ラインセンサ31a,31bは柱21に向けられているので、当該ラインセンサ31a,31bは路面11を通過する車両12の側面を撮影する。ラインセンサ31c,31dは路面11に向けられているので、当該ラインセンサ31c,31dは路面11を通過する車両12の上面を撮影する。
In addition, the plane including the straight lines 21a1 and 21b1 is perpendicular to the traveling direction G of the
さらに、ラインセンサ31a,31bは双方とも車両の側面を撮影しており、同じ対象を撮影しているので、各ラインセンサ31a,31bの撮影画像はレンズの収差を補正して結合される。ラインセンサ31c,31dにおいても同様に、双方とも車両の上面を撮影しているので、各ラインセンサ31c,31dの撮影画像はレンズの収差を補正して結合される。
Furthermore, since both
なお、ラインセンサ31aの視野の略中央は車両12の下端、ラインセンサ31bの視野の略中央は車両12の上端にほぼ一致するように構成することが好ましく、ラインセンサ31cの視野の略中央は車両12の左端、ラインセンサ31dの視野の略中央は車両12の右端にほぼ一致するように構成することが好ましい。この構成であれば、車両12における上下左右の端部においてレンズの収差による誤差が小さくなるように構成することができる。
It is preferable that the approximate center of the visual field of the
本実施形態において、車両計測装置10はコンピュータ40を備えており、当該コンピュータ40は、ケーブルを介して前記ラインセンサ31a〜31dと進入センサ30a,30bと退出センサ30c,30dとに接続されている。従って、コンピュータ40においては、これらのセンサの出力信号を取得し、その出力信号に基づく解析を行うことができる。
In this embodiment, the
図2は、コンピュータ40の構成を示すブロック図である。同図2に示すように、コンピュータ40は、CPU41,ROM42,RAM43,HDD44,I/F45a〜45cを備えている。I/F45aは前記ラインセンサ31a〜31dと進入センサ30a,30bと退出センサ30c,30dとのインタフェースであり、CPU41は当該I/F45aを介して各センサを制御し、その出力信号を取得する。
FIG. 2 is a block diagram illustrating a configuration of the
I/F45bはディスプレイ40aとの接続インタフェースであり、CPU41は当該I/F45bを介して各種の表示を行わせるためのデータをディスプレイ40aに対して出力する。ディスプレイ40aはこのデータを取得して各種の表示を行う。I/F45cは入力機器とのインタフェースであり、CPU41はキーボード40bおよびマウス40cからの信号を取得して当該キーボード40bおよびマウス40cにおける操作内容を把握する。
The I /
CPU41は、RAM43をワークエリアとしてROM42,HDD44に記録されたプログラムを実行可能である。本実施形態においては、このプログラムの一つとして車両計測プログラムを実行可能であり、当該車両計測プログラムは、センサ制御部41a,画像抽出部41b,車両計測部41cの各モジュールを備えている。この車両計測プログラムは、HDD44に予め記録された各種データに基づいて車両12の車長,車高,車幅を計測するためのプログラムであり、その実行過程で画像データを生成し、その解析を行う。
The
すなわち、HDD44には、予めセンサ間距離データ44eとサンプリング周期データ44fと高さライン長データ44gと幅ライン長データ44hが記録されている。また、HDD44には車両計測プログラムの実行過程で生成されたデータも記録され、本実施形態では、1次元画像データ44aと2次元画像データ44bと基準画像データ44cと車両画像データ44dとが当該実行過程で生成され、記録される。
That is, the
センサ間距離データ44eは、前記センサ30a,30cの距離Dを示すデータである。サンプリング周期データ44fは、前記ラインセンサ31a〜31dのサンプリング周期を示すデータである。高さライン長データ44gは、ラインセンサ31a,31bによって撮影された1次元の画像において、その高さ方向の一画素に相当する長さを示すデータであり、既知の長さの基準サンプルを撮影することによって予め取得されている。幅ライン長データ44hは、ラインセンサ31c,31dによって撮影された1次元の画像において、その幅方向(車体の左右方向)の一画素に相当する長さを示すデータであり、既知の長さの基準サンプルを撮影することによって予め取得されている。
The
前記センサ制御部41aは、前記ラインセンサ31a〜31dと進入センサ30a,30bと退出センサ30c,30dとを制御するモジュールであり、各センサからの信号に基づく判断と、ラインセンサ31a〜31dによる撮影画像の取得を行う。画像抽出部41bは、基準画像設定部41b1と色差判別部41b2とを備えており、撮影画像に基づく2次元画像の生成および当該2次元画像から車両画像を抽出する処理を行う。車両計測部41cは、車長算出部41c1と車高算出部41c2と車幅算出部41c3とを備えており、車長算出部41c1にて車両12の車長、車高算出部41c2にて車両12の車高、車幅算出部41c3にて車両12の車幅を算出し、ディスプレイ40aに表示する処理を行う。
The sensor control unit 41a is a module that controls the
(2)車両計測処理:
次に、上述の構成において車両計測プログラムの各部が行う処理を詳細に説明する。図3は、当該車両計測プログラムの処理を示すフローチャートである。同図に示すように車両計測プログラムが実行されると、センサ制御部41aが進入センサ30aからの信号に基づいて進入センサ30aがオンとなっているか否かを判別する(ステップS100)。ここでは、車両12が進入センサ30bからの電磁波を遮って進入センサ30aに電磁波が到達しなくなっている状態を進入センサ30aがオンであると呼ぶ。
(2) Vehicle measurement processing:
Next, processing performed by each unit of the vehicle measurement program in the above configuration will be described in detail. FIG. 3 is a flowchart showing the processing of the vehicle measurement program. As shown in the figure, when the vehicle measurement program is executed, the sensor control unit 41a determines whether or not the
センサ制御部41aは、ステップS100において進入センサ30aがオンになったと判別されるまで進入センサ30aからの信号検出を続けており、進入センサ30aがオンになったと判別されたときにラインセンサ31a〜31dによる撮影を行う(ステップS105)。ここでは、センサ制御部41aが、所定のサンプリング周期の間に各ラインセンサ31a〜31dで撮影した1次元画像のデータを取得し、1次元画像データ44aとしてHDD44に記録する。
The sensor control unit 41a continues to detect signals from the
次に、センサ制御部41aは、退出センサ30cからの信号に基づいて退出センサ30cがオンとなっているか否かを判別する(ステップS110)。ここでも、車両12が退出センサ30dからの電磁波を遮って退出センサ30cに電磁波が到達しなくなっている状態を退出センサ30cがオンであると呼ぶ。
Next, the sensor control unit 41a determines whether or not the
ステップS110にて退出センサ30cがオンであると判別されたときには、車両12が退出センサ30c,30dの間に到達しているので、センサ制御部41aは、進入センサ30aがステップS100にてオンとなったときから退出センサ30cがオンとなったときまでの時間Tを取得する(ステップS115)。すなわち、進入センサ30aと退出センサ30cとの距離Dは既知であるため、距離Dに基づいて車両12の速度を算出するために時間Tを取得しておく。なお、この処理は車両1台に付き一度実行すればよいため、各車両について時間Tを取得済であれば、ステップS115をスキップする。また、車両12の退出を判定するためのカウンタC(デフォルト値は0)を1に設定しておく(ステップS117)。
When it is determined in step S110 that the
ステップS110にて退出センサ30cがオンであると判別されないとき、および、ステップS117を実行した後、センサ制御部41aは退出センサ30cがオフかつカウンタCが1であるか否かを判別する(ステップS120)。ここでは、車両12が退出センサ30c,30dの間を通過し終えて、車両12によって遮られていた退出センサ30dからの電磁波が再び退出センサ30cに到達した状態を退出センサ30cがオフであると呼ぶ。すなわち、車両12が退出センサ30cに達したときカウンタCが1になっているので、カウンタCが1でありかつ退出センサ30cがオフであることを判別することによって車両12の通過完了を判定している。
When it is not determined in step S110 that the
ステップS120において、退出センサ30cがオフかつカウンタCが1になったと判別されないときには、ステップS105に戻り、ラインセンサ31a〜31dによる1次元画像データ44aの取得を続ける。従って、以上の処理により、センサ制御部41aは、車両12が進入センサ30a,30bの間に進入してから退出センサ30c,30dの間を通過し終えるまで1次元画像データ44aを撮影および蓄積し、同時に前記時間Tを取得する処理を行うことになる。
If it is not determined in step S120 that the
ステップS120において退出センサ30cがオフになったと判別されると、画像抽出部41bが1次元画像データ44aから2次元画像データ44bを生成する(ステップS125)。すなわち、1次元画像データ44aは、各ラインセンサ31a〜31dによって撮影された1次元画像であるため、まず、同じサンプリングタイミングで撮影された各1次元画像を合成する。すなわち、ラインセンサ31a,31bによる撮影画像は車両12の側面の画像であるため、双方にて共通する部位の画素同士が重なるように1次元画像を結合する。同様に、ラインセンサ31c,31dによる撮影画像は車両12の上面の画像であるため、双方にて共通する部位の画素同士が重なるように1次元画像を結合する。この結合に際しては種々の公知技術を採用可能である。
If it is determined in step S120 that the
以上のようにして、車両12における側面の1次元画像と上面の1次元画像が生成されると、さらに、画像抽出部41bがこれらの1次元画像を結合して2次元画像を生成する。すなわち、前記結合を行った後には、サンプリングタイミングが異なる車両側面の1次元画像と車両上面の1次元画像とが得られているので、これらをサンプリングの順に並べる。この結果、車両12における側面の2次元画像と上面の2次元画像が生成されることになる。
When the one-dimensional image of the side surface and the one-dimensional image of the upper surface of the
図4(a)は、ステップS125にて生成される車両12の側面の2次元画像を示す図である。本実施形態におけるラインセンサ31a,31bは背景部21a,21bを撮影し続けるので、車両が通過していないときにはラインセンサ31a,31bで取得する画像は背景部21a,21bの直線21a1,21b1である。一方、車両12が通過しているときには、ラインセンサ31a,31bによって背景部21a,21bの直線21a1,21b1を背景とした車両12の画像が取得される。
FIG. 4A is a diagram showing a two-dimensional image of the side surface of the
しかし、背景に影が生じているとき、例えば、背景部21aの一部に影が生じている場合、車両12がラインセンサ31a,31bの撮影範囲を通過する短い時間においてはその影が動かないので、2次元画像内で同じ高さの部分に影の画像21a2が形成される。この場合、2次元画像から背景と同じ色の部分を除去するのみでは、車両12の画像とともに影の画像21a2が残ってしまうおそれがある。そこで、本実施形態においては、この影に影響されることなく車両の画像を抽出する処理を行っている(ステップS130)。
However, when a shadow is generated in the background, for example, when a shadow is generated in a part of the
(2−1)車両画像の抽出処理:
図5は、当該ステップS130における車両画像の抽出処理を示すフローチャートである。本実施形態においては、前記2次元画像における各画素に対して2次元座標(i,j)を定義しており、座標jは2次元画像において上から下に向けて数値が増加する。一方、座標iにおいては基準画像と比較する画像を抽出する順序(スキャン方向)によってその増加方向が変化する。
(2-1) Vehicle image extraction processing:
FIG. 5 is a flowchart showing the vehicle image extraction process in step S130. In the present embodiment, a two-dimensional coordinate (i, j) is defined for each pixel in the two-dimensional image, and the numerical value of the coordinate j increases from top to bottom in the two-dimensional image. On the other hand, the increase direction of the coordinate i changes depending on the order (scan direction) of extracting the image to be compared with the reference image.
すなわち、本実施形態においては、2次元画像において車両の前側から後側に向けてスキャンするスキャン方向と、車両の後側から前側に向けてスキャンするスキャン方向との双方でスキャンを行っており、各スキャン方向で座標iの定義および増加方向を逆にする。なお、車両の前側は2次元画像においてサンプルされたタイミングが早い画像であり、後側になるにつれてサンプルされたタイミングが遅くなっている。また、座標iの値域は0〜imax,座標jの値域は0〜jmaxとする。 That is, in the present embodiment, scanning is performed in both the scan direction for scanning from the front side to the rear side of the vehicle in the two-dimensional image and the scan direction for scanning from the rear side to the front side of the vehicle, The definition of coordinate i and the increasing direction are reversed in each scan direction. It should be noted that the front side of the vehicle is an image that is sampled earlier in the two-dimensional image, and the sampled timing is delayed as it becomes the rear side. The value range of the coordinate i is 0 to imax, and the value range of the coordinate j is 0 to jmax.
この座標系において、まず、基準画像設定部41b1は、スキャン方向を決定し、また、比較対象の画像を特定するための2次元座標(i,j)を初期値(1,0)に設定する(ステップS200)。また、座標iが"0"となっている1ラインを基準画像に設定する(ステップS205)。すなわち、本実施形態においては、スキャンを開始する前にそのスキャン方向を設定し、それぞれで異なる基準画像を設定する。 In this coordinate system, first, the reference image setting unit 41b1 determines a scanning direction, and sets two-dimensional coordinates (i, j) for specifying an image to be compared to an initial value (1, 0). (Step S200). Further, one line where the coordinate i is “0” is set as the reference image (step S205). That is, in this embodiment, the scan direction is set before starting the scan, and different reference images are set for each.
具体的には、図4(a)に示す2次元画像において、前側から後側に向けたスキャン方向と後側から前側に向けたスキャン方向とを実行することにしており、ステップS200では、そのいずれかを決定する。このとき、座標iの増加方向も決定する。例えば、前側から後側に向けたスキャンであるとき、座標iは前側から後側に向けて増加するように定義し、後側から前側に向けたスキャンであるとき、座標iは後側から前側に向けて増加するように定義する。 Specifically, in the two-dimensional image shown in FIG. 4A, a scan direction from the front side to the rear side and a scan direction from the rear side to the front side are executed. Decide either. At this time, the increasing direction of the coordinate i is also determined. For example, when the scan is from the front side to the rear side, the coordinate i is defined to increase from the front side to the rear side, and when the scan is from the rear side to the front side, the coordinate i is from the rear side to the front side. Define to increase toward.
上述のように、基準画像は1ライン分の画像であり、座標iが"0"である。従って、本実施形態においては、前記ステップS125にて生成した2次元画像において、最も先に取得した1ライン分の画像あるいは最も後に取得した1ライン分の画像が基準画像となる。なお、図4(a)においては、前側から後側に向けてスキャンする際の基準画像Sを示しており、このとき、前記2次元座標の(i,j)の初期値(1,0)は、基準画像Sの右隣のラインにおいて一番上に存在する画素を示す。また、スキャンによって座標iが増加すれば、そのラインの位置が逐次右側にずれていくことになる。 As described above, the reference image is an image for one line, and the coordinate i is “0”. Therefore, in this embodiment, in the two-dimensional image generated in step S125, the image for one line acquired first or the image for one line acquired last is the reference image. 4A shows a reference image S for scanning from the front side to the rear side. At this time, the initial value (1, 0) of the two-dimensional coordinates (i, j) is shown. Indicates the pixel present at the top in the line on the right side of the reference image S. Further, if the coordinate i is increased by scanning, the position of the line is sequentially shifted to the right side.
また、本実施形態においては、上述のようにして設定された基準画像Sの画像データが、基準画像データ44cとしてHDD44に記録される。むろん、基準画像Sにおいては、比較の基準となる画像を定義することができればよく、2次元画像から車両が含まれない任意のラインを基準画像Sとして定義してもよいし、車両が含まれない複数のラインを抽出し、平均を取ることによって基準画像を定義してもよいし、2次元画像の生成前に予め基準画像を生成しておいてもよく、種々の構成を採用可能である。
In the present embodiment, the image data of the reference image S set as described above is recorded in the
以上のようにして、スキャン方向,座標の初期値,基準画像を設定したら、基準画像と他の画像とを逐次比較するスキャンを行う。このために、まず、色差判別部41b2は、基準画像の中からその一つの画素(基準画素とよぶ)を抽出し、スキャン対象の画素(スキャン対象画素と呼ぶ)との色差ΔEを算出する(ステップS210)。ここで、基準画素は1ラインの基準画像Sに含まれる画素のいずれかであり、座標(0,j)にて特定される。一方、スキャン対象の画素はスキャン対象となっているラインに含まれる画素であり、座標(i,j)で特定される。すなわち、基準画素とスキャン対象画素とでは、ラインが異なっているが、上下方向の位置(座標jの値)は一致している。 When the scan direction, the initial coordinate value, and the reference image are set as described above, a scan for sequentially comparing the reference image with another image is performed. For this purpose, first, the color difference determination unit 41b2 extracts one pixel (referred to as a reference pixel) from the reference image, and calculates a color difference ΔE from a pixel to be scanned (referred to as a scan target pixel) ( Step S210). Here, the reference pixel is one of the pixels included in one line of the reference image S, and is specified by coordinates (0, j). On the other hand, a pixel to be scanned is a pixel included in a line to be scanned, and is specified by coordinates (i, j). That is, the reference pixel and the scan target pixel have different lines, but the vertical position (the value of coordinate j) matches.
色差ΔEを算出したら、この色差ΔEが予め決められた閾値T1より大きいか否かを判別する(ステップS215)。ここで、閾値T1は、基準画素とスキャン対象画素とが実質的に同一の画像であるか否かを判別するための閾値であり、ほぼ"0"であるが、1次元画像取得手段における撮影誤差のマージンを与えた値となっている。従って、色差ΔEが閾値T1より大きいか否かを判別することで、基準画素とスキャン対象画素とが実質的に同一であるか否かを判断することができ、スキャン対象画素が背景あるいは車両のいずれであるのかを判断することができる。 When the color difference ΔE is calculated, it is determined whether or not the color difference ΔE is larger than a predetermined threshold T 1 (step S215). Here, the threshold value T 1 is a threshold value for determining whether or not the reference pixel and the scan target pixel are substantially the same image, and is substantially “0”. It is a value that gives a margin for shooting error. Therefore, by determining whether or not the color difference ΔE is greater than the threshold value T 1, it is possible to determine whether or not the reference pixel and the scan target pixel are substantially the same, and the scan target pixel is the background or the vehicle. Can be determined.
具体的には、本実施形態における2次元画像は図4(a)に示すように、その背景は背景部21a,21bの画像であり、車両12が背景の前を横切ったときのみ車両12の画像が得られている。また、基準画像Sは、2次元画像において車両12が含まれない部分の画像であることから、基準画像Sは背景のみから構成される。従って、基準画像Sと他の画像とを比較し、基準画像Sと異なる画像であればその画像は車両12の画像であると特定することができる。
Specifically, as shown in FIG. 4A, the two-dimensional image in the present embodiment is an image of the
例えば、図4(a)に示す座標i1における1ライン分の画像においては、車両12の画像が含まれないので、基準画像Sとの色差ΔEを算出してもその値はほぼ"0"であって、閾値T1を超えることはない。一方、座標i2における1ライン分の画像においては、車両12の画像が含まれており、車両12の画像と基準画像Sとの色差ΔEは閾値T1を超える。従って、色差ΔEを算出することで、車両12の画像であるか否かを判別可能になる。
For example, in the image for one line at the coordinate i 1 shown in FIG. 4A, the image of the
そこで、ステップS215にて、色差ΔEが予め決められた閾値T1より大きいと判別されたときには、座標(i,j)が車両である旨を設定する(ステップS220)。また、ステップS215にて、色差ΔEが予め決められた閾値T1より大きいと判別されないときには、座標(i,j)が背景である旨を設定する(ステップS225)。なお、これらの設定は、例えば、座標(i,j)に対して予め設定したフラグを対応づけるなどして行えばよい。 Therefore, at step S215, the when the color difference ΔE is determined to a predetermined larger thresholds T 1 is the coordinates (i, j) is set to the effect that the vehicle (step S220). Further, at step S215, the when the color difference ΔE is not determined to be greater than thresholds T 1 which is determined in advance, the coordinates (i, j) is set to the effect that the background (step S225). These settings may be made, for example, by associating a preset flag with the coordinates (i, j).
座標(i,j)に対して車両あるいは背景である旨の設定を行うと、色差判別部41b2は座標jの値をインクリメントし(ステップS230)、座標jがその最大値jmaxより大きいか否かを判別する(ステップS235)。ステップS230にて座標jがその最大値jmaxより大きいと判別されなければステップS210以降の処理を繰り返す。 When setting that the vehicle or the background is the coordinate (i, j), the color difference determination unit 41b2 increments the value of the coordinate j (step S230), and whether or not the coordinate j is larger than the maximum value jmax. Is discriminated (step S235). If it is not determined in step S230 that the coordinate j is greater than the maximum value jmax, the processes in and after step S210 are repeated.
ステップS235にて座標jがその最大値jmaxより大きいと判別されたときには、1ライン分の比較が終了したことになるので、色差判別部41b2はさらに座標iをインクリメントするとともに座標jを"0"に初期化し(ステップS240)、座標iがその最大値imaxの1/2より大きいか否かを判別する(ステップS245)。そして、ステップS245にて座標iがその最大値imaxの1/2より大きいと判別されなければステップS210以降の処理を繰り返し、座標iがその最大値imaxの1/2より大きいと判別されたときには、2方向のスキャンが終了したか否かを判別する(ステップS250)。 When it is determined in step S235 that the coordinate j is larger than the maximum value jmax, the comparison for one line is completed, so the color difference determination unit 41b2 further increments the coordinate i and sets the coordinate j to “0”. (Step S240), and it is determined whether or not the coordinate i is larger than ½ of the maximum value imax (step S245). If it is not determined in step S245 that the coordinate i is greater than ½ of the maximum value imax, the processing from step S210 is repeated, and if it is determined that the coordinate i is greater than ½ of the maximum value imax. It is determined whether or not the bi-directional scan is completed (step S250).
ステップS250にて2方向のスキャンが終了していると判別されなければ、ステップS200に戻り、未処理の方向へスキャンを行うように設定し、ステップS200以降の処理を繰り返す。ステップS250にて2方向のスキャンが終了していると判別されたときには、以上の処理によって車両12の画像であると設定された画素を抽出して車両画像データ44dとし、HDD44に記録する(ステップS255)。なお、本実施形態においては2方向からスキャンを行っているので、ステップS245においては必要充分なスキャンを行うために各方向のスキャンを画像の左右中央で終了するように座標iがその最大値imaxの1/2より大きいか否かを判別している。
If it is not determined in step S250 that the scanning in the two directions has been completed, the process returns to step S200, the scanning is set in the unprocessed direction, and the processes in and after step S200 are repeated. If it is determined in step S250 that the scanning in the two directions has been completed, the pixel set to be an image of the
図4(b)においては、上述の処理によって抽出された車両12の画像を示しており、車両12の画像を抽出する際に除去された背景をハッチングによって示している。なお、背景を除去した後の車両画像データ44dにおいては、車両12の画像のみを含んでいてもよいが、コンピュータ40によるデータの扱いやすさを考慮すれば、除去した背景の位置にダミーデータ(例えば、白や背景の色等、予め決められた色)を配置する構成等を採用してもよい。
In FIG.4 (b), the image of the
以上の処理によれば、背景部21a,21bが一様な色である場合のみならず、背景部21a,21bに影が形成されていたり、泥等の汚れが付着していたとしても、正確に車両12の画像を抽出することができる。例えば、背景部21aに影が形成されている場合、車両12がラインセンサ31a,31bの撮影範囲を通過する短い時間においてその影はほとんど変化しないので、2次元画像においては図4(a)に示すように横方向に一様な影の画像21a2が形成される。
According to the above processing, not only when the
従って、影の画像21a2は基準画像Sにも含まれることになり、基準画像Sと他の画像との比較において、座標iが"0"である1ライン上の影の画像21a2と他の画像とを比較することになる。この比較において、スキャン対象画素が車両12の画像ではない場合には、基準画像Sと他の画像との双方が影の画像であることから色差ΔEはほぼ"0"であり、スキャン対象画素が車両12の画像であれば、色差ΔEが閾値T1を超える。この結果、車両12の画像を適切に抽出することが可能になる。
Accordingly, the shadow image 21a2 is also included in the reference image S, and in comparison between the reference image S and another image, the shadow image 21a2 on one line whose coordinate i is “0” and the other image. Will be compared. In this comparison, when the pixel to be scanned is not an image of the
さらに、本実施形態においては、車両12が撮影範囲を通過することによって背景部21a,21bにおける泥汚れ等の様子が変化した場合であっても適切に車両12の画像を抽出可能である。図6はこの様子を説明するための説明図であり、図6(a)は、車両12の後輪に付着していた泥が車両12の通過後に背景部21b(路面)上に残留した場合における2次元画像の例を示している。
Furthermore, in this embodiment, even when the state of mud dirt or the like in the
同図に示すように、車両12の後輪に付着していた泥が路面上に残留した場合、2次元画像上では、後輪の後側で横方向に一様な泥汚れ21b2が生じることになる。しかし、この画像において、車両12の後側から前側に向けたスキャンを実施する際には、右端の画像を基準画像Sとして逐次スキャンを行う。このとき、泥汚れ21b2が存在する部位においては、車両12の後側から前側に向けて色差ΔEがほぼ"0"であるが、スキャン対象画素がタイヤの画像となったときに色差ΔEが閾値T1を超えて、車両12の画像として抽出される。
As shown in the figure, when mud adhering to the rear wheel of the
なお、泥汚れ21b2を含む基準画像Sを設定して車両12の後側から前側にスキャンを行ったとき、後輪よりも前側の背景が車両12の画像として抽出されるおそれがある。しかし、本実施形態において車両の外形寸法を計測する際には、後述するように、車両12の画像の端部を利用しているため、車輪間の画素が車両12の画像として抽出されたとしても、車両の外形寸法の計測には全く影響がない。一方、車両の前側においては、車両の前側において設定した基準画像Sに基づいてスキャンを行い、この基準画像Sにおいては背景部21bに泥汚れ21b2を含まないので、車両12と背景部21bとを明確に区別して車両12の画像を抽出することができる。
Note that when a reference image S including mud dirt 21b2 is set and scanning is performed from the rear side to the front side of the
また、路面上の背景部21bに付着していた泥汚れ等が車両12の通過によって変化した場合であっても同様であり、適切に車両12の画像を抽出することが可能である。この場合、図6(b)に示すように、車両の前側で横方向に一様な泥汚れ21b3が生じており、車両の後側では泥汚れが消えているあるいは薄くなっているなどの変化が生じている。この画像のスキャンにおいても前側から後側にスキャンする際には泥汚れ21b3を含む基準画像Sが設定されるので、スキャンによって車両12のタイヤが適切に抽出される。一方、後側から前側に向けたスキャンに際しては泥汚れが存在しない状態の基準画像Sが設定されるので、この方向のスキャンにおいても車両12の画像が適切に抽出される。以上のように、本実施形態においては、車両12の通過によって背景部21a,21bに変化が生じた場合であっても適切に車両12の画像を抽出することが可能である。
The same applies to the case where mud dirt or the like adhering to the
以上の処理によって、車両画像データ44dを作成したら、車両計測部41cは、当該車両画像データ44dに基づいて車長,車高,車幅の算出を行う。本実施形態においては、まず、車長の算出処理を行う(ステップS135)。図7は、当該車長の算出処理を示すフローチャートである。本実施形態においては、車両12の速度の実測値に基づいて車長を計測するようになっており、車両計測部41cの車長算出部41c1は、まず車速を算出する(ステップS300)。ここで、車速は前記距離Dと時間Tとを利用し、D/Tによって算出される。
After the
次に、車長算出部41c1は、ラインセンサ31a,31bにおける1ライン分の車長方向の長さを算出する(ステップS310)。すなわち、ラインセンサ31a,31bにおける1ライン分の画像は前記サンプリング周期で撮影されるため、車両12の2次元画像における車長方向の1ライン分は、ラインセンサ31a,31bのサンプリング周期の間に車両12が移動する距離に対応している。そこで、サンプリング周期と車速とを乗じれば、1ライン分の車長方向の長さを算出することができる。
Next, the vehicle length calculation unit 41c1 calculates the length in the vehicle length direction for one line in the
1ライン分の車長方向の長さを算出したら、車長算出部41c1は、車両12の側面の画像から車両の先端と終端とを検出する(ステップS320)。すなわち、図4(b)に示す車両12の画像において、画像の先端と終端との間の距離Lは車長に相当するので、これらの先端と終端とを検出する。例えば、車両12の側面の2次元画像において、最も左側にある画素と最も右側にある画素とを抽出すればよい。上述のように背景をダミーデータにした場合には、ダミーデータではない画素で最も左側にある画素と最も右側にある画素とを抽出する。
After calculating the length in the vehicle length direction for one line, the vehicle length calculation unit 41c1 detects the front end and the end of the vehicle from the image of the side surface of the vehicle 12 (step S320). That is, in the image of the
2次元画像内で車両12の先端と終端とを検出したら、車両12における車体進行方向のライン数(サンプル回数)を取得し(ステップS330)、これらのライン数に基づいて車長を算出する(ステップS340)。すなわち、ステップS330においては、前記先端と終端とのラインを含めて、先端から終端までのライン数を取得する。1ラインにおける車両進行方向の長さはステップS310にて算出済であるので、当該1ラインの長さと前記先端から終端までのライン数とを乗じれば、車長Lを算出することができる。
When the front end and the end of the
以上のようにして車長Lを算出したら、ステップS130にて抽出した車両12の側面画像に基づいて、車高算出部41c2が車高を算出する(ステップS140)。すなわち、ラインセンサ31a,31bにおいて撮影された1次元の画像において、その高さ方向の一画素に相当する長さは、高さライン長データ44gにて記述されているので、車高算出部41c2は、車両12の側面画像から上端の画素と下端の画素とを抽出し、それらの間の画素数と前記高さ方向の一画素に相当する長さとを乗じることで車高(図4(b)のH)を算出する。
When the vehicle length L is calculated as described above, the vehicle height calculation unit 41c2 calculates the vehicle height based on the side image of the
車幅算出部41c3においても同様に、ステップS130にて抽出した車両12の上面画像に基づいて車幅を算出する(ステップS145)。すなわち、ラインセンサ31c,31dにおいて撮影された1次元の画像において、その幅方向の一画素に相当する長さは、幅ライン長データ44hにて記述されているので、車幅算出部41c3は、車両12の上面画像から左端の画素と右端の画素とを抽出し、それらの間の画素数と前記幅方向の一画素に相当する長さとを乗じることで車幅を算出する。
Similarly, the vehicle width calculation unit 41c3 calculates the vehicle width based on the top image of the
以上の処理によって、車長,車高,車幅が算出されたことになるので、本実施形態においては車両計測部41cがI/F45bを介して制御信号を出力し、ディスプレイ40a上に車長,車高,車幅を表示させる(ステップS150)。この結果、車両計測装置10を利用する利用者が、全く人為的な作業をする必要はなく、車両12にて路面11上を走行するのみで車長,車高,車幅を計測することができる。
Since the vehicle length, vehicle height, and vehicle width are calculated through the above processing, in this embodiment, the
(3)他の実施形態:
上述の実施形態は本発明の一実施形態であり、本発明の実施形態は前記の実施形態に限定されない。例えば、より正確に車両の画像を検出するために、車両の影を除去する処理や、色の補正等を行ってもよい。図8は、車両の影を除去する処理および色の補正処理を行う実施形態の構成を示すブロック図であり、図9,図10はそのフローチャートである。
(3) Other embodiments:
The above-described embodiment is an embodiment of the present invention, and the embodiment of the present invention is not limited to the above-described embodiment. For example, in order to detect a vehicle image more accurately, processing for removing the shadow of the vehicle, color correction, or the like may be performed. FIG. 8 is a block diagram showing a configuration of an embodiment that performs a process for removing a shadow of a vehicle and a color correction process, and FIGS. 9 and 10 are flowcharts thereof.
図8に示す実施例においても、概略構成は図2と同様であり、図1および図2とほぼ同じハードウェア構成によって実現可能である。但し、背景部21aにおいては、ラインセンサ31aあるいは31bの撮影範囲に含まれる位置に、図示しない基準色部を備えている。当該基準色部は、背景部21a,21bの周囲が予め決められた明るさであるときに白色となり、ラインセンサ31aあるいは31bで撮影したときのデータが予め決められている。
Also in the embodiment shown in FIG. 8, the schematic configuration is the same as that in FIG. 2, and can be realized by almost the same hardware configuration as in FIGS. 1 and 2. However, the
また、図8に示すように、HDD44においては、基準画像データ44cではなく背景色データ440cが記録されている。当該背景色データ440cは、背景部21a,21bの周囲が予め決められた明るさであるときにラインセンサ31a,31bで背景部21a,21bを撮影したときに得られる色を示すデータである。さらに、図8における車両計測プログラムは、図2における画像抽出部41bではなく、背景除去部410bと影除去部411bとを備えている。背景除去部410bは、前記2次元画像から背景を除去する処理を行うモジュールであり、前記背景色データ440cに基づいて背景を排除する。また、影除去部411bは背景除去部410bによって背景が除去された画像から車両の外形寸法を算出する上で余分な画像である車両の影を除去する処理を行うモジュールである。
Further, as shown in FIG. 8, the
車両計測プログラムにおける処理は図9に示す手順となり、大半は、図3に示す処理と同じであるが、図3におけるステップS130の代わりに図9に示すステップS131,132,134を実施する点で異なっている。図11(a)は、車両12の影が路面に生じている場合に、図9に示すステップS125にて得られる2次元画像の例を示している。同図に示すように、車両12の影の画像21b4は車両12がラインセンサ31a,31bの撮影範囲を通過する際に車両12の進行とともに変化するので、2次元画像上で横方向に一様ではなく、車両12の形状に対応した影の画像21b4が形成される。
The process in the vehicle measurement program is the procedure shown in FIG. 9, and most of the process is the same as the process shown in FIG. 3, except that steps S131, 132, and 134 shown in FIG. 9 are performed instead of step S130 in FIG. Is different. FIG. 11A shows an example of a two-dimensional image obtained in step S125 shown in FIG. 9 when the shadow of the
なお、図11(a)に示す2次元画像において、その上部には背景部21aに形成されている基準色部の画像(図11(a)の21a3)を示しており、さらに、この例では、全体に色かぶり(夕日によって赤みがかったり、時刻が遅くなることによって全体に暗くなること)を2次元画像全体に対するハッチングにて示している。
In addition, in the two-dimensional image shown in FIG. 11A, an image of the reference color portion (21a3 in FIG. 11A) formed on the
本実施形態においては、センサ制御部41aによってステップS100〜S125を実施した後、背景除去部410bが2次元画像から背景を除去する処理を行う(ステップS131)。すなわち、除去すべき背景部21a,21bの色が背景色データ440cにて定義されているので、2次元画像からこの色を抽出して除去する。また、このとき基準色部21a3の画像も除去しておき、その画像データを記憶しておく。
In the present embodiment, after performing steps S100 to S125 by the sensor control unit 41a, the
以上の処理によれば、ほぼ車両12の画像が抽出されるはずであるが、車両計測装置10が屋外に設置されている場合など、車両12の影が路面に形成されているときには図11(a)に示す車両12の画像と影の画像21b4とが残ることになる。上述のように車両の外形寸法、例えば、車長は背景除去後の画像の先端と終端とに基づいて算出するので、図11(a)に示す例のように影の画像21b4が車両12の先端より前側に存在すると、影の画像21b4の先端を抽出してしまう虞がある。
According to the above processing, an image of the
そこで、本実施形態においては、影除去部411bが、少なくとも車両12の画像の端部より外側に存在する影の画像21b4の周縁部を除去する処理を行う。このために、まず、画像の色を補正する(ステップS132)。すなわち、ステップS131の処理後に得られている画像の色は、図11(a)のように色かぶりをしているおそれがあるため、基準色部の画像データに基づいて色を補正する。
Therefore, in the present embodiment, the
具体的には、上述のように基準色部をラインセンサ31aあるいは31bで撮影したときのデータが予め決められているので、ステップS131にて除去した基準色部の画像がこのデータと異なるときには、その比率に基づいて補正を行う。例えば、基準色部の色として予め決められたデータにおけるRGB各色の階調値がR0,G0,B0、2次元画像から除去した基準色部のデータにおけるRGB各色の階調値がR1,G1,B1であるとき、ステップS131による処理後の画像におけるRGB各色の階調値にR0/R1,G0/G1,B0/B1のそれぞれを乗じる。むろん、この補正においては、補正後の値が階調値域の最大値および最小値を超えないようにする。このために、ガンマ補正等の非線形補正を行ってもよい。
Specifically, as described above, the data when the reference color portion is photographed by the
この結果、補正後の画像内では、基準色部を予め決められた色に変換するように補正がなされ、色かぶりが解消する。そこで、本実施形態では、補正後の画像において影の画像21b4を除去する処理を行う。本実施形態では、影の画像21b4の性質を利用して影の画像21b4の周縁部を除去している。すなわち、影の画像21b4は、一般に、図11(b)に示すように、その中央では濃い黒色であるがその中央部から周縁部に近づくにつれて光の回折の影響を受けて薄くなる(背景の色味をもつ)。 As a result, in the corrected image, correction is performed so that the reference color portion is converted to a predetermined color, and the color cast is eliminated. Therefore, in the present embodiment, a process of removing the shadow image 21b4 from the corrected image is performed. In the present embodiment, the peripheral portion of the shadow image 21b4 is removed using the property of the shadow image 21b4. That is, as shown in FIG. 11B, the shadow image 21b4 is generally dark black at the center, but becomes thinner due to the influence of light diffraction as it approaches the periphery from the center (the background image). Have a color).
そこで、影除去部411bは、図10に示す処理を行って影の画像21b4の周縁部を除去しており、まず、背景部21bの色を示す背景色データ440cを取得する(ステップS400)。次に、影除去部411bは、影の画像21b4の周縁部を特定するための閾値T2,T3を設定する(ステップS405)。ここで、閾値T2,T3は、車両12の画像においてタイヤの画像を除去せず、影の画像21b4の周縁部を除去するために設定される値であり、除去するべき色の下限値を閾値T2,上限値を閾値T3とする。すなわち、除去すべき影の画像21b4の周縁部は、前記ステップS400にて取得した背景部21bの色より濃い色であり、タイヤの色より薄い色である。
Therefore, the
そこで、本実施形態においては、背景部21bの色より濃い色を当該背景部21bの色より低明度かつ低彩度の色と定義し、前記背景色データ440cが示す色より低明度かつ低彩度の色を示すデータを閾値T3とする。さらに、タイヤの色より薄い色を当該タイヤの色より高明度かつ高彩度の色と定義し、予め決められたタイヤの色より高明度かつ高彩度の色を示すデータを閾値T2とする。むろん、ここで、閾値T2,T3はRGB各色の階調値である。なお、予め決められたタイヤの色としては、多数の車両の画像によって統計的に取得したタイヤの色を採用するなど、種々の手法によって決定可能である。
Therefore, in the present embodiment, a color darker than the color of the
また、各閾値T2,T3を決定する際には、除去すべき色を除去し、除去すべきではない色を保持するように決定することができればよく、例えば、背景色データ440cが示す色やタイヤの色から所定のマージンを設けて決定することとし、このマージンとして好ましい値を統計的に決めておくなど、種々の手法を採用することが可能である。
Further, when determining each of the threshold values T 2 and T 3 , it suffices if it can be determined so as to remove a color to be removed and hold a color that should not be removed. For example, the
以上のようにして、閾値T2,T3を決定したら、影除去部411bは、影を除去するための処理を実施すべき検索領域を決定する(ステップS410)。ここでは、影の画像21b4を包含する領域を決定することができればよく、車両12の下部をこの領域にするなど種々の手法によって検索領域を決定することができる。むろん、処理負荷が過度にならないのであれば、ステップS131にて得られている画像の全てを検索領域としてもよい。
When the threshold values T 2 and T 3 are determined as described above, the
検索領域を決定したら、この検索領域に含まれる各画素のいずれかを比較対象としてその画素データ(比較対象の色)が閾値T2〜T3に含まれるか否かを判別する(ステップS415)。そして、このステップS415にて比較対象の色が閾値T2〜T3に含まれると判別されたときには当該比較対象の色を除去し(ステップS420)、ステップS415にて比較対象の色が閾値T2〜T3に含まれると判別されなければ当該ステップS420をスキップする。 When the search area is determined, it is determined whether or not the pixel data (color to be compared) is included in the threshold values T 2 to T 3 with any one of the pixels included in the search area as a comparison target (step S415). . If it is determined in step S415 that the color to be compared is included in the threshold values T 2 to T 3 , the color to be compared is removed (step S420), and the color to be compared is set to the threshold value T in step S415. if it is determined to be included in the 2 through T 3 skips the step S420.
この処理の後、検索領域内の全画素について上述の比較を行ったか否かを判別し(ステップS425)、当該ステップS425にて検索領域内の全画素について上述の比較を行ったと判別されなければ比較対象の画素を変更して(ステップS430)、ステップS415以降の処理を繰り返す。 After this processing, it is determined whether or not the above comparison has been performed for all the pixels in the search region (step S425). If it is not determined in step S425 that the above comparison has been performed for all the pixels in the search region. The pixel to be compared is changed (step S430), and the processing after step S415 is repeated.
図11(c)は、以上の処理によって影の画像21b4の周縁部を除去した後の画像を示す図である。同図に示すように、影の画像21b4の周縁部が除去されているので、車両12の進行方向における先端と終端とは車両12の画像となり、車両12の上下方向における上端と下端とは車両12の画像となる。従って、ステップS135以降の処理によって車両12の車長Lや車高H等を正確に算出することが可能になる。
FIG. 11C is a diagram illustrating an image after the peripheral portion of the shadow image 21b4 is removed by the above processing. As shown in the figure, since the peripheral portion of the shadow image 21b4 is removed, the front end and the end in the traveling direction of the
なお、以上の処理においては、背景部21bやタイヤの色と影の画像21b4の色とを相対的に比較することで影の画像21b4の周縁部を除去しているので、前記ステップS132における色の補正を行うことによってより正確に影の除去を行うことができる。すなわち、色の補正を行うことによって、車両12の画像においてタイヤの画像を除去せず影の画像21b4の周縁部を除去するための閾値T2,T3を容易に(例えば、統計的知見に基づいて)設定することが可能になる。
In the above processing, the peripheral portion of the shadow image 21b4 is removed by relatively comparing the
むろん、本発明の実施形態は上述の例に限定されず、例えば、前記図9におけるステップS132の色補正処理は、ステップS131の背景除去処理の前に行ってもよいし、ステップS131において上述の図3に示すステップS130と同じ処理を行ってもよい。また、ステップS400においては、背景部21bの色を示すデータを取得することができればよいので、ステップS131にて除去した画像データに対してステップS132と同様の補正を行ったデータを背景色として取得してもよい。
Of course, the embodiment of the present invention is not limited to the above-described example. For example, the color correction process in step S132 in FIG. 9 may be performed before the background removal process in step S131. You may perform the same process as step S130 shown in FIG. In step S400, it is only necessary to acquire data indicating the color of the
さらに、車長の算出方法は、上述の図7に示す処理に限定されず、長さおよび色が既知の標識を車両12に取り付けてラインセンサによる撮影を行い、その画像に基づいて車長を算出してもよい。図12は、標識が取り付けられた車両12を撮影した画像を示す図である。すなわち、円形の標識を取り付けた車両12をラインセンサ31a,31bあるいはラインセンサ31c,31dで撮影すると、図7(a)に示すように車両12に取り付けられた円形の標識Mが含まれた2次元画像を取得することができる。
Furthermore, the vehicle length calculation method is not limited to the process shown in FIG. 7 described above, and a sign with a known length and color is attached to the
そこで、図7(b)のように、2次元画像から背景を除去し、標識Mの画像を抽出する。標識Mの長さは既知であるので、当該抽出した標識Mの画像からその車両進行方向のライン数(a)を取得し、車両の画像からその車両進行方向のライン数(b)を取得すれば、標識の長さ(直径)と(b/a)とを乗じることによって車長を算出することができる。なお、以上の車長計測において、車両12に取り付ける標識の数が1個に限定されるわけではなく、2個以上の標識を車両12に取り付けて車長を計測してもよい。この場合、各標識に基づいて個別に車長を算出して平均を算出することで車長を取得してもよいし、標識のライン数について平均を取得してから車長を算出してもよく、種々の構成が採用可能である。なお、標識の数が少ない方が準備に手間がかからないが、標識の数が多い方が正確に車長を算出可能である。
Therefore, as shown in FIG. 7B, the background is removed from the two-dimensional image, and the image of the sign M is extracted. Since the length of the sign M is known, the number of lines (a) in the vehicle traveling direction is obtained from the extracted image of the sign M, and the number of lines (b) in the vehicle traveling direction is obtained from the image of the vehicle. For example, the vehicle length can be calculated by multiplying the length (diameter) and (b / a) of the sign. In the above vehicle length measurement, the number of signs attached to the
さらに、上述の実施形態においては、柱20cに2個のラインセンサ31a,31bが取り付けられ、梁20fに2個のラインセンサ31c,31dが取り付けられていた。しかし、車長や車高,車幅を計測するために柱20cや梁20fに2個のラインセンサを取り付けることは必須ではない。従って、1個のラインセンサを利用してもよいし、3個以上のラインセンサを利用してもよい。むろん、ラインセンサの数を増加させた方が車両計測の精度向上が容易であるが、ラインセンサの数が少なければ装置構成が簡易であり、コストを抑えることができる。また、上述の例においては、車両12の側面の画像に基づいて車長を算出していたが、車両12の上面の画像に基づいて車長を算出してもよい。
Furthermore, in the above-described embodiment, the two
10…車両計測装置
11…路面
12…車両
20a〜20e…柱
20f…梁
21…柱
21a,21b…背景部
21a2…影の画像
21a3…基準色部
21b2,21b3…泥汚れ
21b4…影の画像
30a,30b…進入センサ
30c,30d…退出センサ
31a〜31d…ラインセンサ
40…コンピュータ
40a…ディスプレイ
40b…キーボード
40c…マウス
41a…センサ制御部
41b…画像抽出部
41b1…基準画像設定部
41b2…色差判別部
41c…車両計測部
41c1…車長算出部
41c2…車高算出部
41c3…車幅算出部
44a…1次元画像データ
44b…2次元画像データ
44c…基準画像データ
44d…車両画像データ
44e…センサ間距離データ
44f…サンプリング周期データ
44g…高さライン長データ
44h…幅ライン長データ
DESCRIPTION OF
Claims (10)
前記1次元画像取得手段の撮影範囲に設置された背景部と、
前記1次元画像取得手段と前記背景部との間を横切る車両の画像を前記1次元画像取得手段によって複数回取得して2次元画像を生成する2次元画像生成手段と、
当該2次元画像において車両を含まない部分に基づいて基準画像を特定し、当該基準画像と他の画像とを順次比較して、その差分が所定の閾値を超える画像を車両の画像として抽出する画像抽出手段と、
当該抽出した画像に基づいて車両の外形寸法を計測する計測手段とを備えることを特徴とする車両計測装置。 One-dimensional image acquisition means for photographing a predetermined range in a direction perpendicular to the traveling direction of the vehicle traveling on the road surface;
A background portion installed in the photographing range of the one-dimensional image acquisition means;
Two-dimensional image generation means for generating a two-dimensional image by acquiring a vehicle image crossing between the one-dimensional image acquisition means and the background portion a plurality of times by the one-dimensional image acquisition means;
An image that identifies a reference image based on a portion that does not include a vehicle in the two-dimensional image, sequentially compares the reference image with another image, and extracts an image whose difference exceeds a predetermined threshold as a vehicle image Extraction means;
A vehicle measurement apparatus comprising: a measurement unit that measures an outer dimension of the vehicle based on the extracted image.
前記画像抽出手段は、前記2次元画像において車両の前側で第1の基準画像を設定してそれより後側の画像と順次比較し、車両の後側で第2の基準画像を設定してそれより前側の画像と順次比較することを特徴とする請求項1に記載の車両計測装置。 The two-dimensional image generation means acquires an image captured by the one-dimensional image acquisition means within a predetermined time range after passing through the imaging range from before the vehicle passes,
The image extracting means sets a first reference image on the front side of the vehicle in the two-dimensional image and sequentially compares it with an image on the rear side thereof, and sets a second reference image on the rear side of the vehicle. The vehicle measurement device according to claim 1, wherein the vehicle measurement device sequentially compares the image with a front image.
路面を走行する車両の進行方向に対して垂直な方向の所定範囲を撮影して背景部の前を横切る車両の画像を取得する1次元画像取得工程を複数回実施して2次元画像を生成する2次元画像生成工程と、
当該2次元画像において車両を含まない部分に基づいて基準画像を特定し、当該基準画像と他の画像とを順次比較して、その差分が所定の閾値を超える画像を車両の画像として抽出する画像抽出工程と、
当該抽出した画像に基づいて車両の外形寸法を計測する計測工程とを備えることを特徴とする車両計測方法。 A vehicle measurement method for measuring an outer dimension of a vehicle based on an image,
A two-dimensional image is generated by performing a one-dimensional image acquisition step of capturing a predetermined range in a direction perpendicular to the traveling direction of the vehicle traveling on the road surface and acquiring an image of the vehicle crossing the front of the background portion a plurality of times. A two-dimensional image generation step;
An image that identifies a reference image based on a portion that does not include a vehicle in the two-dimensional image, sequentially compares the reference image with another image, and extracts an image whose difference exceeds a predetermined threshold as a vehicle image An extraction process;
A vehicle measurement method comprising: a measurement step of measuring an outer dimension of the vehicle based on the extracted image.
前記1次元画像取得手段の撮影範囲に設置された背景部と、
を備える撮影系にて取得する画像に基づいて車両の外形寸法を計測する車両計測プログラムであって、
前記1次元画像取得手段と前記背景部との間を横切る車両の画像を前記1次元画像取得手段によって複数回取得して2次元画像を生成する2次元画像生成機能と、
当該2次元画像において車両を含まない部分に基づいて基準画像を特定し、当該基準画像と他の画像とを順次比較して、その差分が所定の閾値を超える画像を車両の画像として抽出する画像抽出機能と、
当該抽出した画像に基づいて車両の外形寸法を計測する計測機能とをコンピュータに実現させることを特徴とする車両計測プログラム。 One-dimensional image acquisition means for photographing a predetermined range in a direction perpendicular to the traveling direction of the vehicle traveling on the road surface;
A background portion installed in the photographing range of the one-dimensional image acquisition means;
A vehicle measurement program for measuring an outer dimension of a vehicle based on an image acquired by an imaging system comprising:
A two-dimensional image generation function for generating a two-dimensional image by acquiring a vehicle image crossing between the one-dimensional image acquisition unit and the background portion a plurality of times by the one-dimensional image acquisition unit;
An image that identifies a reference image based on a portion that does not include a vehicle in the two-dimensional image, sequentially compares the reference image with another image, and extracts an image whose difference exceeds a predetermined threshold as a vehicle image Extraction function;
A vehicle measurement program for causing a computer to realize a measurement function for measuring an outer dimension of a vehicle based on the extracted image.
前記1次元画像取得手段の撮影範囲に設置された背景部と、
前記1次元画像取得手段と前記背景部との間を横切る車両の画像を前記1次元画像取得手段によって取得し、取得した画像から前記背景を除去する背景除去手段と、
当該背景を除去した画像において、車両の影の周縁部であって、少なくとも車両の画像の端部より外側に存在する影を除去する影除去手段と、
当該影を除去した画像に基づいて車両の外形寸法を計測する計測手段とを備えることを特徴とする車両計測装置。 One-dimensional image acquisition means for photographing a predetermined range in a direction perpendicular to the traveling direction of the vehicle traveling on the road surface;
A background portion installed in the photographing range of the one-dimensional image acquisition means;
A background removal means for obtaining an image of a vehicle crossing between the one-dimensional image obtaining means and the background portion by the one-dimensional image obtaining means, and removing the background from the obtained image;
In the image from which the background is removed, a shadow removing unit that removes a shadow that is at the periphery of the shadow of the vehicle and at least outside the end of the image of the vehicle;
A vehicle measuring apparatus comprising: a measuring unit that measures an outer dimension of the vehicle based on an image from which the shadow is removed.
路面を走行する車両の進行方向に対して垂直な方向の所定範囲を撮影して背景部の前を横切る車両の画像を取得する1次元画像取得工程と、
取得した画像から背景を除去する背景除去工程と、
当該背景を除去した画像において、車両の影の周縁部であって、少なくとも車両の画像の端部より外側に存在する影を除去する影除去工程と、
当該影を除去した画像に基づいて車両の外形寸法を計測する計測工程とを備えることを特徴とする車両計測方法。 A vehicle measurement method for measuring an outer dimension of a vehicle based on an image,
A one-dimensional image acquisition step of capturing a predetermined range in a direction perpendicular to the traveling direction of the vehicle traveling on the road surface and acquiring an image of the vehicle crossing the front of the background;
A background removal step of removing the background from the acquired image;
In the image from which the background is removed, a shadow removing step of removing a shadow that is at the periphery of the shadow of the vehicle and at least outside the edge of the vehicle image;
And a measuring step of measuring an outer dimension of the vehicle based on the image from which the shadow is removed.
前記1次元画像取得手段の撮影範囲に設置された背景部と、
を備える撮影系にて取得する画像に基づいて車両の外形寸法を計測する車両計測プログラムであって、
前記1次元画像取得手段と前記背景部との間を横切る車両の画像を前記1次元画像取得手段によって取得し、取得した画像から前記背景を除去する背景除去機能と、
当該背景を除去した画像において、車両の影の周縁部であって、少なくとも車両の画像の端部より外側に存在する影を除去する影除去機能と、
当該影を除去した画像に基づいて車両の外形寸法を計測する計測機能とをコンピュータに実現させることを特徴とする車両計測プログラム。
One-dimensional image acquisition means for photographing a predetermined range in a direction perpendicular to the traveling direction of the vehicle traveling on the road surface;
A background portion installed in the photographing range of the one-dimensional image acquisition means;
A vehicle measurement program for measuring an outer dimension of a vehicle based on an image acquired by an imaging system comprising:
A background removal function for acquiring an image of a vehicle crossing between the one-dimensional image acquisition means and the background portion by the one-dimensional image acquisition means, and removing the background from the acquired image;
In the image from which the background is removed, a shadow removing function that removes a shadow that is at the periphery of the shadow of the vehicle and at least outside the edge of the image of the vehicle;
A vehicle measurement program for causing a computer to realize a measurement function for measuring an outer dimension of a vehicle based on an image from which the shadow is removed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005356495A JP2007163173A (en) | 2005-12-09 | 2005-12-09 | Apparatus, method, and program for measuring vehicle |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005356495A JP2007163173A (en) | 2005-12-09 | 2005-12-09 | Apparatus, method, and program for measuring vehicle |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007163173A true JP2007163173A (en) | 2007-06-28 |
Family
ID=38246244
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005356495A Pending JP2007163173A (en) | 2005-12-09 | 2005-12-09 | Apparatus, method, and program for measuring vehicle |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007163173A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011008459A (en) * | 2009-06-25 | 2011-01-13 | Aisin Seiki Co Ltd | In-vehicle camera device |
JP2014514543A (en) * | 2011-03-31 | 2014-06-19 | エーティーエス オートメーション ツーリング システムズ インコーポレイテッド | Three-dimensional light detection through optical media |
WO2014132490A1 (en) * | 2013-02-26 | 2014-09-04 | 三菱重工業株式会社 | Vehicle specifications measurement processing device, vehicle specifications measuring method, and recording medium |
JP2016095733A (en) * | 2014-11-17 | 2016-05-26 | 三菱電機株式会社 | Vehicle monitoring system and vehicle monitoring method |
JP2019095265A (en) * | 2017-11-21 | 2019-06-20 | マツダ株式会社 | Vehicle controller |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0481999A (en) * | 1990-07-24 | 1992-03-16 | Nec Corp | Detector for mobile object |
JPH05244596A (en) * | 1991-11-04 | 1993-09-21 | Hughes Aircraft Co | Video image processor and vehicle detection method |
JPH0843056A (en) * | 1993-09-06 | 1996-02-16 | Nippon Telegr & Teleph Corp <Ntt> | Method and apparatus for obtaining characteristics of moving object |
JPH08233525A (en) * | 1995-02-24 | 1996-09-13 | Hitachi Ltd | Vehicle-type discriminating apparatus |
JPH10283478A (en) * | 1997-03-31 | 1998-10-23 | Omron Corp | Method for extracting feature and and device for recognizing object using the same method |
JPH11120480A (en) * | 1997-10-21 | 1999-04-30 | Omron Corp | Vehicle characteristic extracting device and method therefor |
JP2001006089A (en) * | 1999-06-23 | 2001-01-12 | Matsushita Electric Ind Co Ltd | Vehicle detector using color information |
-
2005
- 2005-12-09 JP JP2005356495A patent/JP2007163173A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0481999A (en) * | 1990-07-24 | 1992-03-16 | Nec Corp | Detector for mobile object |
JPH05244596A (en) * | 1991-11-04 | 1993-09-21 | Hughes Aircraft Co | Video image processor and vehicle detection method |
JPH0843056A (en) * | 1993-09-06 | 1996-02-16 | Nippon Telegr & Teleph Corp <Ntt> | Method and apparatus for obtaining characteristics of moving object |
JPH08233525A (en) * | 1995-02-24 | 1996-09-13 | Hitachi Ltd | Vehicle-type discriminating apparatus |
JPH10283478A (en) * | 1997-03-31 | 1998-10-23 | Omron Corp | Method for extracting feature and and device for recognizing object using the same method |
JPH11120480A (en) * | 1997-10-21 | 1999-04-30 | Omron Corp | Vehicle characteristic extracting device and method therefor |
JP2001006089A (en) * | 1999-06-23 | 2001-01-12 | Matsushita Electric Ind Co Ltd | Vehicle detector using color information |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011008459A (en) * | 2009-06-25 | 2011-01-13 | Aisin Seiki Co Ltd | In-vehicle camera device |
JP2014514543A (en) * | 2011-03-31 | 2014-06-19 | エーティーエス オートメーション ツーリング システムズ インコーポレイテッド | Three-dimensional light detection through optical media |
US9551570B2 (en) | 2011-03-31 | 2017-01-24 | Ats Automation Tooling Systems Inc. | Three dimensional optical sensing through optical media |
WO2014132490A1 (en) * | 2013-02-26 | 2014-09-04 | 三菱重工業株式会社 | Vehicle specifications measurement processing device, vehicle specifications measuring method, and recording medium |
JP2014164601A (en) * | 2013-02-26 | 2014-09-08 | Mitsubishi Heavy Ind Ltd | Vehicle specification measurement processing apparatus, vehicle specification measurement method, and program |
JP2016095733A (en) * | 2014-11-17 | 2016-05-26 | 三菱電機株式会社 | Vehicle monitoring system and vehicle monitoring method |
JP2019095265A (en) * | 2017-11-21 | 2019-06-20 | マツダ株式会社 | Vehicle controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4937030B2 (en) | Image processing apparatus for vehicle | |
US20180308282A1 (en) | Shape measuring apparatus and method | |
JP6990859B2 (en) | Depth acquisition device, depth acquisition method and program | |
JP2008042482A5 (en) | ||
CN112534474A (en) | Depth acquisition device, depth acquisition method, and program | |
JP2007163173A (en) | Apparatus, method, and program for measuring vehicle | |
JP2013065995A (en) | Imaging device and object identification device using the same | |
CN107018407B (en) | Information processing device, evaluation chart, evaluation system, and performance evaluation method | |
JP2008099598A (en) | Device for inspecting insect-catching sheet, and method for counting insects caught in image of insect-catching sheet | |
US20190287272A1 (en) | Detection system and picturing filtering method thereof | |
JP2007298376A (en) | Method and device for determining boundary position, program for making computer function as boundary position determination device, and recording medium | |
KR101995466B1 (en) | Stereo image matching based on feature points | |
JP2007312206A (en) | Imaging apparatus and image reproducing apparatus | |
JP4765113B2 (en) | Vehicle periphery monitoring device, vehicle, vehicle periphery monitoring program, and vehicle periphery monitoring method | |
WO2023276564A1 (en) | Motion information imaging device | |
JP2008108118A (en) | Image processor | |
Zurn et al. | Video-based rodent activity measurement using near-infrared illumination | |
JP2007163171A (en) | Apparatus, method, and program for measuring vehicle | |
JP5674130B2 (en) | Imaging device | |
JP5863005B2 (en) | Imaging device | |
JP4799160B2 (en) | Vehicle measurement device, vehicle measurement method, and vehicle measurement program | |
JP2008040724A (en) | Image processing device and image processing method | |
JP6348020B2 (en) | Image processing apparatus, image processing method, and inspection method using the same | |
WO2019088259A1 (en) | Processor for electronic endoscope, and electronic endoscope system | |
JP5686376B2 (en) | Image processing apparatus, method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20081106 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20110204 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110524 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110525 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20110927 |