JP2011216051A - Program and device for discriminating traffic light - Google Patents

Program and device for discriminating traffic light Download PDF

Info

Publication number
JP2011216051A
JP2011216051A JP2010085936A JP2010085936A JP2011216051A JP 2011216051 A JP2011216051 A JP 2011216051A JP 2010085936 A JP2010085936 A JP 2010085936A JP 2010085936 A JP2010085936 A JP 2010085936A JP 2011216051 A JP2011216051 A JP 2011216051A
Authority
JP
Japan
Prior art keywords
unit
signal
pixels
labeling
range
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
Application number
JP2010085936A
Other languages
Japanese (ja)
Inventor
Kenichi Sakina
健一 先名
Nana Nishimura
奈々 西村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of National Colleges of Technologies Japan
Original Assignee
Institute of National Colleges of Technologies Japan
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of National Colleges of Technologies Japan filed Critical Institute of National Colleges of Technologies Japan
Priority to JP2010085936A priority Critical patent/JP2011216051A/en
Publication of JP2011216051A publication Critical patent/JP2011216051A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a traffic light discrimination program and a traffic light discrimination device which can accurately discriminate traffic light in a photographic image in real time regardless of weather, time zone, or the like without the necessity of preparing template data or the like for discrimination.SOLUTION: A traffic light discrimination device 3 is made to serve as: a still image acquisition part 61; a color component conversion part 64 which converts RGB components of respective pixels constituting a still image to HSV components; an extraction threshold storage part 53 wherein thresholds determining a hue range, a saturation range, and a brightness range for extracting pixels having hue, saturation, and brightness corresponding to a traffic light are stored; a pixel extracting part 65 which extracts pixels, the hue, the saturation, and the brightness of which are within the hue range, the saturation range, and the brightness range respectively, out of pixels converted by the color component conversion part 64; and an extracted image output part 72 which outputs an extracted image to an output device 4.

Description

本発明は、撮影画像内の信号灯を識別する技術に関し、特に、天候や時間帯等に関わらず、リアルタイムで信号灯を識別する信号灯識別プログラムおよび信号灯識別装置に関するものである。   The present invention relates to a technique for identifying a signal lamp in a captured image, and more particularly to a signal lamp identification program and a signal lamp identification apparatus for identifying a signal lamp in real time regardless of the weather, time zone, or the like.

近年、最先端の情報通信技術や車載センサ等を用いた様々な運転支援技術の開発が進められている。これからの高齢化社会を考えれば、このような運転支援技術はさらに進化していくものと考えられる。特に、信号灯の自動認識技術は、信号灯の見落とし等による交通事故を未然に防ぐものとして期待が大きい。また、近年導入されているLED光源の信号灯は、弱視の人には見えづらいとの指摘があるため、自動認識技術でサポートすることも考えられる。   In recent years, development of various driving support technologies using state-of-the-art information communication technology and in-vehicle sensors has been promoted. Given the future of an aging society, such driving assistance technologies are expected to evolve further. In particular, signal light automatic recognition technology is highly expected to prevent traffic accidents caused by oversight of signal lights. Moreover, since it has been pointed out that signal lights of LED light sources that have been introduced in recent years are difficult to see for people with low vision, it may be possible to support them with automatic recognition technology.

上述した信号灯の自動認識技術としては、電磁波を利用する方法と、ビデオカメラを利用する方法とが知られている。ITS(高度道路交通システム)では、電磁波を用いた装置の開発に重点が置かれているが、設備費用が膨大な上、未解決の問題も多いというのが現状である。   As the above-described automatic signal lamp recognition technology, a method using electromagnetic waves and a method using a video camera are known. In ITS (Intelligent Transport System), emphasis is placed on the development of devices using electromagnetic waves, but the current situation is that the equipment costs are enormous and there are many unsolved problems.

一方、ビデオカメラを用いた方法は、低コストで普及させやすいシステムが実現可能であり、テンプレートマッチングによる識別方法や、色情報に基づく識別方法等が提案されている。前者の方法は、予め用意したテンプレートと撮影画像とを比較し、その相関度が最も高い領域を信号灯として識別するものである(非特許文献1)。一方、後者の方法は、予め信号灯の色情報を蓄積し、閾値処理により撮影画像から信号灯を抽出するものである(非特許文献2)。   On the other hand, a method using a video camera can realize a system that is easy to spread at low cost, and an identification method based on template matching, an identification method based on color information, and the like have been proposed. In the former method, a template prepared in advance and a captured image are compared, and an area having the highest degree of correlation is identified as a signal lamp (Non-Patent Document 1). On the other hand, in the latter method, signal lamp color information is accumulated in advance, and a signal lamp is extracted from a captured image by threshold processing (Non-Patent Document 2).

中田祐士,子安大士,前川仁著「車載カメラを用いた動画像からの交通信号認識」(電子情報通信学会技術研究報告,ITS2007-56,IE2007-239(2008-02), pp.121-125.)Yuji Nakata, Daishi Koyasu, Hitoshi Maekawa "Traffic signal recognition from moving images using in-vehicle camera" (IEICE Technical Report, ITS2007-56, IE2007-239 (2008-02), pp.121- 125.) 木村文香,高橋友和,目加田慶人,井手一郎,村瀬洋著「安全運転支援のための多様な撮影環境における信号認識」(MIRU2006, pp.618-623(2006-7))Fumika Kimura, Tomokazu Takahashi, Yoshito Mekada, Ichiro Ide, Hiroshi Murase “Signal Recognition in Various Shooting Environments to Support Safe Driving” (MIRU2006, pp.618-623 (2006-7))

しかしながら、上記非特許文献1に記載された発明を含めて前者の方法は、テンプレートと撮影画像との相関度が、識別精度に大きな影響を与える。このため、信号灯の誤認識を回避するためには、予めテンプレートを撮影環境の明るさや信号灯の大きさ等に近づけるための前処理が必要となる。また、悪天候の場合や夜間の場合には信号灯の形が識別しにくいため、識別精度が低下してしまうという問題がある。   However, in the former method including the invention described in Non-Patent Document 1, the degree of correlation between the template and the captured image greatly affects the identification accuracy. For this reason, in order to avoid misrecognition of a signal lamp, pre-processing is required to bring the template close to the brightness of the shooting environment, the size of the signal lamp, and the like in advance. In addition, in the case of bad weather or at night, the shape of the signal light is difficult to identify, and there is a problem that the identification accuracy is lowered.

一方、上記非特許文献2に記載された発明を含めて後者の方法は、閾値の調整が難しく、識別精度に大きな影響を与えてしまうという問題がある。また、信号灯と紛らわしい色情報が背景中に多く存在するため、処理時間が遅くなるとともに、誤認識を減らすための処理を併用することも多い。このため、識別する画像範囲が広くなるほど、リアルタイムに識別処理ができなくなる。   On the other hand, the latter method including the invention described in Non-Patent Document 2 has a problem that it is difficult to adjust the threshold value and greatly affects the identification accuracy. In addition, since there is a lot of color information in the background that is confusing with the signal light, the processing time is slow and processing for reducing misrecognition is often used together. For this reason, the identification process cannot be performed in real time as the image range to be identified becomes wider.

さらに、上記いずれの方法も、様々な撮影条件下における信号灯に関するテンプレートデータや色情報を予め大量に蓄積する必要がある。このため、データの準備に手間がかかる上、システム全体のコストも増大してしまうという問題がある。   Furthermore, in any of the above methods, it is necessary to accumulate a large amount of template data and color information related to signal lights under various shooting conditions. For this reason, there are problems that it takes time to prepare data and the cost of the entire system also increases.

本発明は、このような問題点を解決するためになされたものであって、識別用のテンプレートデータ等を予め用意する必要がなく、また天候や時間帯等に関わらず、高精度かつリアルタイムに撮影画像内の信号灯を識別することができる信号灯識別プログラムおよび信号灯識別装置を提供することを目的としている。   The present invention has been made to solve such problems, and it is not necessary to prepare template data for identification in advance, and in high accuracy and real time regardless of the weather, time zone, etc. It is an object of the present invention to provide a signal lamp identification program and a signal lamp identification device that can identify a signal lamp in a captured image.

本発明に係る信号灯識別プログラムは、信号灯識別装置を、動画像から静止画像を取得する静止画像取得部と、下記変換式(1)〜(3)を用いて、前記静止画像を構成する各ピクセルのRGB成分(赤,緑,青)をHSV成分(色相,彩度,明度)に変換する色成分変換部と、信号灯に相当する色相のピクセルを抽出するための色相範囲を定める閾値、信号灯に相当する彩度のピクセルを抽出するための彩度範囲を定める閾値、および信号灯に相当する明度のピクセルを抽出するための明度範囲を定める閾値を記憶する抽出用閾値記憶部と、前記色成分変換部が変換した色相が前記色相範囲内であり、前記色成分変換部が変換した彩度が前記彩度範囲内であり、前記色成分変換部が変換した明度が前記明度範囲内にあるピクセルを抽出するピクセル抽出部と、前記ピクセル抽出部が抽出したピクセルからなる抽出画像を出力装置へ出力する抽出画像出力部として機能させるものであり、本発明に係る信号灯識別装置は、前記各構成部を有するものである。
色相(hue)=arctan(I/I) ・・・式(1)
彩度(saturation)=√(I +I ) ・・・式(2)
明度(intensity)=I ・・・式(3)
ただし、
(r,g,b)は、静止画像から得られた色情報(輝度値)
The signal lamp identification program according to the present invention uses the signal lamp identification apparatus to form each still image by using a still image acquisition unit that acquires a still image from a moving image and the following conversion equations (1) to (3). RGB component (red, green, blue) of the color component conversion unit that converts HSV components (hue, saturation, lightness), a threshold value that defines a hue range for extracting pixels of the hue corresponding to the signal light, and the signal light An extraction threshold value storage unit for storing a threshold value for determining a saturation range for extracting pixels of corresponding saturation and a threshold value for determining a lightness range for extracting pixels of brightness corresponding to a signal light; and the color component conversion The hue converted by the color component is within the hue range, the saturation converted by the color component conversion unit is within the saturation range, and the lightness converted by the color component conversion unit is within the lightness range. Extract It functions as an extracted image output unit that outputs an extracted image composed of pixels extracted by the pixel extracting unit and the pixel extracting unit to an output device, and the signal lamp identification device according to the present invention includes the above-described components. It is.
Hue = arctan (I y / I x ) (1)
Saturation = √ (I x 2 + I y 2 ) (2)
Intensity = I z Expression (3)
However,
(R, g, b) is color information (luminance value) obtained from a still image.

また、本発明において、前記抽出用閾値記憶部には、赤信号または黄信号を抽出するための色相範囲の閾値が−10度以上60度以下に設定されているとともに、青信号を抽出するための色相範囲の閾値が150度以上180度以下に設定されており、白色光源以外の光源を抽出するための彩度範囲の閾値が100以上に設定され、かつ、白色光源以外の光源を抽出するための明度範囲の閾値が50以上225未満に設定されていてもよい。   In the present invention, the extraction threshold storage unit has a hue range threshold for extracting a red signal or a yellow signal set to -10 degrees or more and 60 degrees or less, and for extracting a blue signal. The hue range threshold is set to 150 degrees or more and 180 degrees or less, the saturation range threshold for extracting light sources other than the white light source is set to 100 or more, and light sources other than the white light source are extracted. The brightness range threshold may be set to 50 or more and less than 225.

さらに、本発明において、前記抽出用閾値記憶部には、さらに、色飽和した青信号を抽出するための彩度範囲の閾値が100未満に設定され、かつ、色飽和した青信号を抽出するための明度範囲の閾値が225以上に設定されていてもよい。   Further, in the present invention, the extraction threshold storage unit further has a saturation range threshold for extracting a color-saturated blue signal set to less than 100, and brightness for extracting the color-saturated blue signal. The range threshold value may be set to 225 or more.

また、本発明において、前記色成分変換部が変換処理する前に、信号灯に近いRGB成分を有するピクセルを予めフィルタリングするためのフィルタリング用閾値を記憶するフィルタリング用閾値記憶部と、前記静止画像を構成する各ピクセルについて、RGB成分間の差分を算出するRGB差分算出部と、前記RGB成分算出部が算出した差分が、前記フィルタリング用閾値で定められた範囲内にあるピクセルをフィルタリングして取得するフィルタリング部として信号灯識別装置を機能させるとともに、前記フィルタリング用閾値記憶部には、赤信号、黄信号および青信号のフィルタリング用閾値として以下の閾値が設定されていてもよい。
赤信号:(R−G)+128≧255、かつ、(R−B)≧100
黄信号:(R−G)+128<255、かつ、(R−B)≧100
青信号:(R−G)+128<28、かつ、(B−G)≦0
ただし、R:R成分の輝度値 G:G成分の輝度値 B:B成分の輝度値
In the present invention, before the color component conversion unit performs conversion processing, a filtering threshold storage unit for storing a filtering threshold for filtering pixels having RGB components close to a signal lamp in advance, and the still image are configured. For each pixel to be processed, an RGB difference calculation unit that calculates a difference between RGB components, and a filtering in which the difference calculated by the RGB component calculation unit is obtained by filtering pixels within a range defined by the filtering threshold The signal light identification device functions as a unit, and the filtering threshold storage unit may be set with the following thresholds as filtering thresholds for a red signal, a yellow signal, and a blue signal.
Red signal: (R−G) + 128 ≧ 255 and (R−B) ≧ 100
Yellow signal: (R−G) +128 <255 and (R−B) ≧ 100
Green light: (R−G) +128 <28 and (B−G) ≦ 0
However, R: R component luminance value G: G component luminance value B: B component luminance value

さらに、本発明において、前記ピクセル抽出部が抽出したピクセルのうち、隣接する全てのピクセルにラベリングしてグループ化するラベリング部と、前記ラベリング部がグループ化したラベリング領域の中心点を算出する中心点算出部と、前記中心点算出部が算出した中心点と前記ラベリング領域の周縁部を構成するピクセルとの位置関係に基づいて、信号灯に近い形状のラベリング領域を選別する形状選別部として信号灯識別装置を機能させてもよく、本発明に係る信号灯識別装置は、上記各構成部を有していてもよい。   Furthermore, in the present invention, among the pixels extracted by the pixel extraction unit, a labeling unit that labels and groups all adjacent pixels, and a center point that calculates a center point of a labeling region that is grouped by the labeling unit A signal lamp identification device as a shape selection section for selecting a labeling area having a shape close to a signal lamp based on a positional relationship between a calculation section and a center point calculated by the center point calculation section and pixels constituting a peripheral portion of the labeling area The signal lamp identification device according to the present invention may have the above-described components.

また、本発明において、前記ピクセル抽出部が抽出したピクセルのうち、隣接する全てのピクセルにラベリングしてグループ化するラベリング部と、前記ラベリング部がグループ化したラベリング領域の上下距離と左右距離との差に基づいて、信号灯とは異なる形状のラベリング領域を選別する形状選別部として信号灯識別装置を機能させてもよく、本発明に係る信号灯識別装置は、上記各構成部を有していてもよい。   In the present invention, among the pixels extracted by the pixel extraction unit, a labeling unit that labels and groups all adjacent pixels, and a vertical distance and a horizontal distance of a labeling region grouped by the labeling unit Based on the difference, the signal lamp identification device may function as a shape selection unit that selects a labeling region having a shape different from that of the signal lamp, and the signal lamp identification device according to the present invention may include the above-described components. .

さらに、本発明において、前記ピクセル抽出部が抽出したピクセルのうち、隣接する全てのピクセルにラベリングしてグループ化するラベリング部と、前記ラベリング部がグループ化したラベリング領域の中心点を算出する中心点算出部と、前記中心点算出部が算出した中心点のオプティカルフローを取得するオプティカルフロー取得部と、前記オプティカルフロー取得部が取得したオプティカルフローに基づいて、信号灯以外のラベリング領域を選別する非対象領域選別部として信号灯識別装置を機能させてもよく、本発明に係る信号灯識別装置は、上記各構成部を有していてもよい。   Furthermore, in the present invention, among the pixels extracted by the pixel extraction unit, a labeling unit that labels and groups all adjacent pixels, and a center point that calculates a center point of a labeling region that is grouped by the labeling unit A calculation unit, an optical flow acquisition unit that acquires the optical flow of the center point calculated by the center point calculation unit, and a non-target that selects a labeling region other than the signal light based on the optical flow acquired by the optical flow acquisition unit The signal light identification device may function as an area selection unit, and the signal light identification device according to the present invention may include the above-described components.

本発明によれば、識別用のテンプレートデータ等を予め用意する必要がなく、また天候や時間帯等に関わらず、高精度かつリアルタイムに撮影画像内の信号灯を識別することができる。   According to the present invention, it is not necessary to prepare identification template data or the like in advance, and it is possible to identify a signal lamp in a captured image with high accuracy and in real time regardless of weather, time zone, or the like.

本発明に係る信号灯識別装置を含む信号灯識別システムの実施形態を示すブロック図である。It is a block diagram showing an embodiment of a signal light identification system including a signal light identification device according to the present invention. 本実施形態において、(a)色飽和した信号灯を示す静止画像、および(b)図2(a)の抽出画像である。In the present embodiment, (a) a still image showing a color saturated signal light, and (b) an extracted image of FIG. 2 (a). 本実施形態において、信号灯に相当するラベリング領域を示す図である。In this embodiment, it is a figure which shows the labeling area | region corresponded to a signal lamp. 本実施形態において、(a)信号灯を遠くから撮影した静止画像、および(b)図4(a)の抽出画像の拡大図である。In the present embodiment, (a) a still image obtained by photographing a signal lamp from a distance, and (b) an enlarged view of the extracted image of FIG. 4 (a). 本実施形態において、形状を選別するラベリング領域を示す図である。In this embodiment, it is a figure which shows the labeling area | region which classify | selects a shape. 本実施形態の信号灯識別プログラムにより実行される信号灯識別装置の処理を示すフローチャート図である。It is a flowchart figure which shows the process of the signal light identification device performed with the signal light identification program of this embodiment. 実施例1において、(a)青信号を撮影した静止画像、(b)白枠領域内のピクセルについて彩度および明度の関係を示すグラフ、(c)光源領域1内のピクセルを抽出した拡大画像、(d)光源領域2内のピクセルを抽出した拡大画像、(e)光源領域3内のピクセルを抽出した拡大画像である。In Example 1, (a) a still image obtained by capturing a blue signal, (b) a graph showing the relationship between saturation and lightness for pixels in the white frame region, (c) an enlarged image obtained by extracting pixels in the light source region 1, (D) An enlarged image obtained by extracting pixels in the light source region 2, and (e) an enlarged image obtained by extracting pixels in the light source region 3. 実施例1において、(a)赤信号を撮影した静止画像、(b)図8(a)内のピクセルについて彩度および明度の関係を示すグラフ、(c)光源領域1内のピクセルを抽出した画像である。In Example 1, (a) a still image obtained by photographing a red signal, (b) a graph showing the relationship between saturation and lightness for the pixels in FIG. 8 (a), and (c) pixels in the light source region 1 were extracted. It is an image. 実施例2において、使用したサンプル動画像の撮影日時および撮影時の天候を示す表である。In Example 2, it is a table | surface which shows the imaging | photography date and time of the sample moving image used, and the weather at the time of imaging | photography. 実施例2において、(a)彩度成分のヒストグラム分布を示すグラフ、(b)明度成分のヒストグラム分布を示すグラフである。In Example 2, (a) The graph which shows the histogram distribution of a saturation component, (b) The graph which shows the histogram distribution of a brightness component. 実施例3において、図7(c)の青信号を構成する全ピクセルの色相値を示す図である。In Example 3, it is a figure which shows the hue value of all the pixels which comprise the blue signal of FIG.7 (c). 実施例4において、(a)黄信号を含む静止画像、および(b)図12(a)の抽出画像の一部を示す拡大画像である。In Example 4, it is (a) the still image containing a yellow signal, and (b) the enlarged image which shows a part of extracted image of Fig.12 (a). 実施例4において、図12(b)の黄信号を構成する全ピクセルの色相値を示す図である。In Example 4, it is a figure which shows the hue value of all the pixels which comprise the yellow signal of FIG.12 (b). 実施例4において、(a)赤信号を含む静止画像、および(b)図14(a)の抽出画像の一部を示す拡大画像である。In Example 4, it is (a) the still image containing a red signal, and (b) the enlarged image which shows a part of extracted image of Fig.14 (a). 実施例4において、図14(b)の赤信号を構成する全ピクセルの色相値を示す図である。In Example 4, it is a figure which shows the hue value of all the pixels which comprise the red signal of FIG.14 (b). 実施例5において、各サンプル動画像について光源の抽出率を示すグラフである。In Example 5, it is a graph which shows the extraction rate of a light source about each sample moving image. 実施例6において、検証に使用した3枚の静止画像である。In Example 6, it is three still images used for verification. 実施例6において、ピクセル抽出処理のみ実行した場合の抽出画像である。In Example 6, it is an extraction image at the time of performing only a pixel extraction process. 実施例6において、フィルタリング処理およびピクセル抽出処理を実行した場合の抽出画像である。In Example 6, it is an extraction image at the time of performing a filtering process and a pixel extraction process. 実施例6において、フィルタリング処理、ピクセル抽出処理および形状選別処理を実行した場合の抽出画像である。In Example 6, it is an extraction image at the time of performing a filtering process, a pixel extraction process, and a shape selection process. 実施例7において、(a)青信号の前を一定速度で通過した場合に、中心点をプロットした図、(b)赤信号の前で徐々に減速して停車した場合に、中心点をプロットした図である。In Example 7, (a) the center point is plotted when passing in front of the green signal at a constant speed, and (b) the center point is plotted when the vehicle is gradually decelerated and stopped before the red signal. FIG.

以下、本発明に係る信号灯識別プログラムおよび信号灯識別装置の実施形態について図面を用いて説明する。   Hereinafter, embodiments of a signal lamp identification program and a signal lamp identification apparatus according to the present invention will be described with reference to the drawings.

図1は、本実施形態の信号灯識別システム1を示すブロック図であり、主として、信号灯を含む映像を撮影する撮影装置2と、この撮影装置2が撮影した映像内の信号灯を識別処理する信号灯識別装置3と、この信号灯識別装置3の識別処理結果に基づいて各種の映像や音声を出力する出力装置4とから構成されている。なお、本発明において、信号灯とは、青信号、黄信号および赤信号からなる自動車用信号機の信号灯の他、あらゆる信号機の信号灯を含む概念である。   FIG. 1 is a block diagram showing a signal lamp identification system 1 of the present embodiment. Mainly, a photographing apparatus 2 for photographing an image including a signal lamp and a signal lamp identification for identifying a signal lamp in an image photographed by the photographing apparatus 2. The apparatus 3 includes an output device 4 that outputs various images and sounds based on the identification processing result of the signal light identification device 3. In the present invention, the signal lamp is a concept including the signal lamps of all traffic signals in addition to the signal lamps of automobile traffic signals composed of a blue signal, a yellow signal and a red signal.

撮影装置2は、自動車や電車等に車載可能なデジタルビデオカメラ等によって構成されており、信号灯を含む映像を撮影するものである。本実施形態において、撮影装置2は、RGB(RED:赤,GREEN:緑,BLUE:青)成分を有する動画像をデジタル情報として撮影するようになっている。また、撮影装置2は、自動車の進行方向前方を撮影するようにセットされている。   The photographing device 2 is configured by a digital video camera or the like that can be mounted on a car, a train, or the like, and photographs an image including a signal light. In the present embodiment, the image capturing apparatus 2 captures a moving image having RGB (RED: red, GREEN: green, BLUE: blue) components as digital information. The photographing device 2 is set so as to photograph the front of the automobile in the traveling direction.

出力装置4は、自動車や電車等の運転手に対して、運転をアシストする映像や音声を出力するためのものである。本実施形態において、出力装置4は、信号灯識別装置3から出力された信号灯の抽出画像を表示する液晶ディスプレイや、赤信号が検出された際に警報の音声等を発するスピーカ等によって構成されている。   The output device 4 is for outputting video and audio for assisting driving to drivers such as cars and trains. In this embodiment, the output device 4 includes a liquid crystal display that displays an extracted image of the signal light output from the signal light identification device 3, a speaker that emits an alarm sound or the like when a red signal is detected, and the like. .

信号灯識別装置3は、車載可能なコンピュータ等によって構成されており、図1に示すように、主として、本実施形態の信号灯識別プログラム3aや各種のデータ等を記憶する記憶手段5と、この記憶手段5を制御するとともに各種のデータを取得して演算処理する演算処理手段6とから構成されている。なお、本実施形態の信号灯識別装置3は、撮影装置2および出力装置4と別体に構成しているが、一方ないし両者を一体化させた装置として構成してもよい。以下、各構成手段についてより詳細に説明する。   The signal lamp identification device 3 is configured by a vehicle-mounted computer or the like. As shown in FIG. 1, the signal lamp identification program 3a of the present embodiment, various data, and the like are mainly stored, and the storage means. 5 and an arithmetic processing means 6 that acquires various data and performs arithmetic processing. In addition, although the signal light identification device 3 of this embodiment is comprised separately from the imaging device 2 and the output device 4, you may comprise as one or the device which united both. Hereinafter, each constituent means will be described in more detail.

記憶手段5は、ROM(Read Only Memory)、RAM(Random Access Memory)、ハードディスク、フラッシュメモリ等によって構成されており、各種のデータを記憶するとともに、演算処理手段6が演算を行う際のワーキングエリアとして機能するものである。   The storage unit 5 includes a ROM (Read Only Memory), a RAM (Random Access Memory), a hard disk, a flash memory, and the like. The storage unit 5 stores various data and a working area when the arithmetic processing unit 6 performs the calculation. It functions as.

本実施形態において、記憶手段5は、図1に示すように、主として、プログラム記憶部51と、フィルタリング用閾値記憶部52と、抽出用閾値記憶部53とを有している。以下、各構成部についてより詳細に説明する。   In the present embodiment, as shown in FIG. 1, the storage unit 5 mainly includes a program storage unit 51, a filtering threshold storage unit 52, and an extraction threshold storage unit 53. Hereinafter, each component will be described in more detail.

プログラム記憶部51には、本実施形態の信号灯識別プログラム3aがインストールされている。そして、演算処理手段6が、信号灯識別プログラム3aを実行することにより、本実施形態の信号灯識別装置3を後述する各構成部として機能させるようになっている。なお、信号灯識別プログラム3aの利用形態は、上記構成に限られるものではなく、CD−ROM等の記録媒体に記憶させておき、この記録媒体から直接起動して実行し得るようにしてもよい。   The signal storage identification program 3a of this embodiment is installed in the program storage unit 51. The arithmetic processing means 6 executes the signal lamp identification program 3a, thereby causing the signal lamp identification apparatus 3 of this embodiment to function as each component described later. Note that the usage form of the signal lamp identification program 3a is not limited to the above configuration, but may be stored in a recording medium such as a CD-ROM, and directly started and executed from this recording medium.

フィルタリング用閾値記憶部52は、信号灯に近いRGB成分を有するピクセルを予めフィルタリングするためのフィルタリング用閾値を記憶するものである。本発明に係る信号灯識別処理は、後述するように、静止画像のRGB成分をHSV成分(色相,彩度,明度)に変換してから信号灯を識別する処理がメインとなる。しかしながら、本実施形態では、事前にRGB成分間の差分を用いたフィルタリング処理を実行することで、HSV成分へ変換するピクセル数を低減し、変換処理量の軽減による処理速度の向上を図っている。   The filtering threshold storage unit 52 stores a filtering threshold for filtering in advance a pixel having an RGB component close to a signal lamp. As will be described later, the signal lamp identification process according to the present invention is mainly a process of identifying a signal lamp after converting an RGB component of a still image into an HSV component (hue, saturation, brightness). However, in the present embodiment, the number of pixels to be converted into the HSV component is reduced by executing the filtering process using the difference between the RGB components in advance, and the processing speed is improved by reducing the conversion processing amount. .

具体的には、本実施形態において、フィルタリング用閾値記憶部52には、赤信号、黄信号および青信号のフィルタリング用閾値として、それぞれ以下の閾値が設定されている。
赤信号:(R−G)+128≧255、かつ、(R−B)≧100
黄信号:(R−G)+128<255、かつ、(R−B)≧100
青信号:(R−G)+128<28、かつ、(B−G)≦0
ただし、R:R成分の輝度値 G:G成分の輝度値 B:B成分の輝度値
Specifically, in the present embodiment, the following threshold values are set in the filtering threshold value storage unit 52 as the filtering threshold values for the red signal, the yellow signal, and the blue signal.
Red signal: (R−G) + 128 ≧ 255 and (R−B) ≧ 100
Yellow signal: (R−G) +128 <255 and (R−B) ≧ 100
Green light: (R−G) +128 <28 and (B−G) ≦ 0
However, R: R component luminance value G: G component luminance value B: B component luminance value

なお、本実施形態では、(R−G)の差分値が負にならないように128の値を加えてある。また、フィルタリング用閾値は、上記の閾値に限定されるものではなく、信号灯識別装置3の性能や、要求される識別精度に応じて適宜、変更してもよい。例えば、処理速度が速い信号灯識別装置3を使用する場合には、フィルタリング用閾値をより広範囲に設定してもよい。   In the present embodiment, a value of 128 is added so that the difference value of (R−G) does not become negative. Further, the filtering threshold value is not limited to the above threshold value, and may be appropriately changed according to the performance of the signal light identification device 3 and the required identification accuracy. For example, when the signal light identification device 3 having a high processing speed is used, the filtering threshold value may be set in a wider range.

抽出用閾値記憶部53は、信号灯に近いHSV成分を有するピクセルを抽出するための抽出用閾値を記憶するものである。本実施形態において、抽出用閾値記憶部53には、信号灯に相当する色相のピクセルを抽出するための色相範囲を定める閾値と、信号灯に相当する彩度のピクセルを抽出するための彩度範囲を定める閾値と、信号灯に相当する明度のピクセルを抽出するための明度範囲を定める閾値とが記憶されている。   The extraction threshold storage unit 53 stores an extraction threshold for extracting a pixel having an HSV component close to a signal lamp. In the present embodiment, the extraction threshold value storage unit 53 includes a threshold value that defines a hue range for extracting pixels having a hue corresponding to a signal light, and a saturation range for extracting pixels having a saturation corresponding to the signal light. A threshold value to be determined and a threshold value to determine a lightness range for extracting pixels having a lightness value corresponding to a signal light are stored.

具体的には、後述する実施例4の結果により、赤信号または黄信号を抽出するための色相範囲の閾値が、−10度以上60度以下に設定されている。また、後述する実施例3の結果により、青信号を抽出するための色相範囲の閾値が、150度以上180度以下に設定されている。さらに、後述する実施例1,2の結果により、白色光源以外の光源を抽出するための彩度範囲の閾値が、100以上に設定され、かつ、白色光源以外の光源を抽出するための明度範囲の閾値が、50以上225未満に設定されている。   Specifically, according to the result of Example 4 described later, the threshold of the hue range for extracting the red signal or the yellow signal is set to −10 degrees or more and 60 degrees or less. Further, according to the result of Example 3 described later, the hue range threshold for extracting the blue signal is set to 150 degrees or more and 180 degrees or less. Further, according to the results of Examples 1 and 2 to be described later, the saturation range threshold for extracting light sources other than the white light source is set to 100 or more, and the brightness range for extracting light sources other than the white light source is set. Is set to 50 or more and less than 225.

また、三色の信号灯のうち青信号は、色飽和が生じて白色として映る場合が多い。このため、本実施形態では、後述する実施例1の結果より、抽出用閾値記憶部53には、さらに、色飽和した青信号を抽出するための彩度範囲の閾値が、100未満に設定され、かつ、色飽和した青信号を抽出するための明度範囲の閾値が、225以上に設定されている。なお、本実施形態において、色飽和した青信号には、白色の光源も含まれている。また、色飽和が発生しにくい撮影条件の場合には、本閾値を設定しなくてもよい。   Of the three color signal lights, the blue signal often appears as white due to color saturation. For this reason, in the present embodiment, from the result of Example 1 described later, the extraction threshold storage unit 53 further sets the saturation range threshold for extracting the color-saturated blue light to less than 100, In addition, the threshold value of the brightness range for extracting a blue signal with color saturation is set to 225 or more. In the present embodiment, the color-saturated blue signal includes a white light source. In addition, in the case of shooting conditions where color saturation is unlikely to occur, this threshold need not be set.

なお、本実施形態において、HSV成分を構成する色相、彩度、明度は、色の三属性と呼ばれるものである。このうち色相(hue)とは、いわゆる色合いであり、有彩色の色を他の色と区別するための特質を示すものである。また、彩度(saturation)とは、色の鮮やかさの度合いを示すものである。さらに、明度(intensity)とは、色の明るさの度合いを示すものである。   In the present embodiment, the hue, saturation, and lightness constituting the HSV component are called three attributes of color. Among them, the hue is a so-called hue and indicates a characteristic for distinguishing a chromatic color from other colors. The saturation indicates the degree of vividness of the color. Further, the intensity indicates the degree of color brightness.

演算処理手段6は、CPU(Central Processing Unit)等から構成されており、記憶手段5にインストールされた信号灯識別プログラム3aを実行させることにより、図1に示すように、静止画像取得部61と、RGB差分算出部62と、フィルタリング部63と、色成分変換部64と、ピクセル抽出部65と、抽出画像作成部66と、ラベリング部67と、中心点算出部68と、形状選別部69と、オプティカルフロー取得部70と、非対象領域選別部71と、抽出画像出力部72として信号灯識別装置3を機能させるようになっている。以下、各構成部についてより詳細に説明する。   The arithmetic processing means 6 is composed of a CPU (Central Processing Unit) or the like, and by executing a signal lamp identification program 3a installed in the storage means 5, as shown in FIG. RGB difference calculation unit 62, filtering unit 63, color component conversion unit 64, pixel extraction unit 65, extracted image creation unit 66, labeling unit 67, center point calculation unit 68, shape selection unit 69, The signal light identification device 3 is caused to function as an optical flow acquisition unit 70, a non-target region selection unit 71, and an extracted image output unit 72. Hereinafter, each component will be described in more detail.

静止画像取得部61は、撮影装置2が撮影した動画像から静止画像を取得するためのものである。本実施形態において、静止画像取得部61は、撮影装置2から動画像データを入力し、当該動画像データから所定の時間間隔で静止画像をキャプチャーするようになっている。   The still image acquisition unit 61 is for acquiring a still image from a moving image captured by the imaging device 2. In the present embodiment, the still image acquisition unit 61 inputs moving image data from the photographing apparatus 2 and captures a still image from the moving image data at a predetermined time interval.

RGB差分算出部62は、静止画像を構成する各ピクセルについて、RGB成分間の差分を算出するものである。本実施形態において、RGB差分算出部62は、静止画像取得部61が取得した静止画像を構成する1ピクセルごとに、RGB成分に関する色情報を取得する。そして、RGB成分間の差分として、(R−G)、(R−B)および(B−G)の値を算出するようになっている。   The RGB difference calculation unit 62 calculates a difference between RGB components for each pixel constituting the still image. In the present embodiment, the RGB difference calculation unit 62 acquires color information related to RGB components for each pixel constituting the still image acquired by the still image acquisition unit 61. Then, the values of (R−G), (R−B) and (B−G) are calculated as differences between the RGB components.

フィルタリング部63は、信号灯に近いRGB成分を有するピクセルを予めフィルタリングして取得するものである。本実施形態において、フィルタリング部63は、RGB差分算出部62が算出したRGB成分間の差分(R−G)、(R−B)および(B−G)の値を取得し、これらの差分が、フィルタリング用閾値記憶部52内のフィルタリング用閾値で定められた範囲内にあるピクセルを抽出するようになっている。   The filtering unit 63 obtains a pixel having an RGB component close to that of a signal lamp by filtering in advance. In the present embodiment, the filtering unit 63 acquires the values (R−G), (R−B), and (B−G) between the RGB components calculated by the RGB difference calculation unit 62, and these differences are obtained. The pixels within the range defined by the filtering threshold value in the filtering threshold value storage unit 52 are extracted.

なお、フィルタリング部63がRGB成分間の差分を用いる理由は、各ピクセルの色情報が、天候や太陽光の反射によって大きく変化することに起因する。つまり、RGB成分間の差分を利用し、天候に大きく影響される色成分を比較対象から除外することで、安定したフィルタリング処理を可能としている。例えば、赤信号ならG成分を除外し、青信号ならB成分を除外することで、天候による影響が低減されることとなる。   The reason why the filtering unit 63 uses the difference between the RGB components is that the color information of each pixel changes greatly due to weather or sunlight reflection. That is, by using the difference between the RGB components and excluding the color component that is greatly influenced by the weather from the comparison target, stable filtering processing is enabled. For example, the influence of the weather is reduced by excluding the G component if it is a red signal and excluding the B component if it is a blue signal.

また、(R−G)の差分値を用いることで、一般的に判別が困難とされている赤信号と黄信号との識別も可能となる。つまり、赤信号のRGB値は(255,0,0)近傍であり、黄信号のRBG値は(255,255,0)近傍であるが、これらは天候等によって変化する。しかし、赤信号と黄信号とではG成分が大きく異なる上、各色の(R−G)の値は、天候によってそれほど変化しないことを見い出し、(R−G)の値を用いている。   Further, by using the difference value of (R−G), it is possible to distinguish between a red signal and a yellow signal that are generally difficult to distinguish. That is, the RGB value of the red signal is in the vicinity of (255, 0, 0) and the RBG value of the yellow signal is in the vicinity of (255, 255, 0), but these change depending on the weather or the like. However, the G component is greatly different between the red signal and the yellow signal, and the value of (RG) of each color is found not to change so much depending on the weather, and the value of (RG) is used.

なお、本フィルタリング処理は、上述したように、RGB成分からHSV成分への変換処理速度を向上させるための処理である。このため、処理速度の速い演算処理手段6を有する信号灯識別装置3を使用する場合等には、実行しなくてもよい。   Note that the filtering process is a process for improving the conversion processing speed from the RGB component to the HSV component as described above. For this reason, when using the signal light identification apparatus 3 which has the arithmetic processing means 6 with a high processing speed, it does not need to perform.

色成分変換部64は、各ピクセルのRGB成分をHSV成分へ変換するためのものである。本実施形態において、色成分変換部64は、フィルタリング部63が抽出した各ピクセルごとにRGB成分を取得し、下記変換式(1)〜(3)を用いてHSV成分へ変換するようになっている。
色相(hue)=arctan(I/I) ・・・式(1)
彩度(saturation)=√(I +I ) ・・・式(2)
明度(intensity)=I ・・・式(3)
ただし、
(r,g,b)は、静止画像から得られた色情報(輝度値)
The color component conversion unit 64 is for converting the RGB component of each pixel into an HSV component. In the present embodiment, the color component conversion unit 64 acquires an RGB component for each pixel extracted by the filtering unit 63 and converts it into an HSV component using the following conversion formulas (1) to (3). Yes.
Hue = arctan (I y / I x ) (1)
Saturation = √ (I x 2 + I y 2 ) (2)
Intensity = I z Expression (3)
However,
(R, g, b) is color information (luminance value) obtained from a still image.

なお、本実施形態において、HSV成分に変換する理由は、色相(hue)成分が、色により決まった値を有することにある。具体的には、青信号、黄信号および赤信号のうち、黄信号は、赤色と緑色の混色であり、青信号は、緑色と青色の混色である。このため、黄信号および青信号を抽出するには、それぞれ2つのRGB成分をパラメータとして使用しなければならず、色の指定が困難である。これに対し、HSV成分に変換すると、色相成分を指定するだけで、様々な色が高精度かつ容易に抽出される。   In the present embodiment, the reason for conversion to the HSV component is that the hue component has a value determined by the color. Specifically, among the blue signal, the yellow signal, and the red signal, the yellow signal is a mixed color of red and green, and the blue signal is a mixed color of green and blue. For this reason, in order to extract a yellow signal and a blue signal, two RGB components must be used as parameters, respectively, and it is difficult to specify a color. On the other hand, when converted into the HSV component, various colors can be extracted with high accuracy and easily simply by designating the hue component.

なお、本実施形態では、上述したフィルタリング処理を実行しているため、色成分変換部64は、フィルタリング部63が抽出したピクセルについてのみ、変換処理を実行している。しかしながら、フィルタリング処理を実行しない場合、色成分変換部64は、静止画像取得部61から直接、静止画像を取得し、全ピクセルについて変換処理を実行するようにしてもよい。   In the present embodiment, since the filtering process described above is performed, the color component conversion unit 64 performs the conversion process only for the pixels extracted by the filtering unit 63. However, when the filtering process is not executed, the color component conversion unit 64 may acquire the still image directly from the still image acquisition unit 61 and execute the conversion process for all the pixels.

ピクセル抽出部65は、信号灯に合致するHSV成分を有するピクセルを抽出するためのものである。本実施形態において、ピクセル抽出部65は、色成分変換部64が変換処理した各ピクセルごとに、色相、彩度および明度を取得するとともに、抽出用閾値記憶部53に記憶された色相範囲、彩度範囲および明度範囲を参照する。そして、当該色相が色相範囲内であり、当該彩度が彩度範囲内であり、当該明度が明度範囲内にあるピクセルを抽出するようになっている。   The pixel extraction unit 65 is for extracting a pixel having an HSV component that matches the signal lamp. In the present embodiment, the pixel extraction unit 65 acquires the hue, saturation, and brightness for each pixel converted by the color component conversion unit 64, and the hue range, saturation, and color stored in the extraction threshold storage unit 53. Refer to the degree range and the brightness range. Then, pixels whose hue is within the hue range, whose saturation is within the saturation range, and whose brightness is within the brightness range are extracted.

抽出画像作成部66は、信号灯に相当するピクセル領域のみを明瞭にした抽出画像を作成するものである。本実施形態において、抽出画像作成部66は、ピクセル抽出部65が抽出した全ピクセルをそのまま残す一方、それ以外の全ピクセルを黒色に変換処理して抽出画像を作成するようになっている。なお、信号灯以外のピクセルは、黒色に限定されるものではなく、信号灯と区別できる色であればどのような色でもよい。   The extracted image creating unit 66 creates an extracted image in which only a pixel region corresponding to a signal lamp is clarified. In the present embodiment, the extracted image creating unit 66 leaves all the pixels extracted by the pixel extracting unit 65 as it is, and creates an extracted image by converting all other pixels to black. The pixels other than the signal light are not limited to black, and may be any color as long as the color can be distinguished from the signal light.

ラベリング部67は、信号灯に相当する領域を構成するピクセルをグループ化するためのものである。本実施形態において、ラベリング部67は、抽出画像作成部66が作成した抽出画像において、ピクセル抽出部65が抽出した全ピクセルの情報を取得する。そして、当該ピクセルのうち、隣接する全てのピクセルにラベリングしてグループ化するようになっている。   The labeling unit 67 is for grouping pixels constituting an area corresponding to a signal lamp. In the present embodiment, the labeling unit 67 acquires information on all pixels extracted by the pixel extracting unit 65 in the extracted image created by the extracted image creating unit 66. Of the pixels, all adjacent pixels are labeled and grouped.

なお、本実施形態において、ラベリングとは、1つの信号灯の画像を構成する全てのピクセルに対して、番号、文字、記号等の同一ラベルを付与する処理である。また、このラベリング処理によってグループ化された各領域をラベリング領域と定義する。なお、一般的に、信号機は目立つように設置されており、信号灯の周囲は信号機の本体である。このため、抽出画像において、信号灯に相当する領域は、周囲から独立していると推測できる。よって、本実施形態において、ラベリング部67は、単なるグループ化処理を実行するだけで他の領域と区別することができる。   In the present embodiment, labeling is a process of assigning the same label such as a number, a character, and a symbol to all the pixels constituting one signal lamp image. Further, each region grouped by this labeling process is defined as a labeling region. In general, the traffic light is prominently installed, and the periphery of the traffic light is the main body of the traffic light. For this reason, in the extracted image, it can be estimated that the region corresponding to the signal lamp is independent from the surroundings. Therefore, in the present embodiment, the labeling unit 67 can be distinguished from other regions simply by executing a grouping process.

中心点算出部68は、ラベリング領域の中心点を算出するためのものである。一般的に、信号灯を撮影した場合、図2(a)に示すように、信号灯の中心部が色飽和して白色となる場合が多い。このため、抽出画像におけるラベリング領域は、図2(b)に示すように、中心部に穴が空いたドーナツ状となる。そこで、本実施形態では、中心点を基準にすることで、色飽和した部分に関係なく、信号灯に係るラベリング領域の形状を判別するようになっている。   The center point calculation unit 68 is for calculating the center point of the labeling region. In general, when a signal lamp is photographed, as shown in FIG. 2 (a), the central portion of the signal lamp is often saturated with white color. For this reason, the labeling region in the extracted image has a donut shape with a hole in the center as shown in FIG. Therefore, in the present embodiment, the shape of the labeling region related to the signal light is determined regardless of the color saturated portion by using the center point as a reference.

具体的には、中心点算出部68は、まず、ラベリング部67がグループ化した各ラベリング領域について、下記算出式を用いて、中心点となる座標(x,y)を算出する。
ただし、Nは、ラベリング領域のエッジ(縁部)を構成するピクセルの数であり、(x,yi)は、ラベリング領域のエッジを構成するNピクセルのうち、i番目のピクセルのxy座標である。
Specifically, the center point calculation unit 68 first calculates coordinates (x c , y c ) serving as the center point for each labeling region grouped by the labeling unit 67 using the following calculation formula.
Here, N is the number of pixels constituting the edge (edge) of the labeling region, and (x i , y i ) is the xy coordinates of the i-th pixel among the N pixels constituting the edge of the labeling region. It is.

例えば、図3に示すような円形に相当するラベリング領域について、中心点を算出する場合、ラベリング領域のエッジを構成するピクセルは、斜線を付したピクセルであり、N=12である。そして、各12ピクセルのx座標およびy座標の総和を12で除算することで、中心点座標(x,y)が算出される。 For example, when the center point is calculated for a labeling area corresponding to a circle as shown in FIG. 3, the pixels constituting the edge of the labeling area are hatched pixels, and N = 12. Then, the center point coordinates (x c , y c ) are calculated by dividing the sum of the x and y coordinates of each 12 pixel by 12.

つぎに、中心点算出部68は、ラベリング領域の上下端および左右端となる4ピクセルのxy座標を取得し、下記式により、左右方向に関して中心となる座標X、および上下方向に関して中心となる座標Yを算出する。
X=(右端のx座標+左端のx座標)/2
Y=(上端のy座標+下端のy座標)/2
そして、この座標(X,Y)と中心点座標(x,y)との誤差σが、所定の範囲内である場合、中心点座標(x,y)は正しいと判断するようになっている。
Next, the center point calculation unit 68 acquires the xy coordinates of the four pixels that are the upper and lower ends and the left and right ends of the labeling region, and the coordinate X that is the center in the horizontal direction and the coordinate that is the center in the vertical direction by the following formula Y is calculated.
X = (x coordinate of right end + x coordinate of left end) / 2
Y = (y coordinate of upper end + y coordinate of lower end) / 2
When the error σ between the coordinates (X, Y) and the center point coordinates (x c , y c ) is within a predetermined range, the center point coordinates (x c , y c ) are determined to be correct. It has become.

なお、本実施形態において、上記誤差σは2ピクセル程度に設定されているが、これに限定されるものではなく、要求される識別精度に応じて、適宜変更してもよい。また、本実施形態では、上記のように、中心点座標の妥当性を検算しているが、当該処理を実行せずに処理を進めることも可能である。   In the present embodiment, the error σ is set to about 2 pixels. However, the error σ is not limited to this, and may be appropriately changed according to required identification accuracy. In the present embodiment, as described above, the validity of the center point coordinates is calculated, but the processing can be advanced without executing the processing.

形状選別部69は、信号灯に近い形状のラベリング領域を選別するためのものである。信号灯は円形であるが、図4(a)に示すように、信号灯(図4(a)中の矢印部分)を遠くから撮影した場合、抽出画像における信号灯の形状は、図4(b)に示すように、円形ではなく正方形に近い形状となるケースが多い。このため、本実施形態において、形状選別部69は、円形または正方形に近いラベリング領域を信号灯であるとして選別するようになっている。   The shape selecting unit 69 is for selecting a labeling region having a shape close to a signal lamp. Although the signal lamp is circular, as shown in FIG. 4A, when the signal lamp (arrow part in FIG. 4A) is photographed from a distance, the shape of the signal lamp in the extracted image is as shown in FIG. As shown, there are many cases where the shape is not a circle but a square. For this reason, in this embodiment, the shape selection part 69 selects the labeling area | region close | similar to circular or square as a signal lamp.

具体的には、形状選別部69は、各ラベリング領域について、中心点算出部68が算出した中心点と、この中心点から上下左右方向に最も離れた4ピクセルの位置情報を取得する。そして、上下左右の各ピクセルが、中心点からほぼ等距離にあるラベリング領域は、円形または正方形であると判定する。一方、それ以外のラベリング領域は、信号灯ではないと判断し、黒色に変換する。   Specifically, the shape selection unit 69 acquires, for each labeling region, the center point calculated by the center point calculation unit 68 and the position information of the four pixels farthest from the center point in the vertical and horizontal directions. Then, the labeling region in which the upper, lower, left, and right pixels are approximately equidistant from the center point is determined to be circular or square. On the other hand, the other labeling areas are determined not to be signal lights and are converted to black.

なお、形状選別部69による信号灯の選別方法は、上記の方法に限定されるものではなく、中心点を用いずに選別することもできる。具体的には、図5に示すようなラベリング領域Dを選別する場合、形状選別部69が、下記式を満たすか否かを判定する。
|(xmax−xmin)−(ymax−ymin)|≦C
ただし、
max:ラベリング領域を構成するピクセルのx座標の最大値
min:ラベリング領域を構成するピクセルのx座標の最小値
max:ラベリング領域を構成するピクセルのy座標の最大値
min:ラベリング領域を構成するピクセルのy座標の最小値
C:定数
Note that the method of selecting the signal lamp by the shape selecting unit 69 is not limited to the above method, and it is also possible to select without using the center point. Specifically, when the labeling region D as shown in FIG. 5 is selected, the shape selection unit 69 determines whether or not the following formula is satisfied.
| (X max −x min ) − (y max −y min ) | ≦ C
However,
x max : Maximum value of the x coordinate of the pixels constituting the labeling region x min : Minimum value of the x coordinate of the pixels constituting the labeling region y max : Maximum value of the y coordinate of the pixels constituting the labeling region y min : Labeling region Minimum value of y-coordinates of the pixels constituting the C: constant

そして、上記式を満たさない場合、つまり、ラベリング領域の上下距離と左右距離との差が大きい場合、円形や正方形とは考えられないため、当該ラベリング領域を除外する。これにより、細長い看板等のように、縦横の長さ比が異なる対象物が除外されて識別精度が向上する。また、この方法によれば、中心点を算出する処理が不要となるため、処理速度が向上する。なお、定数Cは、要求される選別精度に応じて適宜設定すればよい。   If the above expression is not satisfied, that is, if the difference between the vertical distance and the horizontal distance of the labeling area is large, the labeling area is excluded because it cannot be considered as a circle or a square. As a result, objects with different length-to-width ratios, such as elongated signboards, are excluded, and the identification accuracy is improved. Further, according to this method, the processing speed is improved because the processing for calculating the center point is not required. The constant C may be set as appropriate according to the required sorting accuracy.

本実施形態において、上述したラベリング部67、中心点算出部68および形状選別部69による処理は、抽出画像におけるラベリング領域をさらに形状で選別することによって、識別精度を向上するオプション的処理である。このため、形状選別処理を実行しなくても、十分な識別精度が得られる場合等には、ラベリング部67、中心点算出部68および形状選別部69を機能させなくてもよい。   In the present embodiment, the above-described processing by the labeling unit 67, the center point calculating unit 68, and the shape selecting unit 69 is an optional process for improving the identification accuracy by further selecting the labeling region in the extracted image by the shape. For this reason, the labeling unit 67, the center point calculation unit 68, and the shape selection unit 69 do not need to function when sufficient identification accuracy is obtained without executing the shape selection process.

オプティカルフロー取得部70は、各ラベリング領域のオプティカルフローを取得するためのものである。ここで、オプティカルフローとは、時間的に連続する静止画像において、ある物体がどの方向に動いたかの軌跡を示すものである。本実施形態において、オプティカルフロー取得部70は、形状選別部69が選別処理した後の抽出画像を時系列的に取得する。そして、各抽出画像に含まれる各ラベリング領域について、中心点算出部68が算出した中心点を順次取得し、その軌跡であるオプティカルフローを取得するようになっている。   The optical flow acquisition unit 70 is for acquiring the optical flow of each labeling area. Here, the optical flow indicates a trajectory as to which direction an object moves in a temporally continuous still image. In the present embodiment, the optical flow acquisition unit 70 acquires the extracted images after the shape selection unit 69 performs the selection process in time series. Then, for each labeling region included in each extracted image, the center point calculated by the center point calculation unit 68 is sequentially acquired, and the optical flow that is the trajectory is acquired.

なお、オプティカルフロー取得部70によるオプティカルフローの取得方法は、特に限定されるものではなく、例えば、勾配法やブロックマッチング法等が挙げられる。   In addition, the acquisition method of the optical flow by the optical flow acquisition part 70 is not specifically limited, For example, the gradient method, a block matching method, etc. are mentioned.

非対象領域選別部71は、ラベリング領域のオプティカルフローに基づいて、信号灯以外のラベリング領域を選別するためのものである。本実施形態において、非対象領域選別部71は、オプティカルフロー取得部70が取得したオプティカルフローを取得し、当該オプティカルフローが所定の軌跡に近似できるか否かを判別する。その結果、近似できた場合、当該オプティカルフローを有するラベリング領域は信号灯であると判定する。一方、近似できない場合、当該ラベリング領域は、信号灯以外のテールランプやブレーキランプ等であると判定し、黒色に変換するようになっている。   The non-target area selection unit 71 is for selecting a labeling area other than the signal lamp based on the optical flow of the labeling area. In the present embodiment, the non-target region selection unit 71 acquires the optical flow acquired by the optical flow acquisition unit 70, and determines whether or not the optical flow can be approximated to a predetermined trajectory. As a result, when the approximation is possible, it is determined that the labeling area having the optical flow is a signal lamp. On the other hand, if it cannot be approximated, the labeling area is determined to be a tail lamp or a brake lamp other than the signal lamp, and is converted to black.

なお、本実施形態では、後述する実施例7の結果に基づいて、非対象領域選別部71は、オプティカルフローが直線または曲線に近似できる場合に、信号灯であると判定するようになっている。   In the present embodiment, based on the result of Example 7 to be described later, the non-target region selection unit 71 determines that it is a signal lamp when the optical flow can be approximated to a straight line or a curve.

本実施形態において、上述したオプティカルフロー取得部70および非対象領域選別部71による処理は、抽出画像におけるラベリング領域をさらにその移動軌跡で選別することによって、識別精度を向上するオプション的処理である。このため、当該処理を実行しなくても、十分な識別精度が得られる場合等には、オプティカルフロー取得部70および非対象領域選別部71を機能させなくてもよい。   In the present embodiment, the above-described processing by the optical flow acquisition unit 70 and the non-target region selection unit 71 is an optional process that improves the identification accuracy by further selecting the labeling region in the extracted image by its movement locus. For this reason, the optical flow acquisition unit 70 and the non-target region selection unit 71 do not need to function when sufficient identification accuracy is obtained without executing the processing.

抽出画像出力部72は、信号灯に合致するピクセルが抽出された抽出画像を出力装置4へ出力するためのものである。本実施形態において、抽出画像出力部72は、非対象領域選別部71で選別処理された抽出画像を取得し、出力装置4へ出力するようになっている。なお、オプティカルフロー処理を実行しない場合、抽出画像出力部72は、形状選別部69から抽出画像を取得する。また、形状選別処理およびオプティカルフロー処理を実行しない場合、抽出画像出力部72は、抽出画像作成部66から直接抽出画像を取得する。   The extracted image output unit 72 is for outputting an extracted image from which pixels matching the signal lamp are extracted to the output device 4. In the present embodiment, the extracted image output unit 72 acquires the extracted image subjected to the sorting process by the non-target region sorting unit 71 and outputs it to the output device 4. When the optical flow process is not executed, the extracted image output unit 72 acquires an extracted image from the shape selecting unit 69. When the shape selection process and the optical flow process are not executed, the extracted image output unit 72 acquires an extracted image directly from the extracted image creation unit 66.

つぎに、本実施形態の信号灯識別プログラム3aによって実行される信号灯識別装置3と、この信号灯識別装置3を含む信号灯識別システム1の作用につき、図6を参照しつつ説明する。   Next, the operation of the signal lamp identification apparatus 3 executed by the signal lamp identification program 3a of the present embodiment and the signal lamp identification system 1 including the signal lamp identification apparatus 3 will be described with reference to FIG.

本実施形態の信号灯識別システム1を用いて、動画像内の信号灯をリアルタイムに識別する場合、まず、静止画像取得部61が、撮影装置2によって撮影された動画像から静止画像を取得する(ステップS1)。   When the signal lamp in the moving image is identified in real time using the signal lamp identification system 1 of the present embodiment, first, the still image acquisition unit 61 acquires a still image from the moving image captured by the imaging device 2 (step) S1).

つぎに、RGB差分算出部62が、静止画像を構成する各ピクセルについて、RGB成分間の差分を算出した後(ステップS2)、フィルタリング部63によって、当該RGB成分間の差分がフィルタリング用閾値で定められた範囲内にあるピクセルを抽出する(ステップS3)。   Next, after the RGB difference calculation unit 62 calculates the difference between the RGB components for each pixel constituting the still image (step S2), the filtering unit 63 determines the difference between the RGB components as a filtering threshold value. Pixels within the specified range are extracted (step S3).

これにより、信号灯に近いRGB成分を有するピクセルが予め抽出されるため、次のステップS4で変換処理するピクセル数が減少し、処理速度が向上する。また、天候に大きく影響される色成分を比較対象から除外するようにRGB成分間の差分を利用するため、フィルタリング処理が安定化する。さらに、RGB成分間の差分を利用することで、赤信号と黄信号との識別精度も向上する。   Thereby, since the pixel which has RGB component close | similar to a signal lamp is extracted previously, the pixel number which carries out the conversion process by the following step S4 reduces, and processing speed improves. Further, since the difference between the RGB components is used so as to exclude the color component greatly influenced by the weather from the comparison target, the filtering process is stabilized. Furthermore, by using the difference between the RGB components, the discrimination accuracy between the red signal and the yellow signal is improved.

つづいて、色成分変換部64が、ステップS3でフィルタリングされた各ピクセルごとにRGB成分を取得し、HSV成分へ変換する(ステップS4)。これにより、色相における色分布が一様となるため、色相の閾値を指定するだけで、あらゆる色を正確に抽出することが容易になる。また、天候や時間帯等に関係なく、一定領域にヒストグラムが分布するため、光源が安定して抽出される。さらに、本実施形態では、ステップS3でフィルタリング処理を実行しているため、本ステップS4の処理速度が向上する。   Subsequently, the color component conversion unit 64 acquires an RGB component for each pixel filtered in step S3 and converts it into an HSV component (step S4). Thereby, since the color distribution in the hue becomes uniform, it becomes easy to accurately extract all colors only by designating the hue threshold. Further, since the histogram is distributed in a certain region regardless of the weather, time zone, etc., the light source is stably extracted. Furthermore, in this embodiment, since the filtering process is executed in step S3, the processing speed of this step S4 is improved.

つぎに、ピクセル抽出部65が、ステップS4で変換処理された各ピクセルごとにHSV成分を取得し、各成分が抽出用閾値で定められた範囲内にあるピクセルを抽出する(ステップS5)。これにより、青信号、黄信号および赤信号の色相、彩度、明度に相当するピクセルが抽出される。また、本実施形態では、別途、色飽和した青信号も抽出するため、青信号の抽出率が向上する。   Next, the pixel extraction unit 65 acquires an HSV component for each pixel converted in step S4, and extracts a pixel in which each component is within the range defined by the extraction threshold (step S5). As a result, pixels corresponding to the hue, saturation, and brightness of the blue signal, yellow signal, and red signal are extracted. In the present embodiment, since the blue signal with color saturation is also extracted separately, the extraction rate of the blue signal is improved.

以上のステップS2〜S5は、ピクセルベースで実行される処理である。このため、演算処理手段6にかかる処理負荷が小さく、高フレームレートの動画像であってもリアルタイムに処理が可能となる。   The above steps S2 to S5 are processes executed on a pixel basis. For this reason, the processing load applied to the arithmetic processing means 6 is small, and even a moving image with a high frame rate can be processed in real time.

つぎに、抽出画像作成部66が、ステップS5で抽出されたピクセルを残す一方、それ以外のピクセルを黒色に変換し抽出画像を作成する(ステップS6)。これにより抽出画像では、黒色の背景に信号灯のみが際立つため明瞭となる。このため、高齢者や弱視者であっても迅速かつ容易に信号の存在に気付くことが可能となる。   Next, the extracted image creation unit 66 leaves the pixels extracted in step S5, while creating the extracted image by converting other pixels to black (step S6). As a result, the extracted image is clear because only the signal lamp stands out against the black background. For this reason, even an elderly person or a low vision person can notice the presence of a signal quickly and easily.

つぎに、本実施形態では、ステップS6で作成された抽出画像の精度をより高めるため、以下のステップS7〜ステップS11の処理を実行する。まず、ラベリング部67が、抽出画像内で抽出された全ピクセルの情報を取得し、隣接する全てのピクセルにラベリングする(ステップS7)。これにより、抽出画像においては、1つの物体に相当するピクセル領域ごとに、グループ化される。   Next, in the present embodiment, in order to further improve the accuracy of the extracted image created in step S6, the following steps S7 to S11 are executed. First, the labeling unit 67 acquires information on all pixels extracted in the extracted image, and labels all adjacent pixels (step S7). As a result, the extracted image is grouped for each pixel area corresponding to one object.

つづいて、中心点算出部68が、ステップS7でグループ化された各ラベリング領域について、中心点座標を算出する(ステップS8)。これにより、次のステップS9で信号灯の形状を判別する際、ラベリング領域の中心点を基準として利用することができる。また、後述するステップS10において、オプティカルフローが容易に取得される。さらに、本実施形態では、上記算出式で算出した中心点座標が正しいか否かを検算するため、正確に中心点が算出される。   Subsequently, the center point calculation unit 68 calculates center point coordinates for each labeling region grouped in step S7 (step S8). Thereby, when determining the shape of the signal lamp in the next step S9, the center point of the labeling area can be used as a reference. In step S10 described later, an optical flow is easily acquired. Furthermore, in the present embodiment, the center point is accurately calculated in order to check whether the center point coordinates calculated by the above calculation formula are correct.

つぎに、形状選別部69が、各ラベリング領域について、ステップS8で算出された中心点と、周縁部のピクセルの位置情報とを取得し、信号灯に近い形状のラベリング領域を選別する(ステップS9)。これにより、街頭やネオンサイン等のように、信号灯とは異なる形状の光源が除外され、識別精度が向上する。また、中心点を基準に選別するため、色飽和が生じた信号灯であっても、その形状が精度良く判別される。   Next, the shape selection unit 69 acquires the center point calculated in step S8 and the position information of the peripheral pixel for each labeling region, and selects a labeling region having a shape close to a signal lamp (step S9). . As a result, light sources having shapes different from signal lights such as streets and neon signs are excluded, and the identification accuracy is improved. In addition, since the selection is performed based on the center point, the shape of the signal lamp having the color saturation can be accurately determined.

つづいて、オプティカルフロー取得部70が、ステップS9で選別処理された抽出画像を順次取得し、各ラベリング領域の中心点についてオプティカルフローを取得する(ステップS10)。そして、このステップS10で取得されたオプティカルフローに基づいて、非対象領域選別部71が、信号灯以外のラベリング領域を選別する(ステップS11)。これにより、信号灯との識別が難しいとされる、自動車のテールランプやブレーキランプ等を有効に除外し、識別精度が向上する。   Subsequently, the optical flow acquisition unit 70 sequentially acquires the extracted images subjected to the sorting process in step S9, and acquires an optical flow for the center point of each labeling region (step S10). Then, based on the optical flow acquired in step S10, the non-target area selection unit 71 selects a labeling area other than the signal lamp (step S11). This effectively eliminates the taillights, brake lights, etc. of automobiles that are difficult to distinguish from signal lights, and improves the identification accuracy.

上記ステップS1〜S11の処理によって得られた抽出画像は、抽出画像出力部72によって出力装置4へ出力される(ステップS12)。これにより、信号灯のみを抽出した抽出画像が車載の液晶ディスプレイ等に表示される。また、当該抽出画像に基づいて、適宜、スピーカ等から警告音や警告アナウンスが発せられる。これにより、高齢者や弱視者であっても、簡単に信号の存在やその信号色を認識する。また、抽出画像がリアルタイムで出力されるため、自動車や電車の運転をアシストするのに好適である。   The extracted image obtained by the processes in steps S1 to S11 is output to the output device 4 by the extracted image output unit 72 (step S12). Thereby, the extracted image which extracted only the signal lamp is displayed on a vehicle-mounted liquid crystal display or the like. Further, based on the extracted image, a warning sound or warning announcement is appropriately issued from a speaker or the like. Thereby, even an elderly person or a low vision person easily recognizes the presence of a signal and its signal color. Moreover, since the extracted image is output in real time, it is suitable for assisting driving of a car or a train.

以上のような本実施形態によれば、以下のような効果を奏する。
1.天候や時間帯等に関わらず、高精度かつリアルタイムに撮影画像内の信号灯を識別することができる。
2.信号灯を識別するためのデータを予め用意する必要がなく、低コストで普及しやすい信号灯識別システムを実現することができる。
3.適切な閾値を設定し、色飽和が生じた青信号の抽出率を高めることができる。
4.信号灯に近いピクセルを予めフィルタリングすることで、全体の処理速度を向上することができる。
5.信号灯に近い形状のラベリング領域を選別し、識別精度を向上することができる。
6.識別しにくいテールランプやブレーキランプ等を除去し、識別精度を向上することができる。
According to the present embodiment as described above, the following effects can be obtained.
1. Regardless of the weather, time zone, etc., it is possible to identify the signal lamp in the captured image with high accuracy and in real time.
2. It is not necessary to prepare data for identifying a signal lamp in advance, and a signal lamp identification system that can be easily spread at low cost can be realized.
3. An appropriate threshold value can be set to increase the extraction rate of the blue signal in which color saturation has occurred.
4). By pre-filtering pixels close to the signal light, the overall processing speed can be improved.
5. A labeling area having a shape close to that of a signal lamp can be selected to improve identification accuracy.
6). It is possible to improve the identification accuracy by removing tail lamps, brake lamps and the like that are difficult to identify.

つぎに、本発明に係る信号灯識別プログラム3aおよび信号灯識別装置3を含む信号灯識別システム1の具体的な実施例について説明する。なお、本発明の技術的範囲は、以下の実施例によって示される特徴に限定されるものではない。   Next, a specific embodiment of the signal lamp identification system 1 including the signal lamp identification program 3a and the signal lamp identification apparatus 3 according to the present invention will be described. The technical scope of the present invention is not limited to the features shown by the following examples.

『彩度範囲および明度範囲の選定実験』
本実施例1では、信号灯を抽出するのに最適な彩度範囲および明度範囲を選定するための実験を行った。具体的には、まず、図7(a)に示す静止画像において、青信号を含む領域(白枠で囲んだ領域)を切り出し、この領域内の各ピクセルについて、彩度および明度の関係をグラフ化した。その結果を図7(b)に示す。
"Saturation range and lightness range selection experiment"
In Example 1, an experiment was performed to select an optimum saturation range and lightness range for extracting a signal lamp. Specifically, first, in the still image shown in FIG. 7A, a region including a blue signal (region surrounded by a white frame) is cut out, and the relationship between saturation and lightness is graphed for each pixel in this region. did. The result is shown in FIG.

つづいて、図7(b)において、彩度および明度の閾値を様々な値に設定し、当該閾値で定められる範囲内のピクセルを抽出した。その結果、彩度が100以上、かつ、明度が50以上225未満の光源領域1に含まれるピクセルを抽出した場合、図7(c)に示すように、背景や白色に色飽和した中心部は抽出されず、青信号に相当する周縁部のみが抽出された。   Subsequently, in FIG. 7B, the saturation and lightness threshold values were set to various values, and pixels within the range defined by the threshold values were extracted. As a result, when pixels included in the light source region 1 having a saturation of 100 or more and a lightness of 50 or more and less than 225 are extracted, as shown in FIG. Only the peripheral edge corresponding to the green light was extracted without being extracted.

一方、彩度が100未満であって、明度が225以上の光源領域2に含まれるピクセルのみを抽出した場合、図7(d)に示すように、色飽和した青信号の中心部が抽出された。また、その他の背景を構成するピクセルのうち、彩度が50以上100未満であって、明度が225未満の光源領域3(図7(b)中の楕円領域)に含まれるピクセルのみを抽出した場合、図7(e)に示すように、信号灯の外周縁よりも一回り大きなリング領域が抽出された。   On the other hand, when only pixels included in the light source region 2 having a saturation of less than 100 and a lightness of 225 or more are extracted, as shown in FIG. . Further, among other pixels constituting the background, only pixels included in the light source region 3 (the elliptical region in FIG. 7B) having a saturation of 50 or more and less than 100 and a lightness of less than 225 are extracted. In this case, as shown in FIG. 7E, a ring region that is slightly larger than the outer peripheral edge of the signal lamp was extracted.

一方、赤信号についても、上記と同様の実験を実施した。具体的には、まず、赤信号を含む静止画像から図8(a)に示す領域を切り出し、この領域内の各ピクセルについて、彩度および明度の関係をグラフ化した。その結果を図8(b)に示す。   On the other hand, an experiment similar to the above was performed for the red signal. Specifically, first, a region shown in FIG. 8A was cut out from a still image including a red signal, and the relationship between saturation and lightness was graphed for each pixel in this region. The result is shown in FIG.

そして、図8(b)において、彩度および明度の閾値を様々な値に設定し、当該閾値で定められる範囲内のピクセルを抽出した。その結果、彩度が100以上、かつ、明度が50以上225未満の光源領域1に含まれるピクセルを抽出した場合、図8(c)に示すように、背景は抽出されず、赤信号のみが抽出された。   In FIG. 8B, saturation and lightness threshold values were set to various values, and pixels within a range defined by the threshold values were extracted. As a result, when pixels included in the light source region 1 with a saturation of 100 or more and a lightness of 50 or more and less than 225 are extracted, the background is not extracted and only the red signal is displayed as shown in FIG. Extracted.

以上のような本実施例1によれば、青信号、黄信号および赤信号等の白色光源以外の光源を抽出するための最適な彩度範囲は100以上であり、白色光源以外の光源を抽出するための最適な明度範囲は50以上225未満であることが示された。また、色飽和した青信号を抽出するための最適な彩度範囲は100未満であり、色飽和した青信号を抽出するための最適な明度範囲は225以上であることが示された。   According to the first embodiment as described above, the optimum saturation range for extracting a light source other than a white light source such as a blue signal, a yellow signal, and a red signal is 100 or more, and a light source other than a white light source is extracted. It has been shown that the optimal brightness range for is greater than or equal to 50 and less than 225. Further, it was shown that the optimum saturation range for extracting the color-saturated blue signal is less than 100, and the optimum brightness range for extracting the color-saturated blue signal is 225 or more.

『彩度範囲および明度範囲の妥当性を確認する実験』
本実施例2では、上述した実施例1で定めた彩度範囲および明度範囲の妥当性を確認するための実験を行った。具体的には、まず、図9に示すように、撮影した季節、天候および時間帯が異なる10本のサンプル動画像を用意し、各動画像から赤信号が映っている静止画像を118枚キャプチャーした。そして、各静止画像について色変換処理を実行し、HSV成分のヒストグラム分布をグラフ化した。
"Experiment to confirm the validity of saturation range and lightness range"
In the second embodiment, an experiment for confirming the validity of the saturation range and the lightness range defined in the first embodiment was performed. Specifically, as shown in FIG. 9, first, 10 sample moving images with different shooting seasons, weathers, and time zones are prepared, and 118 still images in which a red signal is reflected from each moving image are captured. did. Then, color conversion processing was executed for each still image, and the histogram distribution of HSV components was graphed.

図10(a),(b)は、それぞれ彩度成分および明度成分のヒストグラム分布を示している。なお、図10(a)の横軸は、彩度(0〜255)を示しており、図10(b)の横軸は、明度(0〜255)を示している。また、図10(a),(b)の縦軸は、光源領域の画素に対して、そのヒストグラム値が含まれている割合(%)を示している。   FIGS. 10A and 10B show histogram distributions of the saturation component and the brightness component, respectively. In addition, the horizontal axis of Fig.10 (a) has shown saturation (0-255), and the horizontal axis of FIG.10 (b) has shown lightness (0-255). In addition, the vertical axis in FIGS. 10A and 10B indicates the ratio (%) at which the histogram value is included in the pixels in the light source region.

図10(a)に示すように、赤信号の彩度成分は、100以上に分布していることが確認できる。また,図10(b)に示すように、赤信号の明度成分は、50以上225未満に分布していることが確認できる。なお、本実施例2では、赤信号について検証したが、白色光源以外の光源であれば、青信号や黄信号についても同様の結果が得られるものと推測される。   As shown in FIG. 10A, it can be confirmed that the saturation component of the red signal is distributed over 100. Further, as shown in FIG. 10B, it can be confirmed that the brightness component of the red signal is distributed in the range of 50 to less than 225. In the second embodiment, the red signal is verified. However, if the light source is other than the white light source, it is estimated that the same result can be obtained for the blue signal and the yellow signal.

以上のような本実施例2によれば、実施例1で定めた彩度範囲および明度範囲の閾値は、白色光源以外の光源を抽出するための閾値として妥当であることが示された。   According to the second embodiment as described above, the saturation range and brightness range threshold values defined in the first embodiment are shown to be appropriate as threshold values for extracting light sources other than the white light source.

『青信号を抽出する色相範囲の選定実験』
本実施例3では、青信号を抽出するのに最適な色相範囲を選定するための実験を行った。具体的には、青信号が点灯している静止画像として図7(a)の静止画像を使用し、実施例1と同様、彩度が100以上、かつ、明度が50以上225未満のピクセルを抽出した。そして、当該抽出画像(図7(c))を構成する全ピクセルについて、色相値を調査した。その結果を図11に示す。
"Selection experiment of hue range to extract blue light"
In Example 3, an experiment for selecting an optimum hue range for extracting a blue signal was performed. Specifically, the still image shown in FIG. 7A is used as a still image in which a blue signal is lit, and pixels having a saturation of 100 or more and a brightness of 50 or more and less than 225 are extracted as in the first embodiment. did. And the hue value was investigated about all the pixels which comprise the said extraction image (FIG.7 (c)). The result is shown in FIG.

図11に示すように、青信号に相当するピクセルの色相値は、いずれも180度を超えていないことが確認できる。また、色相値が150未満のピクセルは、わずかに7ピクセルしか存在していないことがわかる。なお、各ピクセルの色相値は、小数点以下を四捨五入した値である。また、色相値が0のピクセルは、青信号以外であるとして黒色に変換されたピクセルである。   As shown in FIG. 11, it can be confirmed that the hue value of the pixel corresponding to the blue signal does not exceed 180 degrees. Further, it can be seen that there are only 7 pixels having a hue value of less than 150. The hue value of each pixel is a value obtained by rounding off the decimal part. A pixel having a hue value of 0 is a pixel that has been converted to black as being other than a blue signal.

以上のような本実施例3によれば、青信号を抽出するための最適な色相範囲は、150度以上180度以下であることが示された。   According to the third embodiment as described above, it has been shown that the optimum hue range for extracting the blue signal is 150 degrees or more and 180 degrees or less.

『黄信号または赤信号を抽出する色相範囲の選定実験』
本実施例4では、黄信号または赤信号を抽出するのに最適な色相範囲を選定するための実験を行った。具体的には、まず、図12(a)に示すように、黄信号が点灯している静止画像から、彩度が100以上、かつ、明度が50以上225未満のピクセルを抽出した。そして、当該抽出画像から、図12(b)に示すような黄信号を含む領域を切り出し、この切り出し領域を構成する全ピクセルについて、色相値を調査した。その結果を図13に示す。
"Selection experiment of hue range to extract yellow signal or red signal"
In Example 4, an experiment was conducted to select an optimum hue range for extracting a yellow signal or a red signal. Specifically, as shown in FIG. 12A, first, pixels having a saturation of 100 or more and a brightness of 50 or more and less than 225 were extracted from a still image in which a yellow signal is lit. Then, an area including a yellow signal as shown in FIG. 12B was cut out from the extracted image, and the hue value was examined for all the pixels constituting the cut-out area. The result is shown in FIG.

図13に示すように、黄信号に相当するピクセルの色相値は、いずれも60度を超えていないことが確認できる。また、色相値が10未満のピクセルは、1ピクセルも存在していなかった。   As shown in FIG. 13, it can be confirmed that the hue value of the pixel corresponding to the yellow signal does not exceed 60 degrees. Further, no pixel having a hue value of less than 10 was present.

同様に、図14(a)に示すように、赤信号が点灯している静止画像から、彩度が100以上、かつ、明度が50以上225未満のピクセルを抽出した。そして、当該抽出画像から、図14(b)に示すような赤信号を含む領域を切り出し、この切り出し領域を構成する全ピクセルについて、色相値を調査した。その結果を図15に示す。   Similarly, as shown in FIG. 14A, pixels having a saturation of 100 or more and a brightness of 50 or more and less than 225 are extracted from a still image in which a red signal is lit. Then, a region including a red signal as shown in FIG. 14B was cut out from the extracted image, and the hue value was examined for all the pixels constituting this cut-out region. The result is shown in FIG.

図15に示すように、赤信号に相当するピクセルの色相値は、いずれも60度を超えていないことが確認できる。また、色相値が−10未満のピクセルは、わずかに2ピクセルしか存在していなかった。なお、図13および図15において、各ピクセルの色相値は、小数点以下を四捨五入した値である。また、色相値が0のピクセルは、信号灯以外であるとして黒色に変換されたピクセルである。   As shown in FIG. 15, it can be confirmed that the hue values of the pixels corresponding to the red signal do not exceed 60 degrees. In addition, there were only two pixels having a hue value of less than −10. In FIG. 13 and FIG. 15, the hue value of each pixel is a value rounded off after the decimal point. A pixel having a hue value of 0 is a pixel that has been converted to black as being other than a signal light.

以上のような本実施例4によれば、赤信号または黄信号を抽出するための最適な色相範囲は、−10度以上60度以下であることが示された。   According to Example 4 as described above, the optimum hue range for extracting the red signal or the yellow signal is shown to be −10 degrees or more and 60 degrees or less.

『抽出率の確認実験』
本実施例5では、実施例1〜4で定めた抽出用閾値による抽出率を確認する実験を行った。具体的には、実施例2で使用した10本のサンプル動画像について、本実施形態の信号灯識別プログラム3aにより実行される信号灯識別装置3を用いて光源の抽出処理(上記ステップS1〜ステップS6)を実行した。そして、全処理フレームについて、目視により確認し、抽出画像内に信号灯が抽出されている割合を算出した。その結果を図16に示す。
"Confirmation experiment of extraction rate"
In Example 5, an experiment was performed to confirm the extraction rate based on the extraction threshold values defined in Examples 1 to 4. Specifically, with respect to the 10 sample moving images used in Example 2, the light source extraction process (steps S1 to S6 above) using the signal lamp identification device 3 executed by the signal lamp identification program 3a of the present embodiment. Was executed. And about all the process frames, it confirmed visually and calculated the ratio from which the signal lamp was extracted in the extraction image. The result is shown in FIG.

図16に示すように、青信号、黄信号および赤信号全体に関する抽出率の平均値は、82.33%であった。また、信号灯の識別において最も重要な赤信号のみに限った場合、抽出率の平均値は、95.32%という高精度で識別されていた。なお、サンプル動画像のうち、signal069とsignal027には、目視でも信号灯を認識するのが極めて困難なフレームが存在していた。   As shown in FIG. 16, the average value of the extraction rates for the blue, yellow, and red signals as a whole was 82.33%. In addition, when only the most important red signal was identified for identifying the signal lamp, the average value of the extraction rate was identified with a high accuracy of 95.32%. Of the sample moving images, signals 069 and signal 027 have frames that are extremely difficult to visually recognize the signal light.

一方、抽出に失敗したフレームを検証すると、撮影距離が遠すぎて、信号灯の大きさが十分でないケースがほとんどであった。このため、上記の抽出率は、実用上必要とされる抽出精度を十分に満たしているものと考えられる。   On the other hand, when verifying a frame that failed to be extracted, in most cases, the shooting distance was too far and the size of the signal lamp was not sufficient. For this reason, it is thought that said extraction rate fully satisfy | fills the extraction precision required practically.

また、夜間のサンプル動画像(signal034、signal112)においては、特に青信号が色飽和し、光源として抽出できずに抽出率が低下していた。しかしながら、赤信号に限れば、上記のように高い抽出率が得られている上、赤信号の全領域が色飽和することは極めて稀である。このため、上記ステップS7〜S11を実行せず、処理速度を優先した本処理(ステップS1〜ステップS6)でも十分実用化できるレベルである。また、別途、実施例1で定めた色飽和した青信号を抽出するための閾値を使用することにより、抽出率は改善するものと考えられる。   In addition, in the sample moving image at night (signal034, signal112), the blue signal is particularly saturated in color, and cannot be extracted as a light source, resulting in a decrease in extraction rate. However, as far as the red signal is concerned, a high extraction rate is obtained as described above, and it is very rare that the entire area of the red signal is saturated. For this reason, the above steps S7 to S11 are not executed, and this processing (step S1 to step S6) prioritizing the processing speed is at a level that can be sufficiently put into practical use. In addition, it is considered that the extraction rate is improved by using a threshold value for extracting the blue signal saturated in color as defined in the first embodiment.

以上のような本実施例5によれば、本実施形態の信号灯識別プログラム3aにより実行される信号灯識別装置3を用いて光源を抽出した場合、高い抽出率が得られ、十分実用化できるレベルであることが示された。   According to the fifth embodiment as described above, when a light source is extracted using the signal lamp identification device 3 executed by the signal lamp identification program 3a of the present embodiment, a high extraction rate can be obtained and at a level that can be sufficiently put into practical use. It was shown that there is.

『フィルタリング処理および形状選別処理の検証実験』
本実施例6では、フィルタリング処理および形状選別処理が識別結果に及ぼす影響について検証した。具体的には、図17(a)〜(c)に示す3枚の静止画像について、抽出用閾値によるピクセル抽出処理のみ実行した場合、フィルタリング用閾値によるフィルタリング処理を合わせて実行した場合、およびラベリングによる形状選別処理をさらに実行した場合の抽出画像を出力した。これら各場合における抽出画像をそれぞれ図18〜図20に示す。
"Verification experiment of filtering processing and shape selection processing"
In Example 6, the effect of the filtering process and the shape selection process on the identification result was verified. Specifically, with respect to the three still images shown in FIGS. 17A to 17C, when only pixel extraction processing based on the extraction threshold is performed, filtering processing based on the filtering threshold is performed together, and labeling An extracted image was output when the shape selection process was further executed. The extracted images in these cases are shown in FIGS.

図18に示すように、ピクセル抽出処理のみ実行した場合、信号灯以外の看板や空も抽出されていたが、信号灯についても漏れなく抽出されていた。また、図19に示すように、ピクセル抽出処理の前にフィルタリング処理を実行した場合、図18と比較して、信号灯以外の看板や空を誤抽出する割合が抑制されていた。さらに、図20に示すように、フィルタリング処理、ピクセル抽出処理および形状選別処理を実行した場合、看板や空の誤抽出が無くなり、図20(c)において、テールランプを1つ誤抽出したに過ぎなかった。   As shown in FIG. 18, when only pixel extraction processing is executed, signs and sky other than signal lights are also extracted, but signal lights are also extracted without omission. Further, as shown in FIG. 19, when the filtering process is executed before the pixel extraction process, the ratio of erroneously extracting signboards and sky other than the signal lights is suppressed as compared with FIG. Furthermore, as shown in FIG. 20, when the filtering process, the pixel extraction process, and the shape selection process are executed, there is no false extraction of a signboard or the sky, and only one tail lamp is erroneously extracted in FIG. It was.

なお、図20では、信号灯以外の領域を白色とし、抽出したラベリング領域の中心点のみを表示している。また、図20では、見やすさの観点からあえて小さなラベリング領域を除去している。このため、図20(c)では、信号が表示されていないが、抽出自体はされている。さらに、上記オプティカルフロー処理を実行することで、図20(c)で抽出されたテールランプも除去されるものと考えられる。   In FIG. 20, the area other than the signal lamp is white, and only the center point of the extracted labeling area is displayed. In FIG. 20, a small labeling region is intentionally removed from the viewpoint of easy viewing. For this reason, in FIG.20 (c), although the signal is not displayed, extraction itself is performed. Furthermore, it is considered that the tail lamp extracted in FIG. 20C is also removed by executing the optical flow process.

以上のような本実施例6によれば、本発明に係るピクセル抽出処理のみを実行した場合でも、信号灯を識別可能な抽出画像が得られることが示された。また、フィルタリング処理や形状選別処理を合わせて実行した場合、識別精度が向上することが示された。   According to the sixth embodiment as described above, it has been shown that even when only the pixel extraction processing according to the present invention is executed, an extracted image capable of identifying the signal lamp can be obtained. Moreover, it was shown that when the filtering process and the shape selection process are executed together, the identification accuracy is improved.

『オプティカルフローに基づく選別処理の検証実験』
本実施例7では、オプティカルフローに基づく選別処理の有効性について検証する実験を行った。具体的には、信号灯が十分大きく撮影されている動画像について、フレームごとにラベリング領域の中心点を算出し、プロットすることで軌跡を調査した。その結果を図21に示す。
"Verification experiment of sorting process based on optical flow"
In Example 7, an experiment was conducted to verify the effectiveness of the sorting process based on the optical flow. Specifically, the trajectory was investigated by calculating and plotting the center point of the labeling area for each frame of a moving image in which a signal light was photographed sufficiently large. The result is shown in FIG.

図21(a)に示すように、青信号の前を一定速度で通過した場合、中心点がほぼ等間隔で出現し、その軌道は直線状またはゆるやかな曲線状を描くことが確認された。また、図21(b)に示すように、赤信号の前で徐々に減速して停車した場合、中心点の間隔が徐々に狭くなるものの、その軌跡はほぼ直線状またはゆるやかな曲線状を描くことが確認された。   As shown in FIG. 21 (a), when passing in front of the green signal at a constant speed, it was confirmed that the center points appear at almost equal intervals, and the trajectory draws a straight line or a gentle curve. Further, as shown in FIG. 21B, when the vehicle is decelerated and stopped before the red signal, the distance between the center points gradually narrows, but the trajectory is substantially linear or gently curved. It was confirmed.

以上のように、信号機は固定物であるため、信号灯の中心点は、直線またはゆるやかな曲線に近似可能な軌跡を描くものと考えられる。また、中心点の間隔に基づいて、車の状態(加速,減速,停止など)も推測することができる。したがって、オプティカルフローの出現傾向を調べることにより、色だけでは信号灯と識別困難なテールランプやブレーキランプ等の除去に有効であるといえる。   As described above, since the traffic light is a fixed object, the central point of the signal light is considered to draw a locus that can be approximated to a straight line or a gentle curve. Further, the state of the vehicle (acceleration, deceleration, stop, etc.) can also be estimated based on the distance between the center points. Therefore, by examining the appearance tendency of the optical flow, it can be said that it is effective in removing tail lamps, brake lamps, and the like that are difficult to distinguish from signal lights only by color.

以上のような本実施例7によれば、オプティカルフローが直線または曲線に近似できる場合、信号灯であると判定することが妥当であることが示された。   According to the seventh embodiment as described above, when the optical flow can be approximated to a straight line or a curve, it is indicated that it is appropriate to determine that the light is a signal lamp.

『リアルタイム処理性能の検証実験』
本実施例8では、本実施形態の信号灯識別プログラム3aにより実行される信号灯識別装置3について、リアルタイムでの処理性能について検証する実験を行った。具体的には、パーソナルコンピュータ(CPU:Intel Pentium(登録商標)4 3GHz,メモリ:504MB RAM)を用いて、上述したステップS1からステップS8までの一連の処理を3フレーム毎に行った。その結果、平均処理スピードは、27[fps]であった。
"Real-time processing performance verification experiment"
In Example 8, an experiment was performed to verify the processing performance in real time for the signal lamp identification device 3 executed by the signal lamp identification program 3a of the present embodiment. Specifically, using a personal computer (CPU: Intel Pentium (registered trademark) 4 3 GHz, memory: 504 MB RAM), the above-described series of processing from step S1 to step S8 was performed every three frames. As a result, the average processing speed was 27 [fps].

現在、アナログテレビのフレームレートが約30[fps]であることを考慮すると、本発明に係る識別処理をリアルタイムで実行することは、十分可能であるといえる。また、処理するフレーム数を減らすことにより、別途、新たな処理を追加することも可能である。   Considering that the analog television frame rate is currently about 30 [fps], it can be said that it is sufficiently possible to execute the identification processing according to the present invention in real time. Further, by reducing the number of frames to be processed, new processing can be added separately.

以上のような本実施例8によれば、本実施形態の信号灯識別プログラム3aにより実行される信号灯識別装置3は、動画像からリアルタイムで信号灯を識別処理できることが示された。   According to the present Example 8 as described above, it has been shown that the signal lamp identification device 3 executed by the signal lamp identification program 3a of the present embodiment can identify a signal lamp in real time from a moving image.

なお、本発明に係る信号灯識別プログラム3aおよび信号灯識別装置3は、前述した実施形態および実施例に限定されるものではなく、適宜変更することができる。   The signal lamp identification program 3a and the signal lamp identification apparatus 3 according to the present invention are not limited to the above-described embodiments and examples, and can be changed as appropriate.

例えば、上述した本実施形態では、抽出画像において、色飽和が生じた信号灯を抽出したままのドーナツ形状で表示している。しかしながら、リアルタイムでの処理を確保できるのであれば、別途、ドーナツ状となった空洞部分のピクセルを、周囲と同じ色相に変換処理するようにしてもよい。これにより、抽出画像の信号色がユーザにわかりやすくなり、視認性がより一層向上する。   For example, in the above-described embodiment, a signal lamp in which color saturation has occurred is displayed in the extracted image in a donut shape as extracted. However, if real-time processing can be ensured, the pixel in the hollow portion that has become a donut shape may be separately converted into the same hue as the surroundings. As a result, the signal color of the extracted image is easily understood by the user, and the visibility is further improved.

1 信号灯識別システム
2 撮影装置
3 信号灯識別装置
3a 信号灯識別プログラム
4 出力装置
5 記憶手段
6 演算処理手段
51 プログラム記憶部
52 フィルタリング用閾値記憶部
53 抽出用閾値記憶部
61 静止画像取得部
62 RGB差分算出部
63 フィルタリング部
64 色成分変換部
65 ピクセル抽出部
66 抽出画像作成部
67 ラベリング部
68 中心点算出部
69 形状選別部
70 オプティカルフロー取得部
71 非対象領域選別部
72 抽出画像出力部
DESCRIPTION OF SYMBOLS 1 Signal lamp identification system 2 Imaging device 3 Signal lamp identification apparatus 3a Signal lamp identification program 4 Output device 5 Memory | storage means 6 Arithmetic processing means 51 Program memory | storage part 52 Filtering threshold value memory | storage part 53 Extraction threshold value memory | storage part 61 Still image acquisition part 62 RGB difference calculation Unit 63 Filtering unit 64 Color component conversion unit 65 Pixel extraction unit 66 Extracted image creation unit 67 Labeling unit 68 Center point calculation unit 69 Shape selection unit 70 Optical flow acquisition unit 71 Non-target region selection unit 72 Extracted image output unit

Claims (14)

信号灯識別装置を、
動画像から静止画像を取得する静止画像取得部と、
下記変換式(1)〜(3)を用いて、前記静止画像を構成する各ピクセルのRGB成分(赤,緑,青)をHSV成分(色相,彩度,明度)に変換する色成分変換部と、
信号灯に相当する色相のピクセルを抽出するための色相範囲を定める閾値、信号灯に相当する彩度のピクセルを抽出するための彩度範囲を定める閾値、および信号灯に相当する明度のピクセルを抽出するための明度範囲を定める閾値を記憶する抽出用閾値記憶部と、
前記色成分変換部が変換した色相が前記色相範囲内であり、前記色成分変換部が変換した彩度が前記彩度範囲内であり、前記色成分変換部が変換した明度が前記明度範囲内にあるピクセルを抽出するピクセル抽出部と、
前記ピクセル抽出部が抽出したピクセルからなる抽出画像を出力装置へ出力する抽出画像出力部と
して機能させる信号灯識別プログラム。
色相(hue)=arctan(I/I) ・・・式(1)
彩度(saturation)=√(I +I ) ・・・式(2)
明度(intensity)=I ・・・式(3)
ただし、
(r,g,b)は、静止画像から得られた色情報(輝度値)
Signal light identification device
A still image acquisition unit for acquiring a still image from a moving image;
A color component conversion unit that converts RGB components (red, green, blue) of each pixel constituting the still image into HSV components (hue, saturation, brightness) using the following conversion equations (1) to (3) When,
To extract a threshold value for determining a hue range for extracting a pixel of hue corresponding to a signal light, a threshold value for determining a saturation range for extracting a pixel of saturation corresponding to the signal light, and a pixel of lightness corresponding to a signal light An extraction threshold value storage unit for storing a threshold value for determining the brightness range of
The hue converted by the color component conversion unit is within the hue range, the saturation converted by the color component conversion unit is within the saturation range, and the lightness converted by the color component conversion unit is within the lightness range. A pixel extractor for extracting pixels in
A signal lamp identification program that functions as an extracted image output unit that outputs an extracted image including pixels extracted by the pixel extracting unit to an output device.
Hue = arctan (I y / I x ) (1)
Saturation = √ (I x 2 + I y 2 ) (2)
Intensity = I z Expression (3)
However,
(R, g, b) is color information (luminance value) obtained from a still image.
前記抽出用閾値記憶部には、赤信号または黄信号を抽出するための色相範囲の閾値が−10度以上60度以下に設定されているとともに、青信号を抽出するための色相範囲の閾値が150度以上180度以下に設定されており、白色光源以外の光源を抽出するための彩度範囲の閾値が100以上に設定され、かつ、白色光源以外の光源を抽出するための明度範囲の閾値が50以上225未満に設定されている請求項1に記載の信号灯識別プログラム。   In the extraction threshold storage unit, a hue range threshold for extracting a red signal or a yellow signal is set to -10 degrees or more and 60 degrees or less, and a hue range threshold for extracting a blue signal is 150. The saturation range threshold for extracting light sources other than the white light source is set to 100 or more, and the brightness range threshold for extracting light sources other than the white light source is set. The signal lamp identification program according to claim 1, wherein the signal lamp identification program is set to 50 or more and less than 225. 前記抽出用閾値記憶部には、さらに、色飽和した青信号を抽出するための彩度範囲の閾値が100未満に設定され、かつ、色飽和した青信号を抽出するための明度範囲の閾値が225以上に設定されている請求項2に記載の信号灯識別プログラム。   In the extraction threshold storage unit, a saturation range threshold for extracting a color-saturated blue signal is set to less than 100, and a brightness range threshold for extracting a color-saturated blue signal is 225 or more. The signal lamp identification program according to claim 2, wherein 前記色成分変換部が変換処理する前に、信号灯に近いRGB成分を有するピクセルを予めフィルタリングするためのフィルタリング用閾値を記憶するフィルタリング用閾値記憶部と、
前記静止画像を構成する各ピクセルについて、RGB成分間の差分を算出するRGB差分算出部と、
前記RGB成分算出部が算出した差分が、前記フィルタリング用閾値で定められた範囲内にあるピクセルをフィルタリングして取得するフィルタリング部と
して信号灯識別装置を機能させるとともに、
前記フィルタリング用閾値記憶部には、赤信号、黄信号および青信号のフィルタリング用閾値として以下の閾値が設定されている請求項1から請求項3のいずれかに記載の信号灯識別プログラム。
赤信号:(R−G)+128≧255、かつ、(R−B)≧100
黄信号:(R−G)+128<255、かつ、(R−B)≧100
青信号:(R−G)+128<28、かつ、(B−G)≦0
ただし、R:R成分の輝度値 G:G成分の輝度値 B:B成分の輝度値
A filtering threshold storage unit that stores a filtering threshold for pre-filtering pixels having RGB components close to a signal light before the color component conversion unit performs the conversion process;
For each pixel constituting the still image, an RGB difference calculation unit that calculates a difference between RGB components;
The difference calculated by the RGB component calculation unit functions as a filtering unit that acquires and filters pixels within the range defined by the filtering threshold,
4. The signal lamp identification program according to claim 1, wherein the filtering threshold storage unit is set with the following thresholds as filtering thresholds for a red signal, a yellow signal, and a blue signal. 5.
Red signal: (R−G) + 128 ≧ 255 and (R−B) ≧ 100
Yellow signal: (R−G) +128 <255 and (R−B) ≧ 100
Green light: (R−G) +128 <28 and (B−G) ≦ 0
However, R: R component luminance value G: G component luminance value B: B component luminance value
前記ピクセル抽出部が抽出したピクセルのうち、隣接する全てのピクセルにラベリングしてグループ化するラベリング部と、
前記ラベリング部がグループ化したラベリング領域の中心点を算出する中心点算出部と、
前記中心点算出部が算出した中心点と前記ラベリング領域の周縁部を構成するピクセルとの位置関係に基づいて、信号灯に近い形状のラベリング領域を選別する形状選別部と
して信号灯識別装置を機能させる請求項1から請求項4のいずれかに記載の信号灯識別プログラム。
Among the pixels extracted by the pixel extraction unit, a labeling unit that labels and groups all adjacent pixels;
A center point calculation unit for calculating a center point of a labeling region grouped by the labeling unit;
Based on the positional relationship between the center point calculated by the center point calculation unit and the pixels constituting the peripheral portion of the labeling region, the signal light identification device functions as a shape selection unit that selects a labeling region having a shape close to the signal light. The signal lamp identification program according to any one of claims 1 to 4.
前記ピクセル抽出部が抽出したピクセルのうち、隣接する全てのピクセルにラベリングしてグループ化するラベリング部と、
前記ラベリング部がグループ化したラベリング領域の上下距離と左右距離との差に基づいて、信号灯とは異なる形状のラベリング領域を選別する形状選別部と
して信号灯識別装置を機能させる請求項1から請求項4のいずれかに記載の信号灯識別プログラム。
A labeling unit that labels and groups all adjacent pixels among the pixels extracted by the pixel extraction unit;
The signal light identification device is made to function as a shape selection unit for selecting a labeling region having a shape different from that of the signal light based on a difference between a vertical distance and a horizontal distance of the labeling region grouped by the labeling unit. Item 5. A signal lamp identification program according to any one of Items 4 to 6.
前記ピクセル抽出部が抽出したピクセルのうち、隣接する全てのピクセルにラベリングしてグループ化するラベリング部と、
前記ラベリング部がグループ化したラベリング領域の中心点を算出する中心点算出部と、
前記中心点算出部が算出した中心点のオプティカルフローを取得するオプティカルフロー取得部と、
前記オプティカルフロー取得部が取得したオプティカルフローに基づいて、信号灯以外のラベリング領域を選別する非対象領域選別部と
して信号灯識別装置を機能させる請求項1から請求項4のいずれかに記載の信号灯識別プログラム。
A labeling unit that labels and groups all adjacent pixels among the pixels extracted by the pixel extraction unit;
A center point calculation unit for calculating a center point of a labeling region grouped by the labeling unit;
An optical flow acquisition unit that acquires the optical flow of the center point calculated by the center point calculation unit;
The signal lamp according to any one of claims 1 to 4, wherein the signal lamp identification device functions as a non-target area selection section that selects a labeling area other than the signal lamp based on the optical flow acquired by the optical flow acquisition section. Identification program.
動画像から静止画像を取得する静止画像取得部と、
下記変換式(1)〜(3)を用いて、前記静止画像を構成する各ピクセルのRGB成分(赤,緑,青)をHSV成分(色相,彩度,明度)に変換する色成分変換部と、
信号灯に相当する色相のピクセルを抽出するための色相範囲を定める閾値、信号灯に相当する彩度のピクセルを抽出するための彩度範囲を定める閾値、および信号灯に相当する明度のピクセルを抽出するための明度範囲を定める閾値を記憶する抽出用閾値記憶部と、
前記色成分変換部が変換した色相が前記色相範囲内であり、前記色成分変換部が変換した彩度が前記彩度範囲内であり、前記色成分変換部が変換した明度が前記明度範囲内にあるピクセルを抽出するピクセル抽出部と、
前記ピクセル抽出部が抽出したピクセルからなる抽出画像を出力装置へ出力する抽出画像出力部と
を有している信号灯識別装置。
色相(hue)=arctan(I/I) ・・・式(1)
彩度(saturation)=√(I +I ) ・・・式(2)
明度(intensity)=I ・・・式(3)
ただし、
(r,g,b)は、静止画像から得られた色情報(輝度値)
A still image acquisition unit for acquiring a still image from a moving image;
A color component conversion unit that converts RGB components (red, green, blue) of each pixel constituting the still image into HSV components (hue, saturation, brightness) using the following conversion equations (1) to (3) When,
To extract a threshold value for determining a hue range for extracting a pixel of hue corresponding to a signal light, a threshold value for determining a saturation range for extracting a pixel of saturation corresponding to the signal light, and a pixel of lightness corresponding to a signal light An extraction threshold value storage unit for storing a threshold value for determining the brightness range of
The hue converted by the color component conversion unit is within the hue range, the saturation converted by the color component conversion unit is within the saturation range, and the lightness converted by the color component conversion unit is within the lightness range. A pixel extractor for extracting pixels in
A signal lamp identification device comprising: an extracted image output unit that outputs an extracted image composed of pixels extracted by the pixel extraction unit to an output device.
Hue = arctan (I y / I x ) (1)
Saturation = √ (I x 2 + I y 2 ) (2)
Intensity = I z Expression (3)
However,
(R, g, b) is color information (luminance value) obtained from a still image.
前記抽出用閾値記憶部には、赤信号または黄信号を抽出するための色相範囲の閾値が−10度以上60度以下に設定されているとともに、青信号を抽出するための色相範囲の閾値が150度以上180度以下に設定されており、白色光源以外の光源を抽出するための彩度範囲の閾値が100以上に設定され、かつ、白色光源以外の光源を抽出するための明度範囲の閾値が50以上225未満に設定されている請求項8に記載の信号灯識別装置。   In the extraction threshold storage unit, a hue range threshold for extracting a red signal or a yellow signal is set to -10 degrees or more and 60 degrees or less, and a hue range threshold for extracting a blue signal is 150. The saturation range threshold for extracting light sources other than the white light source is set to 100 or more, and the brightness range threshold for extracting light sources other than the white light source is set. The signal light identification device according to claim 8, wherein the signal light identification device is set to 50 or more and less than 225. 前記抽出用閾値記憶部には、さらに、色飽和した青信号を抽出するための彩度範囲の閾値が100未満に設定され、かつ、色飽和した青信号を抽出するための明度範囲の閾値が225以上に設定されている請求項9に記載の信号灯識別装置。   In the extraction threshold storage unit, a saturation range threshold for extracting a color-saturated blue signal is set to less than 100, and a brightness range threshold for extracting a color-saturated blue signal is 225 or more. The signal light identification device according to claim 9, which is set as follows. 前記色成分変換部が変換処理する前に、信号灯に近いRGB成分を有するピクセルを予めフィルタリングするためのフィルタリング用閾値を記憶するフィルタリング用閾値記憶部と、
前記静止画像を構成する各ピクセルについて、RGB成分間の差分を算出するRGB差分算出部と、
前記RGB成分算出部が算出した差分が、前記フィルタリング用閾値で定められた範囲内にあるピクセルをフィルタリングして取得するフィルタリング部と
を有し、
前記フィルタリング用閾値記憶部には、赤信号、黄信号および青信号のフィルタリング用閾値として以下の閾値が設定されている請求項8から請求項10のいずれかに記載の信号灯識別装置。
赤信号:(R−G)+128≧255、かつ、(R−B)≧100
黄信号:(R−G)+128<255、かつ、(R−B)≧100
青信号:(R−G)+128<28、かつ、(B−G)≦0
ただし、R:R成分の輝度値 G:G成分の輝度値 B:B成分の輝度値
A filtering threshold storage unit that stores a filtering threshold for pre-filtering pixels having RGB components close to a signal light before the color component conversion unit performs the conversion process;
For each pixel constituting the still image, an RGB difference calculation unit that calculates a difference between RGB components;
A filtering unit that obtains the difference calculated by the RGB component calculation unit by filtering pixels within a range defined by the filtering threshold;
The signal light identification device according to any one of claims 8 to 10, wherein the filtering threshold storage unit is set with the following thresholds as filtering thresholds for a red signal, a yellow signal, and a blue signal.
Red signal: (R−G) + 128 ≧ 255 and (R−B) ≧ 100
Yellow signal: (R−G) +128 <255 and (R−B) ≧ 100
Green light: (R−G) +128 <28 and (B−G) ≦ 0
However, R: R component luminance value G: G component luminance value B: B component luminance value
前記ピクセル抽出部が抽出したピクセルのうち、隣接する全てのピクセルにラベリングしてグループ化するラベリング部と、
前記ラベリング部がグループ化したラベリング領域の中心点を算出する中心点算出部と、
前記中心点算出部が算出した中心点と前記ラベリング領域の周縁部を構成するピクセルとの位置関係に基づいて、信号灯に近い形状のラベリング領域を選別する形状選別部と
を有している請求項8から請求項11のいずれかに記載の信号灯識別装置。
A labeling unit that labels and groups all adjacent pixels among the pixels extracted by the pixel extraction unit;
A center point calculation unit for calculating a center point of a labeling region grouped by the labeling unit;
A shape selection unit that selects a labeling region having a shape close to a signal lamp based on a positional relationship between the center point calculated by the center point calculation unit and pixels that form a peripheral portion of the labeling region. The signal light identification device according to any one of claims 8 to 11.
前記ピクセル抽出部が抽出したピクセルのうち、隣接する全てのピクセルにラベリングしてグループ化するラベリング部と、
前記ラベリング部がグループ化したラベリング領域の上下距離と左右距離との差に基づいて、信号灯とは異なる形状のラベリング領域を選別する形状選別部と
を有している請求項8から請求項11のいずれかに記載の信号灯識別装置。
A labeling unit that labels and groups all adjacent pixels among the pixels extracted by the pixel extraction unit;
12. The shape selection unit for selecting a labeling region having a shape different from that of a signal light based on a difference between a vertical distance and a horizontal distance of the labeling region grouped by the labeling unit. The signal light identification device according to any one of the above.
前記ピクセル抽出部が抽出したピクセルのうち、隣接する全てのピクセルにラベリングしてグループ化するラベリング部と、
前記ラベリング部がグループ化したラベリング領域の中心点を算出する中心点算出部と、
前記中心点算出部が算出した中心点のオプティカルフローを取得するオプティカルフロー取得部と、
前記オプティカルフロー取得部が取得したオプティカルフローに基づいて、信号灯以外のラベリング領域を選別する非対象領域選別部と
を有している請求項8から請求項11のいずれかに記載の信号灯識別装置。
A labeling unit that labels and groups all adjacent pixels among the pixels extracted by the pixel extraction unit;
A center point calculation unit for calculating a center point of a labeling region grouped by the labeling unit;
An optical flow acquisition unit that acquires the optical flow of the center point calculated by the center point calculation unit;
The signal light identification device according to any one of claims 8 to 11, further comprising: a non-target region selection unit that selects a labeling region other than the signal light based on the optical flow acquired by the optical flow acquisition unit.
JP2010085936A 2010-04-02 2010-04-02 Program and device for discriminating traffic light Pending JP2011216051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010085936A JP2011216051A (en) 2010-04-02 2010-04-02 Program and device for discriminating traffic light

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010085936A JP2011216051A (en) 2010-04-02 2010-04-02 Program and device for discriminating traffic light

Publications (1)

Publication Number Publication Date
JP2011216051A true JP2011216051A (en) 2011-10-27

Family

ID=44945675

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010085936A Pending JP2011216051A (en) 2010-04-02 2010-04-02 Program and device for discriminating traffic light

Country Status (1)

Country Link
JP (1) JP2011216051A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014020774A1 (en) * 2012-08-01 2014-02-06 株式会社ジェイエイアイコーポレーション Surveillance camera device
CN103632559A (en) * 2013-12-05 2014-03-12 武汉烽火众智数字技术有限责任公司 Method for detecting states of traffic lights on basis of video analysis
WO2015024180A1 (en) * 2013-08-20 2015-02-26 Harman International Industries, Incorporated Traffic light detection
CN105389993A (en) * 2015-12-11 2016-03-09 成都汇智远景科技有限公司 Visual traffic signal processing and recognition method
WO2016203616A1 (en) * 2015-06-18 2016-12-22 日産自動車株式会社 Traffic light detection device and traffic light detection method
JP2017004040A (en) * 2015-06-04 2017-01-05 株式会社リコー Recognition apparatus, recognition method, and program
CN106529556A (en) * 2016-11-16 2017-03-22 国家电网公司 Visual inspection system for instrument indicator lamp
CN106803064A (en) * 2016-12-26 2017-06-06 广州大学 A kind of traffic lights method for quickly identifying
KR101743389B1 (en) * 2016-01-04 2017-06-07 주식회사 에프에스솔루션 Apparatus and method for traffic signal recognition
CN107533798A (en) * 2015-07-08 2018-01-02 欧姆龙株式会社 Image processing apparatus and with the traffic control system of the device, image processing method
JP2018160153A (en) * 2017-03-23 2018-10-11 東洋建設株式会社 Object detection system
CN109120895A (en) * 2018-08-24 2019-01-01 浙江大丰实业股份有限公司 Exit passageway indicator light operating status certifying organization
CN111666824A (en) * 2020-05-14 2020-09-15 浙江工业大学 Color attribute and machine learning-based indicator light identification method for mobile robot
CN114783192A (en) * 2022-03-24 2022-07-22 杭州海康威视数字技术股份有限公司 Signal lamp color processing method and device

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103703768A (en) * 2012-08-01 2014-04-02 株式会社Jai Surveillance camera device
US9025026B2 (en) 2012-08-01 2015-05-05 Jai Corporation Monitoring camera apparatus
WO2014020774A1 (en) * 2012-08-01 2014-02-06 株式会社ジェイエイアイコーポレーション Surveillance camera device
WO2015024180A1 (en) * 2013-08-20 2015-02-26 Harman International Industries, Incorporated Traffic light detection
US9953229B2 (en) 2013-08-20 2018-04-24 Harman International Industries, Incorporated Traffic light detection
CN103632559A (en) * 2013-12-05 2014-03-12 武汉烽火众智数字技术有限责任公司 Method for detecting states of traffic lights on basis of video analysis
JP2017004040A (en) * 2015-06-04 2017-01-05 株式会社リコー Recognition apparatus, recognition method, and program
WO2016203616A1 (en) * 2015-06-18 2016-12-22 日産自動車株式会社 Traffic light detection device and traffic light detection method
JPWO2016203616A1 (en) * 2015-06-18 2018-04-26 日産自動車株式会社 Signal detection device and signal detection method
CN107533798A (en) * 2015-07-08 2018-01-02 欧姆龙株式会社 Image processing apparatus and with the traffic control system of the device, image processing method
CN107533798B (en) * 2015-07-08 2020-08-14 欧姆龙株式会社 Image processing device, traffic management system having the same, and image processing method
CN105389993B (en) * 2015-12-11 2018-02-23 余战秋 The processing and recognition methods of visual traffic signal
CN105389993A (en) * 2015-12-11 2016-03-09 成都汇智远景科技有限公司 Visual traffic signal processing and recognition method
KR101743389B1 (en) * 2016-01-04 2017-06-07 주식회사 에프에스솔루션 Apparatus and method for traffic signal recognition
CN106529556A (en) * 2016-11-16 2017-03-22 国家电网公司 Visual inspection system for instrument indicator lamp
CN106529556B (en) * 2016-11-16 2019-11-19 国家电网公司 A kind of vision detection system of meter lamp
CN106803064A (en) * 2016-12-26 2017-06-06 广州大学 A kind of traffic lights method for quickly identifying
CN106803064B (en) * 2016-12-26 2020-05-19 广州大学 Traffic light rapid identification method
JP2018160153A (en) * 2017-03-23 2018-10-11 東洋建設株式会社 Object detection system
CN109120895A (en) * 2018-08-24 2019-01-01 浙江大丰实业股份有限公司 Exit passageway indicator light operating status certifying organization
CN109120895B (en) * 2018-08-24 2020-12-04 浙江大丰实业股份有限公司 Device for verifying running state of safety channel indicator lamp
CN111666824A (en) * 2020-05-14 2020-09-15 浙江工业大学 Color attribute and machine learning-based indicator light identification method for mobile robot
CN111666824B (en) * 2020-05-14 2023-12-15 浙江工业大学 Indicator light identification method of mobile robot based on color attribute and machine learning
CN114783192A (en) * 2022-03-24 2022-07-22 杭州海康威视数字技术股份有限公司 Signal lamp color processing method and device

Similar Documents

Publication Publication Date Title
JP2011216051A (en) Program and device for discriminating traffic light
CN107506760B (en) Traffic signal detection method and system based on GPS positioning and visual image processing
EP3036730B1 (en) Traffic light detection
US20190087961A1 (en) Signal identifying device, signal identifying method, and driving support system
CN107891808B (en) Driving reminding method and device and vehicle
KR101799778B1 (en) Method and apparatus for confirmation of relevant white inner circle in environment of circular traffic sign recognition
WO2017028587A1 (en) Vehicle monitoring method and apparatus, processor, and image acquisition device
CN104616021B (en) Traffic sign image processing method and device
JP2013529348A (en) Lighting invariant and robust apparatus and method for detecting and recognizing various traffic signs
JP4863951B2 (en) Traffic light recognition device
KR101409340B1 (en) Method for traffic sign recognition and system thereof
Bui-Minh et al. A robust algorithm for detection and classification of traffic signs in video data
CN107886033B (en) Method and device for identifying circular traffic light and vehicle
CN104408431B (en) Car money recognition methods under traffic monitoring
JP2009163714A (en) Device and method for determining road sign
JP2006259885A (en) Method of recognizing signboard and sign using color image
CN112863194B (en) Image processing method, device, terminal and medium
CN109800693B (en) Night vehicle detection method based on color channel mixing characteristics
JP2004086417A (en) Method and device for detecting pedestrian on zebra crossing
JP2008287735A (en) Method of recognizing signboard and sign using color image
JP2016110373A (en) Curve mirror detection device
JP2012023572A (en) White balance coefficient calculating device and program
KR102188162B1 (en) Method and Apparatus for Detecting Vehicle in Foggy Atmosphere
CN104077566B (en) Bayonet socket picture method for detecting human face based on color difference
Guan et al. Traffic light recognition and dangerous driving events detection from surveillance video of vehicle camera