Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7598779B2 - Congestion rate measurement system and program - Google Patents
[go: Go Back, main page]

JP7598779B2 - Congestion rate measurement system and program - Google Patents

Congestion rate measurement system and program Download PDF

Info

Publication number
JP7598779B2
JP7598779B2 JP2021027001A JP2021027001A JP7598779B2 JP 7598779 B2 JP7598779 B2 JP 7598779B2 JP 2021027001 A JP2021027001 A JP 2021027001A JP 2021027001 A JP2021027001 A JP 2021027001A JP 7598779 B2 JP7598779 B2 JP 7598779B2
Authority
JP
Japan
Prior art keywords
train
image
congestion rate
distance
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2021027001A
Other languages
Japanese (ja)
Other versions
JP2022128660A (en
Inventor
フランシスコ ハビエル メネンデス
英志 阿部
正人 是澤
茂章 足立
秀行 吉野
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.)
Tokyo Metro Co Ltd
Original Assignee
Tokyo Metro Co Ltd
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 Tokyo Metro Co Ltd filed Critical Tokyo Metro Co Ltd
Priority to JP2021027001A priority Critical patent/JP7598779B2/en
Publication of JP2022128660A publication Critical patent/JP2022128660A/en
Application granted granted Critical
Publication of JP7598779B2 publication Critical patent/JP7598779B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Closed-Circuit Television Systems (AREA)
  • Image Analysis (AREA)

Description

本発明は、列車の混雑の程度を示す混雑率を測定する混雑率測定システム及びプログラムに関する。 The present invention relates to a congestion rate measurement system and program that measures the congestion rate, which indicates the degree of congestion on a train.

電車の混雑率(乗車率ともいう)は、輸送人員÷輸送力で算出され、定員乗車の状態で100%となる。混雑度の目安は、100%で「座席につくか、吊り革につかまるか、ドア付近の柱につかまることができる」、150%で「広げて楽に新聞を読める」、180%で「折りたたむなど無理をすれば新聞を読める」、200%で「体が触れ合い相当圧迫感があるが、週刊誌程度なら何とか読める」、250%で「電車がゆれるたびに体が斜めになって身動きできず、手も動かせない」とされている。電車の混雑率は、国土交通省の指針として年に数回の計測が義務付けられている。従来、人が測定対象となる駅に赴いて、電車の車内の状態を目視で確認し、上記目安に照らして混雑度を判断していた。しかし、人が目視で判断することから、個人差が発生すること、同一編成の全ての車両ごとの計測が困難であること、年間を通じて全ての車両、編成で計測することができず、サンプル的な計測しかできないこと等の問題があった。 The congestion rate of a train (also called the occupancy rate) is calculated by dividing the number of passengers by the transportation capacity, and is 100% when the train is at capacity. The congestion rate is roughly 100% when "you can sit in a seat, hold on to a strap, or hold on to a pillar near the door", 150% when "you can read a newspaper easily by spreading it out", 180% when "you can read a newspaper if you make an effort such as folding it", 200% when "your bodies are touching each other and there is a considerable sense of pressure, but you can still read a weekly magazine", and 250% when "every time the train shakes your body becomes tilted and you can't move, and you can't even move your hands". The congestion rate of trains is required to be measured several times a year as a guideline of the Ministry of Land, Infrastructure, Transport and Tourism. Previously, people would go to the stations to be measured, visually check the condition of the train interior, and judge the congestion rate against the above guidelines. However, since the judgment is made by a human being through visual inspection, there are problems such as individual differences that occur, it is difficult to measure every car in the same train, and it is not possible to measure every car and train throughout the year, so only sample measurements can be made.

車両の扉付近にカメラを設置し、乗降人数を計測する方法や、駅のホーム階段付近にカメラを設置し、階段を通る人数を計測する方法が検討されたが、前者は扉の枚数分のカメラが必要となること、後者はホームへの出入り人数は把握できるものの車両ごとの乗車率は計測できず、また併用ホームの場合にはどちらの電車の乗客か判別できないことから現実的なものではなかった。車内にカメラを設置し、乗車人数を計測する方法も提案されているが、各車両にカメラが必要であり、また、カメラの死角になる乗客も多く、正確な計測は不可能であった。さらに、これらのカメラを使用した方法では肖像権を含むプライバシーや個人情報の保護の点からも問題となるが生じる提起されている。 Methods that were considered included installing cameras near the doors of trains to count the number of passengers getting on and off, and installing cameras near the stairs at station platforms to count the number of people using the stairs, but the former would require one camera for each door, and the latter could capture the number of people entering and exiting the platform but would not be able to measure the occupancy rate of each train, and in the case of shared platforms it would not be possible to tell which train passengers were on, making it unrealistic. A method was also proposed in which cameras would be installed inside trains to count the number of passengers, but this would require a camera in each car and there would be many passengers in the camera's blind spot, making accurate counting impossible. Furthermore, it has been pointed out that these methods using cameras could raise issues in terms of protecting privacy and personal information, including portrait rights.

さらに、応荷重と呼ばれる、車両の重量をセンサにより計測したものも混雑率の算出に利用されることもある(特許文献1、2)。特許文献1には、応荷重データを用いた方法が開示されており、これは列車の加減速における駆動力またはブレーキ力を補正するために使用される応荷重装置の積載量検知機構により測定された重量データをもとに、乗車中の乗客に相当する重量を求め、乗車人数を推定し乗車率を算出している。特許文献2には、利用者の意向に応じた情報配信サービスを提供すると共に、利用者の意向を運行管理に利用する鉄道情報配信システムにおいて、重量センサで計測した乗車人数を無線装置、無線基地局及びネットワークを介して運行管理システムに送り、列車の混雑度を把握し、運転整理を行う場合や、運行情報を作成する場合に参照することが開示されている。 Furthermore, the weight of the vehicle measured by a sensor, known as adaptive load, is sometimes used to calculate the congestion rate (Patent Documents 1 and 2). Patent Document 1 discloses a method that uses adaptive load data, which calculates the passenger load by estimating the number of passengers and calculating the occupancy rate based on weight data measured by the load detection mechanism of a adaptive load device used to correct the driving force or braking force when accelerating or decelerating a train. Patent Document 2 discloses that in a railway information distribution system that provides an information distribution service according to the user's wishes and uses the user's wishes in operation management, the number of passengers measured by a weight sensor is sent to the operation management system via a wireless device, a wireless base station, and a network, and the degree of congestion on the train is grasped and referred to when rescheduling operations or creating operation information.

また、乗車率を測定するシステムも提案されている(特許文献3、4)。特許文献3には、駅のホームに進入又はホームから進出していく列車を撮像する撮像装置と、撮像装置により撮像された複数枚の画像を時系列順に結合して車両毎の画像を生成する画像処理装置とを有し、ユーザが車両毎の画像を見て該当車両の乗車率を判断し、乗車率を入力する乗車率測定システムが開示されている。さらに、特許文献3では、車両の画像(特に、車内が見える窓枠内の画像部分)から、エッジの画素数(エッジ量)、画像中に占める人領域の面積、又はコーナーの数を特徴量として抽出し、車両の画像と乗車率との関係を学習して乗車率を自動で算出する機能を設けてもよいことが開示されている。 A system for measuring passenger occupancy rates has also been proposed (Patent Documents 3 and 4). Patent Document 3 discloses an occupancy rate measurement system that has an imaging device that captures images of trains entering or exiting a station platform, and an image processing device that combines multiple images captured by the imaging device in chronological order to generate an image for each vehicle, and in which a user looks at the image for each vehicle, determines the occupancy rate of the corresponding vehicle, and inputs the occupancy rate. Furthermore, Patent Document 3 discloses that a function may be provided to extract the number of edge pixels (edge amount), the area of the human area in the image, or the number of corners as feature amounts from the image of the vehicle (particularly the image portion within the window frame through which the interior of the vehicle can be seen), and to learn the relationship between the image of the vehicle and the occupancy rate and automatically calculate the occupancy rate.

特許文献4には、列車の側方からレーザ距離計を走査して窓を透過して車両内に入射したレーザ光から車両内の3次元形状を把握し、3次元形状のパターン認識によって、乗客を区別し、車両内に存在する乗客数をカウントすることにより乗客の混雑度を検出するシステムが開示されている。さらに、特許文献4には、計測部としてカメラ又は赤外線カメラを使用し、画像内のパターン認識又はフレーム内における乗客の存在を表す領域の面積によって、混雑度を判定することも開示されている。 Patent document 4 discloses a system that uses a laser range finder to scan the side of a train, detects the three-dimensional shape of the interior of the vehicle from laser light that passes through the windows and enters the vehicle, and uses pattern recognition of the three-dimensional shape to distinguish passengers and count the number of passengers present in the vehicle to detect the degree of congestion. Patent document 4 also discloses that a camera or infrared camera is used as a measuring unit, and the degree of congestion is determined by pattern recognition within an image or the area of an area within a frame that indicates the presence of passengers.

特開昭60-8155号公報Japanese Unexamined Patent Publication No. 60-8155 特開2006-4100号公報JP 2006-4100 A 国際公開第2018/61977号International Publication No. 2018/61977 特開2017-144989号公報JP 2017-144989 A

特許文献1の方法は、乗車率を列車の外でリアルタイムに利用するために、車両設備として装備される応荷重装置により取得される応荷重データを車両内の情報処理装置に集約したのち無線回線が地上設備へ伝送する必要があり、無線設備の追加や車両専用設備の改造に関するコストならびに無線回線サービス利用のランニングコストの問題があった。 In the method of Patent Document 1, in order to use the occupancy rate outside the train in real time, the load-adjusting data acquired by the load-adjusting device installed as vehicle equipment must be collected in an information processing device inside the vehicle and then transmitted to the ground equipment via a wireless line, which poses problems in terms of the costs associated with adding wireless equipment and modifying vehicle-specific equipment as well as the running costs of using the wireless line service.

また、特許文献1及び2のように重量に基づく混雑率の算出は、複数の鉄道事業者が列車を相互利用する場合においては、他の鉄道事業者が所有し管理する列車の乗車率のデータを利用するために、その列車を所有する鉄道事業者からデータの提供を受ける必要があり、鉄道事業者間でデータ授受を行うためのシステムや鉄道事業者間での運用ルールの整備が必要となり、システムの複雑さおよびコスト面での問題ならびに運用面での煩雑さを伴う問題があった。 Furthermore, when multiple railway operators share trains, the calculation of congestion rates based on weight as in Patent Documents 1 and 2 requires that data be provided by the railway operator that owns the train in order to use data on occupancy rates of trains owned and managed by other railway operators. This requires the development of a system for exchanging data between railway operators and operational rules between railway operators, resulting in problems with the complexity and cost of the system as well as operational complications.

特許文献3の乗車率測定システムは、ユーザが車両毎の画像を見て該当車両の乗車率を判断しており、自動で測定するものではないし、主観による判断となり客観的に乗車率を測定できない。車両の画像から特徴量を抽出し、乗車率を自動で算出する機能も開示しているが、画像情報から特徴量を抽出することからデータ量及び処理量が大きいという問題がある。 In the passenger occupancy measurement system of Patent Document 3, the user judges the passenger occupancy of each vehicle by looking at the image of each vehicle, and the measurement is not automatic, and the judgment is subjective, so the passenger occupancy cannot be measured objectively. The system also discloses a function to extract features from vehicle images and automatically calculate the passenger occupancy rate, but there is a problem in that the amount of data and processing is large because features are extracted from image information.

この点、特許文献4のシステムにおいても、3次元形状や画像情報からパターン認識や乗客の識別をしており、データ量及び処理量が大きいという問題は変わらない。特に、乗車率の測定は、通勤、通学時間帯のように混雑時における状況を把握することが目標の一つであり、必然、列車の本数も多く、撮像する画像情報のデータ量も、処理量も膨大になり、リアルタイムでの処理は困難であった。さらに、ネットワーク回線を通じてシステムを構築した場合は、送受信するデータ量が大きいため、回線を圧迫して通信速度が低下したり、通信システム自体がダウンしたりする可能性がある。また、肖像権をはじめとするプライバシーや個人情報の問題も解決できていない。しかも、車両側面から一方向にスキャンして得られる3次元分布データでは混雑が激しい状態にあってはスキャンできないエリアの乗客をカウントできないため検出する乗客数が不正確になる問題があった。特許文献4のパノラマ画像による方法においても、混雑が激しい状態にあっては乗客の2次元形状のパターン認識では乗客の誤検出、偽検出による精度の低下が生じる問題があった。 In this respect, the system of Patent Document 4 also performs pattern recognition and passenger identification from three-dimensional shapes and image information, and the problem of large data volume and processing volume remains the same. In particular, one of the goals of measuring passenger occupancy is to grasp the situation during crowded times such as during commuting and school hours, and there are inevitably many trains, so the amount of image information captured and the amount of processing are huge, making real-time processing difficult. Furthermore, if the system is built through a network line, the amount of data to be sent and received is large, which may put strain on the line, slow down the communication speed, or cause the communication system itself to go down. In addition, issues of privacy and personal information, including portrait rights, have not been resolved. Moreover, with three-dimensional distribution data obtained by scanning in one direction from the side of the vehicle, there is a problem that passengers in areas that cannot be scanned cannot be counted in a highly crowded state, resulting in inaccurate detection of the number of passengers. Even with the method using panoramic images in Patent Document 4, there is a problem that in a highly crowded state, pattern recognition of two-dimensional shapes of passengers may result in erroneous detection of passengers and a decrease in accuracy due to false detection.

本発明は、前述した問題の少なくとも一部を解決することを目的とするものであり、低コストで導入可能であって、データ量及び処理量を小さくし、既存の資源を利用しつつ高速で測定可能な列車の混雑率の自動測定システム及びプログラムを提供することを目的の一つとする。また、本発明は、走行中の車両の混雑状況を安価にかつ混雑が激しい状態でも推定精度が高く、更に車両設備を鉄道事業者間で相互に利用する運用形態であってもシステムの複雑化を生じず適用可能な混雑率推定手段を得ることを目的とするものである。 The present invention aims to solve at least some of the problems described above, and one of its objectives is to provide an automatic train congestion rate measurement system and program that can be introduced at low cost, reduces the amount of data and processing, and enables high-speed measurement while utilizing existing resources. Another objective of the present invention is to obtain a congestion rate estimation means that can estimate the congestion status of a moving train at low cost and with high accuracy even in conditions of heavy congestion, and that can be applied without complicating the system even in an operation mode in which train equipment is mutually shared between railway operators.

本発明は、車両内の画像データから乗客の外形上の特徴により識別することなく、車両内の被写体の3次元形状の分布の特徴により混雑率を推定するものである。 The present invention estimates the congestion rate based on the characteristics of the distribution of the three-dimensional shapes of subjects inside the vehicle, without identifying passengers based on their external features from image data inside the vehicle.

上記課題を解決するため、本発明の列車の混雑率測定システムは、二次元画像の画素単位で被写体までの距離情報を有する距離画像を取得できる撮像手段であって、列車の進行方向の側方から前記列車の距離画像を撮像する撮像手段と、前記撮像手段により撮像した前記列車の距離画像を高さ方向に分割して複数のライン画像を生成するライン画像生成手段と、前記ライン画像生成手段で生成したライン画像から距離を階級としたヒストグラムデータを生成するヒストグラム生成手段と、前記ヒストグラム生成手段で生成したヒストグラムデータから、高さに関する要素、ヒストグラムの度数に関する要素及び距離に関する要素を含む特徴データを取得する特徴データ取得手段と、前記特徴データを用いて前記列車の混雑率を推定する推定手段と、を含む。 In order to solve the above problem, the train congestion rate measurement system of the present invention includes an imaging means capable of acquiring a distance image having distance information to a subject in pixel units of a two-dimensional image, the imaging means capturing a distance image of the train from the side in the direction of train travel, a line image generating means dividing the distance image of the train captured by the imaging means in the height direction to generate a plurality of line images, a histogram generating means generating histogram data with distance as a class from the line image generated by the line image generating means, a feature data acquiring means acquiring feature data including a height-related element, a histogram frequency-related element, and a distance-related element from the histogram data generated by the histogram generating means, and an estimation means using the feature data to estimate the congestion rate of the train.

さらに、上記混雑率測定システムにおいて、前記特徴データは、高さに関する要素を一方の軸とし、距離に関する要素を他方の軸とした平面に、度数の要素を各座標に表示した二次元特徴データであることが好ましい。 Furthermore, in the above congestion rate measurement system, it is preferable that the feature data is two-dimensional feature data in which the frequency element is displayed at each coordinate on a plane with the height element on one axis and the distance element on the other axis.

さらに、上記混雑率測定システムにおいて、前記特徴データ取得手段は、複数の距離画像に基づいて生成された総括ヒストグラムデータから特徴データを生成することが好ましい。 Furthermore, in the above-mentioned congestion rate measurement system, it is preferable that the feature data acquisition means generates feature data from overall histogram data generated based on multiple distance images.

さらに、上記混雑率測定システムにおいて、前記混雑率測定システムは、前記特徴データを取得する前に、距離画像のフレーム数によって前記総括ヒストグラムデータを正規化する機能を有することが好ましい。 Furthermore, in the above-mentioned congestion rate measurement system, it is preferable that the congestion rate measurement system has a function of normalizing the overall histogram data by the number of frames of the distance image before acquiring the feature data.

さらに、上記混雑率測定システムにおいて、前記混雑率測定システムは、前記特徴データを取得する前に、前記距離画像又は前記ヒストグラムデータに基づいて前記列車の単位判定領域を検出する機能を有することが好ましい。 Furthermore, in the above congestion rate measurement system, it is preferable that the congestion rate measurement system has a function of detecting the unit judgment area of the train based on the distance image or the histogram data before acquiring the feature data.

さらに、上記混雑率測定システムにおいて、前記ヒストグラム生成手段は、前記距離画像の画素のうち、被写体までの距離が所定の範囲内の画素の距離情報を用いてヒストグラムデータを生成することが好ましい。 Furthermore, in the above-mentioned congestion rate measurement system, it is preferable that the histogram generation means generates the histogram data using distance information of pixels of the distance image whose distance to the subject is within a predetermined range.

さらに、上記混雑率測定システムにおいて、前記混雑率測定システムは、前記特徴データを取得する前に、前記距離画像における窓の領域を検出する機能を有することが好ましい。 Furthermore, in the above-mentioned congestion rate measurement system, it is preferable that the congestion rate measurement system has a function of detecting window areas in the distance image before acquiring the feature data.

さらに、上記混雑率測定システムにおいて、前記ヒストグラム生成手段は、前記距離画像の画素のうち、前記窓の領域内の画素の距離情報を用いてヒストグラムデータを生成し、前記推定手段は、前記窓の領域内の混雑率を推定してもよい。さらに、前記推定手段は、前記列車の単位判定領域内に含まれる前記窓の領域内の混雑率を集計して前記列車の単位判定領域の混雑率を推定してもよい。さらに、前記推定手段は、前記窓の領域の幅、大きさ又は形状により異なる重み付けを行い集計してもよい。 Furthermore, in the above congestion rate measurement system, the histogram generation means may generate histogram data using distance information of pixels within the window area among the pixels of the distance image, and the estimation means may estimate the congestion rate within the window area. Furthermore, the estimation means may estimate the congestion rate of the unit judgment area of the train by tallying up the congestion rates within the window areas included in the unit judgment area of the train. Furthermore, the estimation means may tally up the congestion rates by applying different weights depending on the width, size or shape of the window area.

さらに、上記混雑率測定システムにおいて、前記推定手段は、被写体までの距離が前記列車の中央までの混雑率に所定の倍数を乗じて混雑率を推定してもよい。 Furthermore, in the congestion rate measurement system, the estimation means may estimate the congestion rate by multiplying the congestion rate at the distance to the subject from the center of the train by a predetermined multiple.

さらに、上記混雑率測定システムにおいて、前記推定手段は、前記特徴データにおける度数分布に応じて、混雑率計算におけるパラメータを変更してもよい。 Furthermore, in the above congestion rate measurement system, the estimation means may change parameters in the congestion rate calculation according to the frequency distribution in the feature data.

さらに、上記混雑率測定システムにおいて、前記推定手段は、前記特徴データにおける度数分布を前記列車内の構造物の配置に応じて補正してもよい。さらに、前記混雑率測定システムは、乗客が乗車していない状態の列車に対して撮影した距離画像に基づく特徴データから前記列車内の構造物の配置に関する情報を取得してもよい。 Furthermore, in the above congestion rate measurement system, the estimation means may correct the frequency distribution in the feature data according to the arrangement of structures within the train. Furthermore, the congestion rate measurement system may obtain information regarding the arrangement of structures within the train from feature data based on a distance image taken of a train with no passengers on board.

さらに、上記混雑率測定システムにおいて、前記混雑率測定システムは、前記列車の車両種別を判定し、当該車両種別に応じたパラメータを使用して混雑率を推定してもよい。 Furthermore, in the above congestion rate measurement system, the congestion rate measurement system may determine the vehicle type of the train and estimate the congestion rate using parameters corresponding to the vehicle type.

さらに、上記混雑率測定システムにおいて、前記推定手段は、前記特徴データを独立変数とし、混雑率を従属変数として学習させた回帰モデルを用いて前記列車の混雑率を推定することが好ましい。 Furthermore, in the congestion rate measurement system, it is preferable that the estimation means estimates the congestion rate of the train using a regression model trained with the characteristic data as an independent variable and the congestion rate as a dependent variable.

また、本発明の混雑率測定システムの処理装置は、二次元画像の画素単位で被写体までの距離情報を有する距離画像を取得できる撮像手段を用いて、列車の進行方向の側方から撮像することで得られた前記列車の距離画像を取得する画像取得部と、前記画像取得部で取得した前記列車の距離画像を高さ方向に分割して複数のライン画像を生成するライン画像生成部と、前記ライン画像生成手段で生成したライン画像から距離を階級としたヒストグラムデータを生成するヒストグラム生成部と、前記ヒストグラムデータを出力するデータ出力部と、を含む。 The processing device of the congestion rate measurement system of the present invention also includes an image acquisition unit that acquires a distance image of the train obtained by capturing an image from the side in the direction of travel of the train using an imaging means capable of acquiring a distance image having distance information to a subject in pixel units of a two-dimensional image, a line image generation unit that divides the distance image of the train acquired by the image acquisition unit in the height direction to generate a plurality of line images, a histogram generation unit that generates histogram data with distance as a class from the line image generated by the line image generation means, and a data output unit that outputs the histogram data.

また、本発明の混雑率測定システムの処理装置は、二次元画像の画素単位で被写体までの距離情報を有する距離画像を取得できる撮像手段を用いて、列車の進行方向の側方から撮像することで得られた前記列車の距離画像を高さ方向に分割して生成された複数のライン画像から生成された距離を階級としたヒストグラムデータを取得するデータ取得部と、前記データ取得部で取得したヒストグラムデータから、高さに関する要素、ヒストグラムの度数に関する要素及び距離に関する要素を含む特徴データを取得する特徴データ取得部と、前記特徴データを用いて前記列車の混雑率を推定する推定部と、を含む。 The processing device of the congestion rate measurement system of the present invention includes a data acquisition unit that acquires histogram data with distance hierarchical levels generated from a plurality of line images that are generated by dividing a distance image of the train obtained by imaging the train from the side in the direction of travel in the height direction using an imaging means capable of acquiring a distance image having distance information to a subject in pixel units of a two-dimensional image, a feature data acquisition unit that acquires feature data including elements related to height, elements related to histogram frequency, and elements related to distance from the histogram data acquired by the data acquisition unit, and an estimation unit that estimates the congestion rate of the train using the feature data.

また、本発明のプログラムは、コンピュータに、二次元画像の画素単位で被写体までの距離情報を有する距離画像を取得できる撮像手段を用いて、列車の進行方向の側方から撮像することで得られた前記列車の距離画像を取得する画像取得機能と、前記画像取得部で取得した前記列車の距離画像を高さ方向に分割して複数のライン画像を生成するライン画像生成機能と、前記ライン画像生成手段で生成したライン画像から距離を階級としたヒストグラムデータを生成するヒストグラム生成機能と、前記ヒストグラムデータを出力するデータ出力機能と、を実現させる。 The program of the present invention also causes a computer to realize an image acquisition function that acquires a distance image of the train obtained by capturing an image from the side in the direction of travel of the train using an imaging means capable of acquiring a distance image having distance information to a subject in pixel units of a two-dimensional image, a line image generation function that divides the distance image of the train acquired by the image acquisition unit in the height direction to generate a plurality of line images, a histogram generation function that generates histogram data with distance hierarchical from the line image generated by the line image generation means, and a data output function that outputs the histogram data.

また、本発明のプログラムは、コンピュータに、二次元画像の画素単位で被写体までの距離情報を有する距離画像を取得できる撮像手段を用いて、列車の進行方向の側方から撮像することで得られた前記列車の距離画像を高さ方向に分割して生成された複数のライン画像から生成された距離を階級としたヒストグラムデータを取得するデータ取得機能と、
を取得する画像取得機能と、前記データ取得部で取得したヒストグラムデータから、高さに関する要素、ヒストグラムの度数に関する要素及び距離に関する要素を含む特徴データを取得する特徴データ取得機能と、前記特徴データを用いて前記列車の混雑率を推定する推定機能と、を実現させる。
The program of the present invention provides a computer with a data acquisition function for acquiring histogram data with distance hierarchical levels generated from a plurality of line images generated by dividing a distance image of a train obtained by imaging the train from the side in the direction of travel in a height direction using imaging means capable of acquiring a distance image having distance information to a subject in pixel units of a two-dimensional image;
The data acquisition unit realizes an image acquisition function that acquires the histogram data, a feature data acquisition function that acquires feature data including elements related to height, elements related to histogram frequency, and elements related to distance from the histogram data acquired by the data acquisition unit, and an estimation function that estimates the congestion rate of the train using the feature data.

本発明の混雑率測定システム、処理装置又はプログラムは、比較的安価で製品化されている二次元の距離画像を撮像可能な撮像手段と、コンピュータによって実現可能なデータ変換処理によって簡単に列車の混雑率を測定することができる。特に、撮像手段によって撮像された距離画像をライン画像生成手段によって高さ方向に分割して複数の高さのライン画像を生成し、各ライン画像から距離を階級としたヒストグラムデータを生成し、生成したヒストグラムデータを集計して、高さに関する要素、度数に関する要素及び距離に関する要素を含む特徴データを取得し、特徴データを用いて列車の混雑率を推定することにより、高さごとに生じる空間的な特徴の違いを分割数で担保しつつヒストグラムデータに反映させることができ、データ量を著しく低減することができ、処理速度や通信速度を早くすることができ、リアルタイム性を高めることができる。このように、比較的安価に導入可能なシステムによって、容易に混雑率を把握できるので、列車の運営会社は、効率が良い運用計画を立てることができ、ホームの改善や本数の改善を行うことができる。また、混雑率をユーザに表示することにより、空いている列車を選択することが容易となり、混雑緩和につながる。また、本発明では混雑が激しい状態や空いた状態でも高い精度で混雑率を推定することができ、車両内の構造の違いがあっても高い推定精度で混雑率を推定することができる。 The congestion rate measurement system, processing device, or program of the present invention can easily measure the congestion rate of a train by using an imaging means capable of capturing a two-dimensional distance image that is relatively inexpensive and commercially available, and a data conversion process that can be realized by a computer. In particular, the distance image captured by the imaging means is divided in the height direction by a line image generation means to generate line images of multiple heights, and histogram data with distance as a class is generated from each line image. The generated histogram data is aggregated to obtain feature data including elements related to height, elements related to frequency, and elements related to distance, and the congestion rate of the train is estimated using the feature data. This makes it possible to reflect the differences in spatial characteristics that occur for each height in the histogram data while ensuring them with the number of divisions, and thus makes it possible to significantly reduce the amount of data, increase the processing speed and communication speed, and improve real-time performance. In this way, the congestion rate can be easily grasped by a system that can be introduced relatively inexpensively, so that train operating companies can make efficient operation plans and improve platforms and the number of trains. In addition, by displaying the congestion rate to the user, it becomes easier to select an empty train, which leads to congestion mitigation. Furthermore, the present invention can estimate the congestion rate with high accuracy even in highly crowded or empty conditions, and can estimate the congestion rate with high accuracy even if there are differences in the structure inside the vehicle.

本発明の混雑率測定システムの一実施形態One embodiment of the congestion rate measurement system of the present invention 全体的な処理のフローチャートOverall process flow chart 全体処理におけるデータ変換の説明図Data conversion diagram for overall processing 座位の乗客のみの場合の車内の状況、距離画像及びヒートマップの例。Examples of interior conditions, distance images and heat maps for seated passengers only. 座位及び立位の乗客がいる場合の車内の状況、距離画像及びヒートマップの例。Examples of interior conditions, distance images and heat maps with seated and standing passengers. 高乗車率における車内の状況、距離画像及びヒートマップの例。Examples of interior conditions, distance images and heat maps at high occupancy. 本発明の一実施例のシステム構成図System configuration diagram of one embodiment of the present invention カメラ及び乗客位置を示す車両断面図Vehicle cross-section showing camera and passenger positions 撮像手段の一実施例の構成図FIG. 1 is a diagram showing the configuration of an embodiment of an imaging means. 処理装置の一実施例の構成図1 is a block diagram of an embodiment of a processing device; ステレオカメラの原理を説明する図。FIG. 1 is a diagram illustrating the principle of a stereo camera. カメラの撮影方向と被写体の位置関係及び水平方向の位置の関係図。FIG. 2 is a diagram showing the relationship between the shooting direction of a camera and the position and horizontal position of a subject. 分割処理、ヒストグラム化処理を説明する図A diagram explaining division processing and histogram processing. 単位判定領域の判定処理の一例を説明する図FIG. 13 is a diagram for explaining an example of a unit determination region determination process; 単位判定領域の判定処理の一例を説明する図FIG. 13 is a diagram for explaining an example of a unit determination region determination process; 各単位判定領域から集計ヒストグラムデータ群を生成する処理を説明する図FIG. 13 is a diagram for explaining a process for generating a group of aggregated histogram data from each unit determination region. 特徴データ取得処理を説明する図A diagram explaining the feature data acquisition process ヒートマップより混雑率を推定する処理構成の説明図An explanatory diagram of the processing configuration for estimating congestion rates from heat maps. 混雑率(真値)と混雑率(推定値)の散布図Scatter plot of congestion rate (true value) and congestion rate (estimated value) 図7のシステム構成図におけるメインプログラムのフローチャートの例An example of a flowchart of a main program in the system configuration diagram of FIG. 混雑率推定処理において使用するデータのテーブル構成例Example of table configuration of data used in congestion rate estimation process 列車の端及び連結部の検出方法の説明図Illustration of how to detect train ends and couplings 混雑率の計算を行う部分のプログラムのフローチャートの例Example of a program flowchart for calculating congestion rate 1車両分の混雑率推定値集計方法の説明図An explanatory diagram of the method for calculating the estimated congestion rate for one vehicle 窓幅及び窓高さの検出方法の説明図Window width and window height detection method 一つの窓に対する複数画像より得られる混雑率推定方法の説明図A diagram illustrating a method for estimating the occupancy rate from multiple images of a single window. 混雑率推定処理において使用する車種別のパラメータを格納したテーブル構成例Example of table configuration that stores vehicle type parameters used in congestion rate estimation processing 車種情報取得のプログラムのフローチャートの例Example of a flowchart for a program to obtain vehicle information 列車在線情報の説明図Train location information diagram 撮像手段の変形例の構成図FIG. 1 is a diagram showing a modified example of the imaging means. 混雑率推定における補正方法に関するヒートマップの例Example of heat map regarding correction method for crowding rate estimation 混雑率推定における補正処理のための処理構成の説明図FIG. 1 is an explanatory diagram of a processing configuration for correction processing in congestion rate estimation. 混雑率推定に使用する範囲の説明図An illustration of the range used to estimate the congestion rate 混雑率推定に使用する範囲の説明図An illustration of the range used to estimate the congestion rate 混雑率推定に使用する範囲の説明図An illustration of the range used to estimate the congestion rate 車両ドア付近の車内及びヒートマップの例Example of vehicle interior and heat map near vehicle door 列車先頭車両を撮影するカメラ位置とその画像の例Example of camera position and image capturing of the front car of a train

本発明の混雑率測定システム又はプログラムは、走行中の列車を側面の窓から観察した場合、混雑率が低ければ乗客同士のスペースが広くなり、奥側の座席や壁面などが見えるようになり、逆に混雑率が高ければ乗客同士のスペースが狭くなり、立っている乗客が手前側の座席や窓に接近し、奥が見えなくなっていく。このような現象を空間的な特徴として捉えるため、画素単位で被写体までの距離情報(奥行き、深度、デプスともいう)を有する距離画像を取得できる撮像手段(デプスカメラ)を用いて撮影を行う。これにより、被写体までの距離の空間的な分布を情報として含む距離画像を取得することができ、混雑率の判断材料として利用する。さらに、本発明では、距離画像をそのまま利用するとデータ量が大きいため処理速度や通信速度が重くなることから、距離画像を高さ方向に分割して複数の横方向のライン状の分割画像(以下「ライン画像」という)を生成し、各ライン画像から距離を階級としたヒストグラムデータを生成する。そして、本発明では、生成したヒストグラムデータを集計して、高さに関する要素、ヒストグラムの度数に関する要素及び距離に関する要素を含む特徴データを取得し、かかる特徴データを用いて列車の混雑率を推定する。このように、本願発明の特徴データは、高さに関する要素、ヒストグラムの度数に関する要素及び距離に関する要素を含んでおり、各距離画像の横方向の情報は捨象されるが、他の高さ方向についてはライン画像の分割数に応じた分解能で、また、距離方向についてはヒストグラムの階級に応じた分解能で、高さ方向と距離方向の空間的な分布の特徴を含めることができるので、データ量を著しく低減することができ、処理速度や通信速度を早くすることができ、リアルタイム性を高めることができる。各距離画像の横方向の情報を捨象しても、各画像における横方向の距離の分布は、それぞれ走行中の列車の撮像時における撮像範囲内の一部分を一側面から撮像した特定の一状態を示すだけであり、撮像するタイミングに依存するものであること、さらに、画像の横方向の変化の情報は窓枠や連結部を示す情報のほかに混雑率の推定のために詳細な分析を行う利用価値が少ないことから、その他の情報を含む特徴データから列車の混雑率を推定できる。特徴データは、例えば、高さに関する要素を一方の軸とし、距離に関する要素を他方の軸とした平面に、度数の要素を各座標に表示した二次元特徴データとしてもよい。ここで、度数の要素を色の濃淡で表すとヒートマップとなる。なお、本発明においては、例えば、特徴データを独立変数とし、混雑率を従属変数として学習させた回帰モデルを用いて列車の混雑率を推定することができ、回帰モデルはデータを増やすことにより精度を向上させることができる。 In the congestion rate measurement system or program of the present invention, when a moving train is observed from a side window, if the congestion rate is low, the space between passengers will be wider, and the seats and walls at the back will be visible, and conversely, if the congestion rate is high, the space between passengers will be narrower, and standing passengers will approach the seats and windows at the front, making it difficult to see the back. In order to capture such phenomena as spatial characteristics, an image is taken using an imaging means (depth camera) that can acquire distance images containing distance information (also called depth) to the subject on a pixel-by-pixel basis. This makes it possible to acquire distance images containing information on the spatial distribution of distances to the subject, which are used as a basis for judging the congestion rate. Furthermore, in the present invention, since the data volume is large when the distance image is used as is, which slows down the processing speed and communication speed, the distance image is divided in the height direction to generate multiple horizontal line-shaped divided images (hereinafter referred to as "line images"), and histogram data is generated from each line image with distance as a class. In the present invention, the generated histogram data is collected to obtain feature data including elements related to height, elements related to histogram frequency, and elements related to distance, and the congestion rate of the train is estimated using the feature data. In this way, the feature data of the present invention includes elements related to height, elements related to histogram frequency, and elements related to distance, and although the horizontal information of each distance image is discarded, the spatial distribution features of the height and distance directions can be included with a resolution corresponding to the number of divisions of the line image for the other height directions and with a resolution corresponding to the class of the histogram for the distance direction. This allows the amount of data to be significantly reduced, the processing speed and communication speed to be increased, and real-time performance to be improved. Even if the horizontal information of each distance image is discarded, the horizontal distance distribution in each image only shows a specific state in which a part of the imaging range is imaged from one side when imaging a running train, and depends on the timing of imaging. Furthermore, the information on the horizontal change of the image has little value in performing detailed analysis to estimate the congestion rate, other than information showing the window frames and coupling parts, so that the congestion rate of the train can be estimated from the feature data including other information. The feature data may be, for example, two-dimensional feature data in which the frequency element is displayed at each coordinate on a plane with the height element on one axis and the distance element on the other axis. If the frequency element is represented by a shade of color, it becomes a heat map. In the present invention, for example, the train congestion rate can be estimated using a regression model trained with the feature data as an independent variable and the congestion rate as a dependent variable, and the accuracy of the regression model can be improved by increasing the amount of data.

以下、図面を参照し、本発明の実施形態に係る車両混雑率推定システムについて説明する。図中、同一又は対応する部分に同一の符号を付す。 Below, a vehicle congestion rate estimation system according to an embodiment of the present invention will be described with reference to the drawings. In the drawings, the same or corresponding parts are given the same reference numerals.

[混雑率測定システムの構成]
図1は、本発明の混雑率測定システム1(以下「測定システム」とも称す)の一実施形態である。測定システム1は、列車2の進行方向7の側方に配置された撮像手段11によって撮像された列車の距離画像Fをライン画像生成手段12に伝達し、ライン画像生成手段12で生成されたライン画像F-1~F-4をヒストグラム生成手段13に伝達し、ヒストグラム生成手段13で生成されたヒストグラムデータH-1~H-4を特徴データ取得手段14に伝達し、特徴データ取得手段14で取得した特徴データCを推定手段15に伝達し、推定手段15において列車の混雑率を推定する。推定した混雑率は出力手段16に出力してもよい。列車2の混雑率は、列車2における実際の搬送物(人又は物)の量の程度を示す指標であり、乗車率を含む。限定されるものではないが、例えば、人を搬送する場合は、定員乗車を100%とした場合の実際の乗車人員の比率を混雑率としてもよい。また、混雑度の目安として、100%で「座席につくか、吊り革につかまるか、ドア付近の柱につかまることができる」、150%で「広げて楽に新聞を読める」、180%で「折りたたむなど無理をすれば新聞を読める」、200%で「体が触れ合い相当圧迫感があるが、週刊誌程度なら何とか読める」、250%で「電車がゆれるたびに体が斜めになって身動きできず、手も動かせない」という基準で判定してもよい。
[Configuration of the congestion rate measurement system]
FIG. 1 shows an embodiment of a congestion rate measurement system 1 (hereinafter also referred to as a "measurement system") of the present invention. The measurement system 1 transmits a distance image F of a train captured by an imaging means 11 arranged on the side of a train 2 in a traveling direction 7 to a line image generation means 12, transmits line images F-1 to F-4 generated by the line image generation means 12 to a histogram generation means 13, transmits histogram data H-1 to H-4 generated by the histogram generation means 13 to a feature data acquisition means 14, transmits feature data C acquired by the feature data acquisition means 14 to an estimation means 15, and estimates the congestion rate of the train in the estimation means 15. The estimated congestion rate may be output to an output means 16. The congestion rate of the train 2 is an index indicating the degree of the amount of actual transported goods (people or objects) in the train 2, and includes the passenger load rate. For example, in the case of transporting people, the ratio of the actual number of passengers when the capacity of the train is set to 100% may be used as the congestion rate. In addition, as a guide to the degree of congestion, 100% means "you can sit in a seat, hold on to a strap, or hold on to a pillar near the door", 150% means "you can read a newspaper easily by unfolding it", 180% means "you can read a newspaper if you make an effort such as folding it", 200% means "your bodies are touching each other and there is a considerable sense of pressure, but you can still read a weekly magazine", and 250% means "every time the train shakes your body becomes tilted and you cannot move, even your hands".

列車2は、人または物を搬送物として移動させる手段であり、電車、汽車、貨車、モノレール等を含む。ただし、列車2は、搬送物(人又は物)の少なくとも一部を撮像手段11によって外部から確認可能な搬送物確認領域を備える必要がある。電車の場合は、側面に設けられた窓(車両窓)5aや扉に設けられた窓(ドア窓)5bが搬送物確認領域となる。本発明は、特に、多数の乗客を搬送する列車に適用することが好ましい。また、本発明は、複数の車両3が連結部4で連結された列車2の各車両のように、混雑度等を判定する領域の単位となる単位判定領域(車両)を複数有する列車に対しても利用可能であるし、一両編成の列車2のように単位判定領域が一つの列車にも利用可能である。 The train 2 is a means for moving people or objects as objects, and includes electric trains, steam trains, freight cars, monorails, etc. However, the train 2 must have an object confirmation area where at least a part of the object (people or objects) can be confirmed from the outside by the imaging means 11. In the case of a train, the object confirmation area is a window (car window) 5a on the side or a window (door window) 5b on the door. The present invention is particularly preferably applied to trains that carry a large number of passengers. The present invention can also be used for trains that have multiple unit judgment areas (cars) that serve as units of areas for determining the degree of congestion, etc., such as each car of a train 2 in which multiple cars 3 are coupled by coupling parts 4, and can also be used for trains with one unit judgment area, such as a train 2 with one car.

撮像手段11は、二次元画像の画素単位で被写体までの距離を測定できる撮像手段であり、列車2の進行方向7の側方から列車の二次元の距離画像を撮像する。距離画像とは、各画素に被写体までの距離(奥行き、深度、デプスともいう)の情報を含む二次元画像である。撮像手段11として、デプスカメラや赤外線カメラを使用することができる。デプスカメラは、例えば、赤外光のレーザーパターンを被写体に照射し、反射して戻ってきた光を赤外線カメラで受光して光の到達時間で距離を測定するTOF(Time Of Flight)方式のものを使用してもよいし、ステレオカメラ方式のものを使用してもよい。撮像手段11は、距離画像に加えて、可視光による通常の二次元画像を撮像可能であってもよい。 The imaging means 11 is an imaging means capable of measuring the distance to a subject in pixel units of a two-dimensional image, and captures a two-dimensional distance image of the train 2 from the side in the traveling direction 7 of the train. A distance image is a two-dimensional image in which each pixel contains information on the distance to the subject (also called depth). A depth camera or an infrared camera can be used as the imaging means 11. The depth camera may be, for example, a TOF (Time Of Flight) type that irradiates a laser pattern of infrared light on the subject and receives the reflected light with an infrared camera to measure the distance based on the arrival time of the light, or a stereo camera type. In addition to distance images, the imaging means 11 may be capable of capturing normal two-dimensional images using visible light.

ライン画像生成手段12は、取得した距離画像を高さ方向に分割して複数のライン画像F-1~F-4を生成し、ヒストグラム生成手段13は、各ライン画像からヒストグラムデータH-1~H-4を生成し、データ量を軽量化してその後の処理及びネットワークによる送受信を容易にすることができる。また、特徴データ取得手段14は、ヒストグラムデータH-1~H-4から、高さに関する要素、ヒストグラムの度数に関する要素及び距離に関する要素を含む特徴データを取得し、推定手段15は、特徴データを用いて列車の混雑率を推定する。各手段における具体的な処理については後述する。これらの手段としては、ライン画像生成プログラム、ヒストグラム生成プログラム、特徴データ取得プログラム、推定プログラムがインストールされた情報処理装置、例えば、パーソナルコンピュータ、サーバ、タブレット端末、PDA(Personal Digital Assistant)、多機能携帯電話(スマートフォン、i-phone(登録商標))、半導体集積回路などを利用できる。これらの手段を含む装置は、データを取得するデータ取得部と、処理したデータを出力するデータ出力部とを有している。データ取得部は、当該装置に接続された前段の手段(例えば、ライン画像生成手段12に対する撮像手段11)でもよいし、取得するデータが記憶された記憶媒体でもよいし、記憶媒体を接続する接続手段(例えば、USB端子、メモリースロット、光学ドライブ)でもよいし、ネットワークを通じてデータを受信するための通信手段(例えば、有線通信手段、無線通信手段など)でもよい。データ出力部は、当該装置に接続された後段の手段(例えば、ライン画像生成手段12に対するヒストグラム生成手段13)でもよいし、データを記憶媒体に出力するための接続手段(例えば、USB端子、メモリースロット、光学ドライブ)でもよいし、ネットワークを通じてデータを送信するための通信手段(例えば、有線通信手段、無線通信手段など)でもよい。 The line image generating means 12 divides the acquired distance image in the height direction to generate multiple line images F-1 to F-4, and the histogram generating means 13 generates histogram data H-1 to H-4 from each line image, reducing the amount of data and facilitating subsequent processing and transmission and reception via the network. The feature data acquiring means 14 acquires feature data including elements related to height, elements related to histogram frequency, and elements related to distance from the histogram data H-1 to H-4, and the estimation means 15 estimates the congestion rate of the train using the feature data. The specific processing in each means will be described later. As these means, an information processing device in which a line image generating program, a histogram generating program, a feature data acquiring program, and an estimation program are installed, such as a personal computer, a server, a tablet terminal, a PDA (Personal Digital Assistant), a multi-function mobile phone (smartphone, i-phone (registered trademark)), and a semiconductor integrated circuit, can be used. The device including these means has a data acquiring unit that acquires data and a data output unit that outputs processed data. The data acquisition unit may be a previous stage means connected to the device (e.g., imaging means 11 for line image generation means 12), a storage medium in which the data to be acquired is stored, a connection means for connecting a storage medium (e.g., a USB terminal, a memory slot, an optical drive), or a communication means for receiving data through a network (e.g., a wired communication means, a wireless communication means, etc.). The data output unit may be a subsequent stage means connected to the device (e.g., histogram generation means 13 for line image generation means 12), a connection means for outputting data to a storage medium (e.g., a USB terminal, a memory slot, an optical drive), or a communication means for transmitting data through a network (e.g., a wired communication means, a wireless communication means, etc.).

出力手段16は、推定結果を出力する手段であり、例えば、ディスプレイ、プロジェクタ、プリンタ、スピーカ(音声出力)等を適宜使用でき、パーソナルコンピュータ、タブレット端末、PDA(Personal Digital Assistant)、多機能携帯電話(スマートフォン、i-phone(登録商標))のディスプレイを使用してもよい。駅のホーム、待合所等に出力手段16を設置してもよいし、ユーザの端末装置(タブレット端末、PDA、多機能携帯電話等)を出力手段としてネットワークを通じて推定結果を送信してもよいし、インターネットのウェブページに推定結果を表示してもよい。 The output means 16 is a means for outputting the estimation results, and may be, for example, a display, projector, printer, speaker (audio output), etc., as appropriate. A display of a personal computer, tablet terminal, PDA (Personal Digital Assistant), or multi-function mobile phone (smartphone, iPhone (registered trademark)) may be used. The output means 16 may be installed on a station platform, waiting room, etc., or the estimation results may be transmitted via a network using a user's terminal device (tablet terminal, PDA, multi-function mobile phone, etc.) as output means, or the estimation results may be displayed on an Internet webpage.

撮像手段11、ライン画像生成手段12、ヒストグラム生成手段13、特徴データ取得手段14、推定手段15及び出力手段16は、それぞれ別々のハードウェアにおいて実現されてもよいし、幾つかの手段を一つのハードウェアで実現してもよいし、全ての手段を一つのハードウェアで実現してもよい。特に撮像手段11からライン画像生成手段12には、データ量が大きい距離画像Fが伝達されるので、一体化するか専用の回線で連結することが好ましい。さらに、ライン画像生成手段12からヒストグラム生成手段13についても高さ方向に分割されているが、比較的データ量が大きいライン画像F-1~F-4が伝達されるので、一体化するか専用の回線で連結することが好ましい。ヒストグラムデータH-1~H-4は、比較的データ量が小さいため、ネットワークを介して外部の特徴データ取得手段14に伝達してもよい。特徴データ取得手段14及び推定手段15は、比較的データ処理に高性能の演算処理能力が求められるため、ネットワークを介して接続可能な別体のハードウェア、例えばサーバで実現してもよい。この場合、複数の地点に撮像手段11、ライン画像生成手段12及びヒストグラム生成手段13を設置し、ネットワークを通じて特徴データ取得手段14及び推定手段15を含むサーバにヒストグラムデータを伝達することにより、同一の又は別々の列車の混雑率を推定することができ、総合的な混雑率に関するデータを収集することができる。さらに、この収集したデータを使用して推定手段を学習させることにより、混雑率の正確性を高めることができる。 The imaging means 11, the line image generating means 12, the histogram generating means 13, the feature data acquiring means 14, the estimation means 15 and the output means 16 may be realized by separate hardware, or some of the means may be realized by one hardware, or all of the means may be realized by one hardware. In particular, the imaging means 11 transmits the distance image F, which has a large amount of data, to the line image generating means 12, so it is preferable to integrate them or connect them by a dedicated line. Furthermore, the line image generating means 12 transmits the line images F-1 to F-4, which have a relatively large amount of data, which are also divided in the height direction, so it is preferable to integrate them or connect them by a dedicated line. The histogram data H-1 to H-4 have a relatively small amount of data, so they may be transmitted to the external feature data acquiring means 14 via a network. The feature data acquiring means 14 and the estimation means 15 require relatively high-performance computing power for data processing, so they may be realized by separate hardware that can be connected via a network, such as a server. In this case, by installing the imaging means 11, the line image generating means 12, and the histogram generating means 13 at multiple locations and transmitting the histogram data to a server including the feature data acquiring means 14 and the estimating means 15 via a network, it is possible to estimate the congestion rate of the same or different trains, and to collect data on the overall congestion rate. Furthermore, by training the estimating means using this collected data, it is possible to improve the accuracy of the congestion rate.

[全体処理]
図2は、本発明の混雑率測定システム1における全体的な処理のフローチャートであり、図3は、本発明の全体処理におけるデータ変換を説明するための図であり、(A)は距離画像F1、(B)は車内を上から見た乗客の配置、(C)は距離画像を高さ方向に分割したライン画像F1-c、(D)はライン画像F1-cから生成されたヒストグラムデータH1-c、(E)はヒストグラムデータを集計した奥行き方向と高さ方向を座標とした度数分布(特徴データ)H1、(F)は奥行き方向の階級を示す。
[Overall processing]
FIG. 2 is a flowchart of the overall processing in the congestion rate measurement system 1 of the present invention, and FIG. 3 is a diagram for explaining the data conversion in the overall processing of the present invention, in which (A) is a distance image F1, (B) is the arrangement of passengers when viewed from above inside the vehicle, (C) is a line image F1-c obtained by dividing the distance image in the height direction, (D) is histogram data H1-c generated from the line image F1-c, (E) is a frequency distribution (feature data) H1 obtained by aggregating the histogram data with the depth and height directions as coordinates, and (F) shows the depth-direction classes.

まず、測定システム1は、S1において、撮像手段11によって列車の側方から二次元の距離画像を撮像する。図3(A)は、図3(B)に示す車内を撮像手段11で撮像した距離画像F1である。二次元の距離画像F1は、各画素に被写体までの距離情報を有しており、例えば、図3(F)に示す階級に応じた画素の濃淡によって各被写体までの距離を示してもよい。 First, in S1, the measurement system 1 captures a two-dimensional distance image from the side of the train using the imaging means 11. Fig. 3 (A) shows a distance image F1 captured by the imaging means 11 of the interior of the train shown in Fig. 3 (B). Each pixel of the two-dimensional distance image F1 has distance information to the subject, and the distance to each subject may be indicated by, for example, pixel shading according to the class shown in Fig. 3 (F).

次に、測定システム1は、S2において、ライン画像生成手段12によって二次元の距離画像F1を高さ方向(縦方向)にn分割し、ライン画像F1-1~F1-nを生成する。図3(A)においては、例示的に3つのライン画像F1-a、F1-b、F1-cを示しているが、少なくとも距離画像の搬送物確認領域を含む領域全体を高さ方向に分割することが好ましい。ただし、搬送物確認領域の一部分でもよいし、距離画像の全体を高さ方向に分割してもよい。図3(C)は、一つのライン画像F1-cを抽出したものである。本発明のライン画像は、距離画像を高さ方向に分割して生成する。高さ方向にH画素、幅方向にW画素であるH×Wの画素数の画像だった場合、縦方向の分割数nは2≦n≦Hであり、ライン画像のサイズはH/n×Wとなる。車内状況は、列車の車両によっても、時間によっても、曜日によっても大きく異なるものであり、非常に多様性に富んでいる。被写体の多様性を鑑みると、分割数が少なすぎると搬送物の高さ方向の空間的特徴を潰し過ぎてしまうおそれがあること、分割数が多すぎるとデータのサイズが肥大化することを考慮して分割数を決定する。さらに、距離画像の解像度によって分割数を変更してもよい。限定するものではないが、n=4、n=8、n=16、n=32又はn=Hとしてもよい。また、尺度を均一にするため、等間隔で分割するのが好ましいが、分割幅に比重を付けて、多くの搬送物が重なる領域は高さ方向の特徴の分解能を高くするため分割幅を狭くし、搬送物が少ない領域は分割幅を大きくしてもよい。一実施例では、H×W=848×480の解像度のデプスカメラを使用して等間隔で8分割した場合は、108×480のライン画像が8枚生成される。 Next, in S2, the measurement system 1 divides the two-dimensional distance image F1 into n in the height direction (vertical direction) by the line image generating means 12 to generate line images F1-1 to F1-n. In FIG. 3(A), three line images F1-a, F1-b, and F1-c are shown as examples, but it is preferable to divide at least the entire area including the transported goods confirmation area of the distance image in the height direction. However, it is also possible to divide a part of the transported goods confirmation area, or the entire distance image in the height direction. FIG. 3(C) shows one line image F1-c extracted. The line image of the present invention is generated by dividing the distance image in the height direction. In the case of an image with H×W pixels, where H pixels in the height direction and W pixels in the width direction, the number of divisions n in the vertical direction is 2≦n≦H, and the size of the line image is H/n×W. The situation inside the train varies greatly depending on the train car, the time, and the day of the week, and is very diverse. Considering the diversity of the subject, the number of divisions is determined taking into consideration that if the number of divisions is too small, the spatial features of the transported object in the height direction may be overlooked, and if the number of divisions is too large, the data size will become large. Furthermore, the number of divisions may be changed depending on the resolution of the distance image. Although not limited to, n=4, n=8, n=16, n=32, or n=H may be used. In addition, to make the scale uniform, it is preferable to divide at equal intervals, but it is also possible to weight the division width and narrow the division width in areas where many transported objects overlap to increase the resolution of the features in the height direction, and to increase the division width in areas where there are few transported objects. In one embodiment, when a depth camera with a resolution of H×W=848×480 is used to divide into eight equal intervals, eight line images of 108×480 are generated.

さらに、測定システム1は、S3において、ヒストグラム生成手段13によってライン画像からヒストグラムデータHを生成する。加えて、測定システム1は、必要に応じて、S4において、ヒストグラムデータから単位判定領域(例えば車両)を判定してもよい。図3(D)は、ライン画像F1-cから生成されたヒストグラムデータH1-cであり、横軸が被写体までの距離の階級であり、縦軸の度数が画素数である。本発明のヒストグラムデータは、一定の幅の距離を階級とし、各階級に含まれる距離の画素の数を頻度としてカウントしたものである。典型的には、柱状グラフとして表現されているが、グラフで表現したものに限定されず、各階級幅に含まれる度数の分布を把握できるデータであればよく、例えば、度数分布表の形式や文字情報として表現されたものも含む。また、ヒストグラムデータは、1枚の距離画像に対して生成してもよいし、連続して撮影した複数枚(例えば単位判定領域)の距離画像(動画の各フレーム画像を含む)のライン画像に対して生成してもよい。複数のフレーム画像のヒストグラムを生成する場合は、各フレーム画像における同じ高さのライン画像のヒストグラムを集計して総括ヒストグラムデータを生成してもよい。なお、総括ヒストグラムデータは、ヒストグラム生成手段で生成してもよいし、総括ヒストグラム生成手段を別途設けてもよい。例えば、特徴データ取得手段の一部として総括ヒストグラム生成手段を設けてもよい。 Furthermore, in S3, the measurement system 1 generates histogram data H from the line image by the histogram generating means 13. In addition, in S4, the measurement system 1 may determine a unit determination area (e.g., a vehicle) from the histogram data, as necessary. FIG. 3(D) shows histogram data H1-c generated from the line image F1-c, where the horizontal axis represents the class of the distance to the subject, and the vertical axis represents the frequency of pixels. The histogram data of the present invention is obtained by counting the number of pixels at distances included in each class as a frequency, with distances of a certain width being classified as classes. Typically, the histogram is expressed as a column graph, but is not limited to those expressed as graphs, and may be data that can grasp the distribution of the frequency included in each class width, including, for example, those expressed in the form of a frequency distribution table or text information. In addition, the histogram data may be generated for one distance image, or may be generated for line images of distance images (including each frame image of a video) of multiple images (e.g., unit determination areas) captured continuously. When generating histograms for multiple frame images, the histograms of line images of the same height in each frame image may be aggregated to generate overall histogram data. The overall histogram data may be generated by a histogram generating means, or an overall histogram generating means may be provided separately. For example, the overall histogram generating means may be provided as part of the feature data acquiring means.

また、測定システム1は、必要に応じて、S5において、ヒストグラムデータを正規化してもよい。ヒストグラムデータは、データの基礎となった単位判定領域のフレーム数、画素数、搬送物確認領域の大きさ等によって正規化することが好ましい。例えば、h1×w1のライン画像に基づく第1のヒストグラムデータH1と、h2×w2のライン画像に基づく第2のヒストグラムデータH2とをそのまま使用するのではなく、画素数によって度数を正規化した第1のヒストグラムデータ(例えば、H1/h1×w1)と第2のヒストグラムデータ(例えば、H2/h2×w2)とすることで、データを規格化することができ比較対象として相互に利用することが容易となる。また、1号車のフレーム画像が240枚であり、2号車のフレーム画像が150枚であった場合は、1号車のフレーム画像に基づいて集計された総括ヒストグラムデータH3をフレーム数で正規化し、正規化総括ヒストグラムデータ(H3/240)を生成し、2号車のフレーム画像に基づいて集計された総括ヒストグラムデータH4をフレーム数で正規化し、正規化総括ヒストグラムデータ(H4/150)を生成することで、データを規格化することができ比較対象として相互に利用することが容易となる。なお、搬送物確認領域を含まないフレーム画像を除外して搬送物確認領域を含むフレーム画像のみを使用して単位判定領域の総括ヒストグラムデータを生成した場合、単位判定領域における搬送物確認領域を含むフレーム画像の枚数で正規化してもよいし、単位判定領域における全フレーム画像数(搬送物確認領域を含まないフレーム画像の枚数も含む)で正規化してもよい。 In addition, the measurement system 1 may normalize the histogram data in S5 as necessary. It is preferable to normalize the histogram data by the number of frames, the number of pixels, the size of the transported object confirmation area, etc. of the unit judgment area on which the data is based. For example, instead of using the first histogram data H1 based on the h1 x w1 line image and the second histogram data H2 based on the h2 x w2 line image as is, the first histogram data (e.g., H1/h1 x w1) and the second histogram data (e.g., H2/h2 x w2) whose frequencies are normalized by the number of pixels are used, and the data can be standardized, making it easy to use them mutually as comparison targets. Also, if there are 240 frame images of car 1 and 150 frame images of car 2, the overall histogram data H3 compiled based on the frame images of car 1 is normalized by the number of frames to generate normalized overall histogram data (H3/240), and the overall histogram data H4 compiled based on the frame images of car 2 is normalized by the number of frames to generate normalized overall histogram data (H4/150). This allows the data to be standardized and makes it easy to use the data mutually as a comparison target. Note that, if frame images that do not include a transported item confirmation area are excluded and only frame images that include a transported item confirmation area are used to generate overall histogram data for a unit judgment area, normalization may be performed by the number of frame images that include a transported item confirmation area in the unit judgment area, or by the total number of frame images in the unit judgment area (including the number of frame images that do not include a transported item confirmation area).

測定システム1は、S6において、特徴データ取得手段14によってヒストグラムデータから特徴データCを取得する。本発明の特徴データは、少なくとも高さに関する要素、ヒストグラムの度数に関する要素及び距離に関する要素を含むものである。例えば、高さに関する要素を一方の軸とし、距離に関する要素を他方の軸とした平面に、度数の要素を各座標に表示した二次元特徴データとしてもよいが、これに限定されない。図3(E)は、奥行き方向、高さ方向及び画素数の3つの軸からなる三次元の度数分布で特徴データを表示しているが、図1の特徴データCのように、画素数の度数を画素の濃淡で示した二次元特徴データ(ヒートマップ)で表示してもよい。各度数に関する要素は、各階級の頻度(ヒストグラムのカウント単位、典型的には画素数)に基づくものであり、頻度それ自体、相対度数、累積度数、累積相対度数、正規化された度数、重み付けされた度数等を含み、距離に関する要素は、各階級における距離範囲に基づくものであり、階級、階級値等を含み、高さに関する要素は、被写体における高さ方向の特徴を含むものであり、高さ方向に分割された度数分布等を含む。また、特徴データは、1枚のフレーム画像に基づいて生成されてもよいし、複数のフレーム画像(例えば単位判定領域)に基づいて生成された総括ヒストグラムデータから生成されてもよい。さらに、特徴データは、データの基礎となったフレーム数、解像度(画素数)によって正規化されていてもよい。 In S6, the measurement system 1 acquires feature data C from the histogram data by the feature data acquisition means 14. The feature data of the present invention includes at least an element related to height, an element related to the frequency of the histogram, and an element related to distance. For example, the feature data may be two-dimensional feature data in which the frequency element is displayed at each coordinate on a plane with the element related to height as one axis and the element related to distance as the other axis. However, this is not limited to this. FIG. 3(E) displays the feature data in a three-dimensional frequency distribution consisting of three axes, the depth direction, the height direction, and the number of pixels, but it may also be displayed as two-dimensional feature data (heat map) in which the frequency of the number of pixels is shown by the shade of the pixels, as in the feature data C of FIG. 1. Each frequency-related element is based on the frequency of each class (the count unit of the histogram, typically the number of pixels), and includes the frequency itself, the relative frequency, the cumulative frequency, the cumulative relative frequency, the normalized frequency, the weighted frequency, etc., the distance-related element is based on the distance range in each class, and includes the class, the class value, etc., and the height-related element includes the height-direction characteristics of the subject, and includes the frequency distribution divided in the height direction, etc. In addition, the feature data may be generated based on one frame image, or may be generated from overall histogram data generated based on multiple frame images (e.g., unit determination regions). Furthermore, the feature data may be normalized by the number of frames and the resolution (number of pixels) on which the data is based.

測定システム1は、S7において、推定手段15によって特徴データCから混雑率を推定する。推定手段15は、特徴データを独立変数とし、混雑率を従属変数として学習させた回帰モデルを用いて、各車両における列車の混雑率を推定することができる。特徴データは、学習時において使用した形式の特徴データを使用する。例えば、単位判定領域の複数のフレーム画像に基づく総括ヒストグラムデータから生成した特徴データを使用して学習した回帰モデルを用いる場合には、同様に、単位判定領域の複数のフレーム画像に基づく総括ヒストグラムデータから特徴データを生成し、その特徴データと回帰モデルを用いて混雑率を推定する。また、1枚のフレーム画像に基づくヒストグラムデータから生成した特徴データを使用して学習した回帰モデルを用いる場合には、1枚のフレーム画像に基づくヒストグラムデータから特徴データを生成し、その特徴データと回帰モデルを用いて混雑率を推定する。さらに、測定システム1は、必要に応じて、S8において、次のデータ、例えば、別の距離画像に基づく特徴データや、別の単位判定領域の有無を判定し、次のデータを有する場合(Yes)は、再びS7に戻り次のデータの混雑率を推定し、無い場合(No)は、必要に応じて推定結果を出力し、処理を終了する。なお、S4は、単位判定領域が一つの場合は省略してもよい。さらに、測定システム1は、S2~S5の何れかにおいて所定の範囲外の画素を除去する除去処理を実行してもよい。 In S7, the measurement system 1 estimates the congestion rate from the feature data C by the estimation means 15. The estimation means 15 can estimate the congestion rate of the train in each car using a regression model trained with the feature data as an independent variable and the congestion rate as a dependent variable. The feature data uses the feature data in the format used during learning. For example, when using a regression model trained using feature data generated from overall histogram data based on multiple frame images of the unit determination area, feature data is similarly generated from overall histogram data based on multiple frame images of the unit determination area, and the congestion rate is estimated using the feature data and the regression model. Also, when using a regression model trained using feature data generated from histogram data based on one frame image, feature data is generated from histogram data based on one frame image, and the congestion rate is estimated using the feature data and the regression model. Furthermore, in S8, the measurement system 1 determines whether or not there is next data, for example, feature data based on another distance image or another unit determination area, and if there is next data (Yes), it returns to S7 again to estimate the congestion rate of the next data, and if there is not (No), it outputs the estimation result as necessary and ends the process. Note that S4 may be omitted if there is only one unit determination area. Furthermore, the measurement system 1 may perform a removal process in any of S2 to S5 to remove pixels outside a predetermined range.

図4~6は、車内の状況とそれを撮像した距離画像から取得した特徴データの傾向を説明する図であり、それぞれ座位のみの乗客の場合、座位と立位で吊り革を持つ乗客がいる場合及び混雑レベルが高い場合の距離画像に基づいて生成された特徴データ41、車窓から見た車内の画像42及び車両上部から見た車内の様子43の例をそれぞれ示している。特徴データ41は、撮像手段11で撮像した画像42をライン画像に分割し、そこからヒストグラムデータを生成し、奥行きと高さ方向を座標として画素数の多さを濃淡としたヒートマップで表示したものである。ここで、奥行き方向の軸と高さ方向の軸とで構成される各座標を「セル」と呼ぶ。ヒートマップにおけるセルの濃淡と画素数の関係を図に併記した。ヒートマップで表すことにより、車内における乗客10の分布を視覚的に捉えることができる。 Figures 4 to 6 are diagrams explaining the state of the interior of the train and the tendency of the feature data obtained from the distance images captured from the same, showing examples of feature data 41 generated based on distance images for the cases of only seated passengers, seated and standing passengers holding onto straps, and high congestion levels, image 42 of the interior of the train as seen from the train window, and state 43 of the interior of the train as seen from the top of the train. The feature data 41 is obtained by dividing image 42 captured by the imaging means 11 into line images, generating histogram data from the line images, and displaying the data as a heat map in which the number of pixels is represented by shading, with the depth and height directions as coordinates. Here, each coordinate consisting of the depth axis and the height axis is called a "cell." The relationship between the shading and the number of pixels of the cells in the heat map is also shown in the figures. By displaying the data as a heat map, the distribution of passengers 10 in the train can be visually grasped.

図4は、車内に座位の乗客10a、10bのみの場合であり、ヒートマップ41上では車両の手前側の低い位置のエリア41a及び奥側の低い位置のエリア41bに被写体の画素が存在する分布となっており、その濃淡は画像内の着座している乗客数と相関がある。図5では、座位の乗客10a、10bのほかに立位の乗客10c、10dがいるため、図4と同様に座位乗客10aに対応するヒートマップのエリア41aが濃くなっているが、さらに吊り革付近の立位乗客10a、10bに対応するヒートマップのエリア41c、41dも比較的濃い分布となっており、高い位置にも被写体の画素が分布している。しかし、通路中央付近に対応するエリア41eについては比較的薄い分布となる。図6は、図5と比べて更に立位の乗客10eが多く乗車した場合であり、手前側の座位の乗客10aと、吊り革付近及び通路中央に重なって乗車した立位の乗客10eに対応して、ヒートマップ上の手前側の低い位置から奥側の吊り革付近の高い位置にかけて広いエリアで濃い分布となっている。一方、図6においてカメラ11から見て奥側の座位の乗客付近のエリア41fが薄い分布となっているが、これは手前側の立位の乗客及び通路中央に重なって立つ乗客によって奥側のようすがカメラ画像に写らなくなっているために生じるものである。このように、特徴データは、車内の状況を反映するものであり、特徴データを用いて混雑率を推定することが可能なのである。 Figure 4 shows the case where only seated passengers 10a and 10b are present in the vehicle, and the pixels of the subject are distributed in the heat map 41 in the low area 41a at the front of the vehicle and in the low area 41b at the back, and the shading is correlated with the number of seated passengers in the image. In Figure 5, in addition to the seated passengers 10a and 10b, there are also standing passengers 10c and 10d, so the heat map area 41a corresponding to the seated passenger 10a is dark, as in Figure 4, but the heat map areas 41c and 41d corresponding to the standing passengers 10a and 10b near the straps are also relatively dark, and the pixels of the subject are also distributed at higher positions. However, the distribution is relatively light in the area 41e corresponding to the center of the aisle. Figure 6 shows a case where there are more standing passengers 10e than in Figure 5, and corresponds to the seated passengers 10a at the front and the standing passengers 10e overlapping near the straps and in the center of the aisle, the heat map has a wide area with a dense distribution from a low position at the front to a high position near the straps at the back. On the other hand, in Figure 6, the area 41f near the seated passengers at the back as seen from the camera 11 has a faint distribution, but this occurs because the back is not visible in the camera image due to the standing passengers at the front and the passengers standing overlapping in the center of the aisle. In this way, the feature data reflects the situation inside the car, and it is possible to estimate the congestion rate using the feature data.

なお、本発明では乗客を画像認識せずに被写体の画素数を求めるものであるためエリア41a、41bの一部に座席シートを写す画素も含まれているが、混雑率の推定ではヒートマップ上の座席シートに該当する座標の画素は集計対象から除外するか集計における重み付けを小さくする処理を行ってもよい。 In addition, since the present invention calculates the number of pixels of the subject without image recognition of passengers, some of the areas 41a and 41b contain pixels that show seats. However, when estimating the congestion rate, the pixels at the coordinates that correspond to seats on the heat map may be excluded from the calculation or may be weighted less in the calculation.

本発明は、車窓を通して撮影した車内の画像データに写る被写体の分布をもとに混雑率を求めるものであるが、その一つの実施例として前述のヒートマップを奥行き及び高さで分割したセルの数に対して各セルの座標位置に対応した重み付けを行い集計することで混雑率を得てもよい。 The present invention calculates the congestion rate based on the distribution of subjects captured in image data of the interior of a vehicle taken through the vehicle window. As one example, the congestion rate can be calculated by dividing the above-mentioned heat map by depth and height, assigning weights to the number of cells corresponding to the coordinate position of each cell, and aggregating the results.

図7は、本発明の一実施例のシステム構成図であり、図7(A)は上から見た図であり、(B)は前から見た図である。図7(A)に示すように、複数の車両3が連結部4により連結された列車2が停車した駅ホーム8の列車2の停車位置よりも進行方向7の前方の端に撮像手段11及び処理装置21を設置し、列車2が進行方向7に進む際に車両側面の画像を撮像手段11により取得し、処理装置21のメモリに蓄積ならびに混雑率の推定を行うもので、処理装置21は、図1のライン画像生成手段12、ヒストグラム生成手段13、特徴データ取得手段14及び推定手段15に対応する。撮像手段11は、例えば、ホーム安全柵8aに取り付けられ、列車2の搬送物確認領域(窓)を撮影範囲11aに含むような距離及び高さに配置される。撮像手段11と列車2との位置関係により、列車2が含まれるように最小距離L1と最大距離L2とを設定し、最小距離L1と最大距離L2との間の処理対象範囲Lに含まれる距離情報の画素のみを処理の対象に設定してもよい。撮像手段11は、列車側面に対して光軸が垂直となるように設置すること、つまり列車側面の法線と平行となるように設置することが好ましい。垂直に設置した場合は、列車側面までの距離が略均一となり、列車の車内と車外との情報の分離が容易であり、精度を高くできる。ただし、光軸が傾いても、機械学習によって誤差の影響を減らすことができるし、後述する図12のように誤差を補正してもよい。図7においては駅のホームに撮像手段11を設置しているが、ホームの先の線路の横でもよい。また、例えば、反対の側方にも撮像手段を配置して、両側から距離画像を撮像すれば、より推定のための情報を増やすことができ精度を高めることができる。なお、図示しないが、撮像手段と同じ位置か、撮像手段から停車位置までの間に、列車の接近を確認して撮像手段による撮像を開始させるセンサを設けてもよい。 Figure 7 is a system configuration diagram of an embodiment of the present invention, where Figure 7 (A) is a view from above and Figure 7 (B) is a view from the front. As shown in Figure 7 (A), the imaging means 11 and the processing device 21 are installed at the end in front of the train 2's stopping position in the traveling direction 7 of the station platform 8 where the train 2, which is made up of multiple cars 3 connected by a coupling section 4, is stopped. When the train 2 moves in the traveling direction 7, the imaging means 11 captures an image of the side of the car, which is stored in the memory of the processing device 21 and the congestion rate is estimated. The processing device 21 corresponds to the line image generating means 12, the histogram generating means 13, the feature data acquiring means 14 and the estimating means 15 in Figure 1. The imaging means 11 is attached to the platform safety fence 8a, for example, and is positioned at a distance and height such that the transported goods confirmation area (window) of the train 2 is included in the shooting range 11a. Depending on the positional relationship between the imaging means 11 and the train 2, a minimum distance L1 and a maximum distance L2 may be set so that the train 2 is included, and only pixels of distance information included in the processing target range L between the minimum distance L1 and the maximum distance L2 may be set as the target for processing. The imaging means 11 is preferably installed so that the optical axis is perpendicular to the side of the train, that is, parallel to the normal line of the side of the train. When installed perpendicularly, the distance to the side of the train is approximately uniform, making it easy to separate information about the inside and outside of the train, and improving accuracy. However, even if the optical axis is tilted, the effect of error can be reduced by machine learning, and the error may be corrected as shown in FIG. 12 described later. In FIG. 7, the imaging means 11 is installed on the platform of the station, but it may be installed next to the track beyond the platform. In addition, for example, if an imaging means is also installed on the opposite side and distance images are captured from both sides, more information for estimation can be obtained and accuracy can be improved. Although not shown, a sensor that confirms the approach of a train and starts imaging by the imaging means may be installed at the same position as the imaging means or between the imaging means and the stopping position.

処理装置21は、ホーム8上に設置され、撮像手段11と有線の専用回線で接続されている。さらに、処理装置21は、ネットワークNに接続されており、ネットワークNを介して、列車運行管理システム22、情報配信サーバ23、ユーザ10(乗客を含む)が持つ携帯端末24等と接続されてもよい。列車運行管理システム22は、計画ダイヤを基に列車の運行を管理するシステムであり、各列車の列車番号、車種及び現在位置等の情報を有しており、必要に応じて処理装置21は列車運行管理システム22から情報を取得できる。情報配信サーバ23は、ユーザ10の携帯端末24や駅ホーム8の掲示板等に対して、混雑率を提供する。 The processing device 21 is installed on the platform 8 and is connected to the imaging means 11 via a wired dedicated line. Furthermore, the processing device 21 is connected to a network N, and may be connected to a train traffic control system 22, an information distribution server 23, a mobile terminal 24 held by a user 10 (including passengers) and the like via the network N. The train traffic control system 22 is a system that manages train operations based on a planned timetable, and has information such as the train number, type of train, and current location of each train, and the processing device 21 can obtain information from the train traffic control system 22 as necessary. The information distribution server 23 provides the congestion rate to the mobile terminal 24 of the user 10, a bulletin board on the station platform 8, and the like.

図8は、車両内の座位の乗客10aと立位の乗客10bが乗車した状態を 撮像手段11により側面から車両窓5を通して撮影している状態を示している。乗客10aは、車両の側方に設けられた座席シート6に着座しており、乗客10bは車両の中央付近で立っている。図8においては、混雑率推定の処理対象範囲Lを手前側の境界L1から奥側の境界L2の車内の範囲としている。このように、車内を処理対象範囲Lとすれば、車窓に貼られたステッカーやシールを対象外とすることができる。ただし、車両の揺れや振動によって撮像手段11までの距離が変動すること、満員時などはドア窓に乗客が接触していることもあり、車内のみを処理対象範囲Lとするのではなく、図7(b)のように車両の外側を含むように処理対象範囲Lを設定してもよい。 Figure 8 shows a state in which a seated passenger 10a and a standing passenger 10b are inside a vehicle, photographed from the side by the imaging means 11 through the vehicle window 5. Passenger 10a is seated on a seat 6 provided on the side of the vehicle, and passenger 10b is standing near the center of the vehicle. In Figure 8, the processing target range L for estimating the congestion rate is the range inside the vehicle from the front boundary L1 to the rear boundary L2. In this way, if the inside of the vehicle is set as the processing target range L, stickers and labels attached to the vehicle windows can be excluded. However, since the distance to the imaging means 11 varies due to the shaking or vibration of the vehicle, and passengers may be touching the door windows when the vehicle is full, the processing target range L may be set to include the outside of the vehicle as shown in Figure 7 (b) rather than only the inside of the vehicle.

図9は、 撮像手段11の一実施例の構成図であり光学レンズ100と被写体画像の2次元データとして取得するイメージセンサー101並びにこれをデータとして読み出すイメージメモリ102、 撮像手段11全体の制御を行うCPU103とカメラを制御するプログラムと撮影した画像を記録するストレージ104並びにその実行で使用するRAM105、外部ネットワークNとの通信を処理する通信インタフェース106及び内部の各部をつなぐ内部バス107により構成される。なお、外部ネットワークNは、処理装置15と接続するための専用回線を含んでいる。 Figure 9 is a block diagram of one embodiment of the imaging means 11, which is made up of an optical lens 100, an image sensor 101 that acquires two-dimensional data of the subject image, an image memory 102 that reads this data, a CPU 103 that controls the entire imaging means 11, a storage 104 that records the program that controls the camera and the captured images, a RAM 105 used in the execution of the program, a communication interface 106 that processes communication with an external network N, and an internal bus 107 that connects the various internal parts. The external network N includes a dedicated line for connection to the processing device 15.

図10は、処理装置21の一実施例の構成図であり本発明における混雑率推定の主な演算を行うCPU110と、プログラム111、演算で使用するパラメータ112、演算で使用するデータならびに演算結果のデータ等の測定データ113を記憶するストレージ114と、積和演算などを行う演算部115と、プログラムの実行にて使用するRAM116と、外部ネットワークNとの通信を処理する通信インタフェース117と、及び内部の各部をつなぐ内部バス118とにより構成される。 Figure 10 is a block diagram of one embodiment of the processing device 21, which is made up of a CPU 110 that performs the main calculations for estimating the congestion rate in the present invention, a storage 114 that stores a program 111, parameters 112 used in the calculations, measurement data 113 such as data used in the calculations and data resulting from the calculations, a calculation unit 115 that performs product-sum calculations and the like, a RAM 116 that is used in executing the program, a communication interface 117 that processes communication with the external network N, and an internal bus 118 that connects the various internal parts.

図11は、本発明の撮像手段の一実施例として、立体構造を認知するメカニズムの一つであるステレオカメラの原理を説明するための図である。図11(A)に示すように、カメラレンズ100a及び2次元イメージセンサー101aを内蔵する左側のカメラと、同じくカメラレンズ100b及び2次元イメージセンサー101bを内蔵する右側のカメラとを距離Lだけ離して配置し、両方のカメラで車内を撮影すると、図11(B)に示すように、左側のイメージセンサー101aに写る画像108aと右側のイメージセンサー101bに写る画像108bとでは被写体がずれて撮影される。図11(B)の画像108a、108bは撮像手段のCPU103又は処理装置15において、図11(C)に示すように、両画像間のずれを検出するよう比較され、乗客10c、乗客10dにそれぞれ視差dW1、dW2が検出される。前述の視差は、2つのカメラレンズ100a及び100bの焦点間の距離Lとカメラの焦点距離fにより図11(C)に示す式を用いて乗客10cまでの距離D2及び乗客10dまでの距離D1に変換され、その距離は2次元のカメラ画像に写る被写体の各画素に距離データとして関連付けられ距離画像(3次元空間のデータ)が生成される。なお、 Fig. 11 is a diagram for explaining the principle of a stereo camera, which is one of the mechanisms for recognizing a three-dimensional structure, as an embodiment of the imaging means of the present invention. As shown in Fig. 11(A), a left camera incorporating a camera lens 100a and a two-dimensional image sensor 101a and a right camera incorporating a camera lens 100b and a two-dimensional image sensor 101b are arranged at a distance L from each other, and when the interior of the vehicle is photographed by both cameras, as shown in Fig. 11(B), the subject is photographed with a shift between an image 108a captured by the left image sensor 101a and an image 108b captured by the right image sensor 101b. The images 108a and 108b in Fig. 11(B) are compared in the CPU 103 or the processing device 15 of the imaging means to detect a shift between the two images, as shown in Fig. 11(C), and parallaxes dW 1 and dW 2 are detected for passengers 10c and 10d, respectively. The above-mentioned parallax is converted into a distance D2 to passenger 10c and a distance D1 to passenger 10d using the equation shown in Fig. 11C based on the distance L between the focal points of the two camera lenses 100a and 100b and the focal length f of the cameras, and the distances are associated as distance data with each pixel of the subject captured in the two-dimensional camera image to generate a distance image (data in three-dimensional space).

図12は、撮像手段11の光軸11bが傾いた場合の誤差を補正する方法を説明する図である。撮像手段11は、列車側面に対して光軸が垂直となるように設置することが好ましいが、安全面や車窓を通じて車内を見渡せる場所及び角度を考慮して設置されるため、実際には、撮像手段11の光軸11bが被写体である列車側面の法線から傾く場合があり、この傾きが大きい場合は撮像手段11から被写体までの水平方向の距離Dとレンズの焦点から光軸方向への被写体までの距離Rとの誤差が大きくなる。この場合は、例えば、法線と光軸との角度θ、被写体である乗客10と光軸との角度φから図12に示す座標変換により距離画像における被写体までの距離Rを水平方向の距離Dに変換することが好ましい。 Figure 12 is a diagram explaining a method for correcting errors when the optical axis 11b of the imaging means 11 is tilted. The imaging means 11 is preferably installed so that its optical axis is perpendicular to the side of the train, but since it is installed taking into consideration safety and the location and angle at which the interior of the train can be viewed through the train windows, in reality, the optical axis 11b of the imaging means 11 may be tilted from the normal to the side of the train, which is the subject. If this tilt is large, the error between the horizontal distance D from the imaging means 11 to the subject and the distance R from the lens focus to the subject in the optical axis direction becomes large. In this case, it is preferable to convert the distance R to the subject in the distance image to the horizontal distance D by the coordinate conversion shown in Figure 12, for example, from the angle θ between the normal and the optical axis and the angle φ between the passenger 10, who is the subject, and the optical axis.

[複数のフレーム画像からの特徴データ取得の一例]
図13~図17は、複数のフレーム画像から特徴データを取得するまでの一実施形態を説明する図であり、走行中の列車2の先頭車両から最終車両までを側面から撮像した一連の動画を用いて特徴データを取得する例を示す。なお、列車2の各車両3は連結部4で相互に連結されている。
[An example of obtaining feature data from multiple frame images]
13 to 17 are diagrams for explaining an embodiment of acquiring feature data from a plurality of frame images, and show an example of acquiring feature data using a series of videos captured from the side of a running train 2 from the front car to the last car. The cars 3 of the train 2 are connected to each other by couplings 4.

図13は、ライン画像生成手段12における分割処理S2、ヒストグラム生成手段13におけるヒストグラム化処理S3を説明するものである。図7(A)は、距離画像の動画における1フレーム画像F1であり、ライン画像生成手段12によって高さ方向について等間隔に8分割され、8枚の横長のライン画像F1-1~F1-8が生成される。本実施形態では、H×W=848×480の解像度のデプスカメラを使用して等間隔で8分割しており、108×480のライン画像が8枚生成される。 Figure 13 explains the division process S2 in the line image generating means 12 and the histogramming process S3 in the histogram generating means 13. Figure 7 (A) shows one frame image F1 in a moving image of a distance image, which is divided into eight equal intervals in the height direction by the line image generating means 12 to generate eight horizontally long line images F1-1 to F1-8. In this embodiment, a depth camera with a resolution of H x W = 848 x 480 is used to divide the image into eight equal intervals, generating eight line images of 108 x 480.

図13(B)は、ライン画像F1-1~F1-8から生成されたヒストグラムデータ群H1であり、ヒストグラムデータ群H1に含まれる各ヒストグラムデータH1-1~H1-8は、それぞれ各高さのライン画像F1-1~F1-8から生成されたものであり、各高さにおける距離の度数分布を示す。図13(C)は、下から5番目のライン画像F1-5から生成したヒストグラムデータH1-5を拡大したものである。ヒストグラムデータは、縦軸が頻度(画素数)であり、横軸が距離の階級であり、各階級幅に含まれる距離の画素の数を頻度としている。また、測定システム1は、分割処理の前、又はヒストグラム化処理の前に、不要な画素情報を除去する処理を実行してもよい。図13(B)では、ヒストグラム化処理の前に、各画素の距離情報について処理対象となる範囲を設定し、範囲外となる距離情報の画素は無視する除去処理を行っている。具体的には、距離情報について、処理対象となる最小距離L1を500mm、最大距離L2を3500mmに設定し、500mm~3500mmを処理対象範囲Lとした(L,L1,L2は図7、図8参照)。さらに、ヒストグラムのビンの数を35、階級の幅を100mmに設定し、各階級幅に含まれる画素数をカウントし、ヒストグラムデータを生成する。なお、処理対象範囲、ビンの数、階級の幅は一例であり、これに限定されるものではない。 Figure 13 (B) shows a histogram data group H1 generated from line images F1-1 to F1-8. Each histogram data H1-1 to H1-8 included in the histogram data group H1 is generated from the line images F1-1 to F1-8 at each height, and shows the frequency distribution of distance at each height. Figure 13 (C) shows an enlarged view of histogram data H1-5 generated from the fifth line image F1-5 from the bottom. In the histogram data, the vertical axis is the frequency (number of pixels), the horizontal axis is the distance class, and the number of pixels of the distance included in each class width is the frequency. In addition, the measurement system 1 may perform a process to remove unnecessary pixel information before the division process or the histogram process. In Figure 13 (B), a range to be processed for the distance information of each pixel is set before the histogram process, and a removal process is performed to ignore pixels of distance information outside the range. Specifically, for distance information, the minimum distance L1 to be processed is set to 500 mm, the maximum distance L2 is set to 3500 mm, and the processing range L is set to 500 mm to 3500 mm (see Figures 7 and 8 for L, L1, and L2). Furthermore, the number of bins in the histogram is set to 35, the class width is set to 100 mm, the number of pixels included in each class width is counted, and histogram data is generated. Note that the processing range, number of bins, and class width are merely examples and are not limited to these.

この分割処理及びヒストグラム化処理については、撮像手段11で走行中の列車2を撮像した一連の動画の各フレーム画像に対して実行され、生成されたヒストグラムデータが特徴データ取得手段14に伝達される。例えば、撮像手段11が60fps(フレーム/秒)で列車を撮像した場合、10両編成の列車全体を撮像するのに20秒程度の撮影時間が必要だとすると、約1200枚のフレーム画像が撮影される。そして、H×W=848×480画素の1枚の距離画像(1フレーム画像)は、各画素に16bitの距離情報が格納されている場合は約800KB(キロバイト)であり、1200枚では約932MB(メガバイト)という膨大なデータ量となる。これに対し、ヒストグラム化を含む前処理をすることにより、10両編成の列車全体を約1.5MBまで軽量化することができる。 These division and histogramming processes are performed on each frame image of a series of moving images captured by the imaging means 11 of the running train 2, and the generated histogram data is transmitted to the feature data acquisition means 14. For example, if the imaging means 11 captures images of a train at 60 fps (frames per second), and it takes about 20 seconds to capture an image of the entire 10-car train, then about 1200 frame images will be captured. A distance image (one frame image) of H x W = 848 x 480 pixels is about 800 KB (kilobytes) if 16-bit distance information is stored in each pixel, and 1200 images will be a huge amount of data of about 932 MB (megabytes). By contrast, by performing preprocessing including histogramming, the weight of the entire 10-car train can be reduced to about 1.5 MB.

[単位判定領域の判定処理]
図14及び図15は、単位判定領域(車両)の判定処理の一例を説明する図である。単位判定領域(車両)の判定処理は、前処理手段12若しくは推定手段13の何れか、又は単位判定領域(車両)の判定処理用に別途設けられた処理手段において実行される。図14(A)は、各フレーム画像に対応するヒストグラムデータ群H1、H2…Hn(nはフレーム数)であり、ヒストグラムデータ群Hnには、高さ方向に分割された8段階のライン画像に対応して、8段階のヒストグラムデータHn-1~Hn-8が含まれている。図14(B)は、各段階のヒストグラムデータ毎にフレーム番号順に集計した各高さにおける時系列の頻度分布データT1~T8であり、図14(C)は、下から5番目の高さのヒストグラムデータHn-5に関する時系列の頻度分布データT5を拡大したものである。時系列の頻度分布データT1~T8は、縦軸が距離の階級であり、横軸がフレーム数であり、各座標に濃淡で頻度(画素数)が表示される。この時系列の頻度分布データから、時系列変化の特徴を捉え、単位判定領域を判定することができる。
[Unit Judgment Area Judgment Process]
14 and 15 are diagrams for explaining an example of the determination process of a unit determination area (vehicle). The determination process of a unit determination area (vehicle) is executed by either the preprocessing means 12 or the estimation means 13, or by a processing means provided separately for the determination process of a unit determination area (vehicle). FIG. 14(A) shows histogram data groups H1, H2, ... Hn (n is the number of frames) corresponding to each frame image, and the histogram data group Hn includes eight levels of histogram data Hn-1 to Hn-8 corresponding to eight levels of line images divided in the height direction. FIG. 14(B) shows time series frequency distribution data T1 to T8 at each height, which are collected in the order of frame numbers for each level of histogram data, and FIG. 14(C) shows an enlarged view of time series frequency distribution data T5 relating to histogram data Hn-5 at the fifth height from the bottom. The time series frequency distribution data T1 to T8 has the distance class on the vertical axis and the frame number on the horizontal axis, and the frequency (number of pixels) is displayed in shading at each coordinate. From this time series frequency distribution data, the characteristics of the time series changes can be grasped and the unit determination area can be determined.

図15(A)は、車両の連結部4の距離画像F2であり、図15(B)は、図14(C)の時系列の頻度分布データの一部を拡大した図である。通常、連結部4は車両3の幅よりも狭く、高さも低いため、連結部4が存在する特定の高さの頻度分布データにおいて、特定の距離(撮像手段から連結部までの距離)における頻度分布が高くなるという特徴が周期的に現れる。図15(B)の白で囲んだ部分4aにおいて、周期的に高い頻度分布の信号が検出されており、検出されたフレーム番号において連結部4が位置していると判定し、連結部4までの領域を単位判定領域(1車両)と判定することができる。このように、単位判定領域の境界(連結部)を判定してもよいが、単位判定領域内で検出される特徴から単位判定領域を判定してもよい。例えば、通常は列車の車体を検出し、連結部4では検出範囲外となる高さの頻度分布データにおいては、通常は検出される列車の車体に起因する信号が検出されないことから単位判定領域を判定してもよい。さらに複数の高さの頻度分布データから複合的に判定してもよい。図15(C)は、下から5番目の高さの時系列の頻度分布データT5(図14(C))について、判定処理で判定した連結部4の位置を区切り、単位判定領域(車両)を明らかにした図である。なお、単位判定領域が一つだけの列車においては、当該判定処理は不要である。 Figure 15 (A) is a distance image F2 of the coupling part 4 of the vehicle, and Figure 15 (B) is an enlarged view of a part of the time-series frequency distribution data of Figure 14 (C). Normally, the coupling part 4 is narrower than the width of the vehicle 3 and is also lower in height, so that in the frequency distribution data of a specific height where the coupling part 4 is present, a feature that the frequency distribution at a specific distance (the distance from the imaging means to the coupling part) is high periodically appears. In the part 4a surrounded by white in Figure 15 (B), a signal with a periodically high frequency distribution is detected, and it is determined that the coupling part 4 is located at the detected frame number, and the area up to the coupling part 4 can be determined as the unit determination area (one vehicle). In this way, the boundary (coupling part) of the unit determination area may be determined, but the unit determination area may also be determined from the features detected within the unit determination area. For example, in the frequency distribution data of a height where the body of the train is normally detected and is outside the detection range of the coupling part 4, the unit determination area may be determined because a signal caused by the body of the train that is normally detected is not detected. Furthermore, a composite determination may be made from the frequency distribution data of multiple heights. FIG. 15(C) is a diagram showing the time series frequency distribution data T5 (FIG. 14(C)) for the fifth height from the bottom, with the positions of the coupling parts 4 determined by the determination process divided and the unit determination areas (vehicles) clarified. Note that this determination process is not necessary for trains with only one unit determination area.

[正規化処理]
図16は、各単位判定領域から総括ヒストグラムデータ群を生成する処理を説明する図である。図16(A)は、図15(C)の下から5番目の高さの時系列の頻度分布データT5の向きを90度右に回転させた図であり、図16(B)は、各単位判定領域におけるヒストグラムデータを集計して生成された下から5番目の高さの総括ヒストグラムデータ群A5である。総括ヒストグラムデータ群A5は、1両目の1号車の総括ヒストグラムデータA5-1から10両目の10号車の総括ヒストグラムデータA5-10までを含み、それぞれ縦軸が頻度(画素数)であり、横軸が距離の階級である。さらに、撮像手段を駅のホームに設置した場合は、列車が出発してから徐々に加速するため、撮像手段の前を通過する速度の違いにより各車両によって撮像できるフレーム数が異なる。このように、列車の通過速度に差がある場合は、総括ヒストグラムデータ群A5をフレーム数に基づいて正規化することが好ましい。例えば、1号車の総括ヒストグラムデータA5-1は、フレーム番号1~240までの画像における下から5番目の高さのライン画像の度数分布を集計したものであり、さらに正規化する場合は、各頻度をフレーム数の240で除算して、1フレーム画像当たりの平均的な度数分布を求める。2号車の総括ヒストグラムデータA5-2は、フレーム番号241~390までの画像における下から5番目の高さのライン画像の度数分布を集計したものであり、さらに正規化する場合は、各頻度をフレーム数の150で除算して、1フレーム画像当たりの平均的な度数分布を求める。この正規化を全ての車両について実行することにより、通過速度によるフレーム数の違いを正規化できるため、推定の精度を向上させることができるので正規化処理することが好ましい。ただし、精度は下がるが正規化処理しなくてもよい。また、一定速度で移動する列車を撮像したり、列車の速度に応じて撮像手段のfpsを変化させたりして、一車両当たりのフレーム数を一定範囲としてもよい。そして、8段階の高さ全てについて、総括ヒストグラムデータ群の生成処理を実行する。
[Normalization]
FIG. 16 is a diagram for explaining the process of generating a summary histogram data group from each unit judgment area. FIG. 16(A) is a diagram in which the orientation of the time series frequency distribution data T5 at the fifth height from the bottom in FIG. 15(C) is rotated 90 degrees to the right, and FIG. 16(B) is a summary histogram data group A5 at the fifth height from the bottom generated by aggregating histogram data in each unit judgment area. The summary histogram data group A5 includes summary histogram data A5-1 of the first car, the first vehicle, to summary histogram data A5-10 of the tenth car, the vertical axis of each data represents frequency (number of pixels), and the horizontal axis represents distance classes. Furthermore, when the imaging means is installed on the station platform, the train gradually accelerates after departure, so the number of frames that can be captured by each vehicle differs depending on the speed at which it passes in front of the imaging means. In this way, when there is a difference in the passing speed of the train, it is preferable to normalize the summary histogram data group A5 based on the number of frames. For example, the overall histogram data A5-1 of the first car is a compilation of the frequency distribution of line images at the fifth height from the bottom in the images of frame numbers 1 to 240. When further normalizing, each frequency is divided by the number of frames, 240, to obtain an average frequency distribution per frame image. The overall histogram data A5-2 of the second car is a compilation of the frequency distribution of line images at the fifth height from the bottom in the images of frame numbers 241 to 390. When further normalizing, each frequency is divided by the number of frames, 150, to obtain an average frequency distribution per frame image. By performing this normalization for all cars, the difference in the number of frames due to the passing speed can be normalized, and the accuracy of the estimation can be improved, so that normalization processing is preferable. However, normalization processing is not necessary, although the accuracy will decrease. In addition, the number of frames per car may be set to a certain range by capturing an image of a train moving at a constant speed or by changing the fps of the imaging means according to the speed of the train. Then, the process of generating a group of overall histogram data is executed for all eight levels of height.

さらに、総括ヒストグラムデータの頻度は、計算上扱いやすくするため、距離画像の面積(848×480)で除算して、画像面積(解像度)に対する距離ごとの頻度の割合としてもよい。これにより、各頻度は、画像面積によって正規化される。 Furthermore, for ease of computation, the frequency of the overall histogram data may be divided by the area of the distance image (848 x 480) to obtain the ratio of frequency for each distance to the image area (resolution). This normalizes each frequency by the image area.

[特徴データ生成]
図17は、特徴データ取得手段14によって特徴データを生成する処理を説明する図である。図17(A)は、8段階の各高さにおける総括ヒストグラムデータ群A1~A8であり、各総括ヒストグラムデータ群Am(mは高さ)は、各単位判定領域(1号車~10号車)における総括ヒストグラムデータAm-1~Am-10を含んでおり、フレーム数及び/又は画像面積による正規化されていることが好ましい。図17(B)は、各単位判定領域(1号車~10号車)毎に8段階の高さの総括ヒストグラムデータを高さ順に結合した二次元特徴データC1~C10であり、図17(C)は、2号車の二次元特徴データC2を拡大した図である。二次元特徴データC2は、縦軸が高さ、横軸が階級であり、各座標に濃淡で標準化された頻度(画素数)が表示される。図17(C)において縦軸は、距離画像におけるライン画像の高さ方向の画素範囲で示されており、742~848の行は、2号車における1番下の高さ(1段目)の総括ヒストグラムデータA1-2の頻度(柱の高さ)を濃淡で表示したものであり、636~742の行は、2号車における2段目の高さの総括ヒストグラムデータA2-2の頻度を濃淡で表示したものであり、以下同様に、2号車におけるm段目の高さの総括ヒストグラムデータAm-2の頻度を濃淡で表示したものが順番に結合される。かかる特徴データは、各高さにおける各画素に含まれる距離情報の度数分布を示すものであり、混雑率の傾向を反映したものである。この二次元特徴データC1~C10に対し、特徴データを独立変数とし、混雑率を従属変数として学習させた回帰モデルを用いて、各車両における列車の混雑率を推定することができる。
[Feature data generation]
FIG. 17 is a diagram for explaining the process of generating feature data by the feature data acquisition means 14. FIG. 17(A) shows overall histogram data groups A1 to A8 at each of the eight height levels, and each overall histogram data group Am (m is height) includes overall histogram data Am-1 to Am-10 at each unit judgment area (cars 1 to 10), and is preferably normalized by the number of frames and/or the image area. FIG. 17(B) shows two-dimensional feature data C1 to C10 in which overall histogram data at eight height levels is combined in height order for each unit judgment area (cars 1 to 10), and FIG. 17(C) is an enlarged view of two-dimensional feature data C2 for car 2. In the two-dimensional feature data C2, the vertical axis represents height and the horizontal axis represents class, and the frequency (number of pixels) standardized by shading is displayed at each coordinate. In FIG. 17C, the vertical axis indicates the pixel range in the height direction of the line image in the distance image, and rows 742 to 848 indicate the frequency (height of the pillar) of the general histogram data A1-2 at the lowest height (first step) in the second car in shading, rows 636 to 742 indicate the frequency of the general histogram data A2-2 at the height of the second step in the second car in shading, and the following rows are similarly combined in order with the frequency of the general histogram data Am-2 at the height of the mth step in the second car in shading. Such feature data indicates the frequency distribution of distance information contained in each pixel at each height, and reflects the tendency of the congestion rate. The congestion rate of the train in each car can be estimated using a regression model trained on the two-dimensional feature data C1 to C10 with the feature data as an independent variable and the congestion rate as a dependent variable.

本実施形態では、列車全体を撮像した動画を処理するため、膨大な画像を処理する必要がある。このため、個別の距離画像に対して処理や解析(例えば車窓の判定、抽出や連結部の検出等)を極力減らし、車窓を含む距離画像だけではなく、車窓を含まない距離画像も使用し、又、距離画像内においても、車窓の領域だけを抽出するのではなく、2次元画像全体について、処理対象範囲内の画素を対象として一律で処理することで処理速度を上げている。そして、ライン画像をヒストグラム化してデータ量を軽量化した後に、時系列データとして車両又は連結部を判定し、車両単位で総括ヒストグラムデータを生成して特徴データを生成している。このため、本実施形態の方法は、個別の距離画像に撮像された瞬間の一カ所の状況ではなく、車両全体における度数分布を統計的に当てはめて推定している。なお、各距離画像について、車窓の判定、抽出や連結部の検出等の処理や解析を実施したり、車窓を含む距離画像だけを選択したりしてから、車両単位又は車窓単位で総括ヒストグラムデータを生成して特徴データを生成してもよい。 In this embodiment, a huge number of images must be processed in order to process a video of the entire train. For this reason, processing and analysis (for example, determination and extraction of train windows, detection of joints, etc.) for individual distance images is reduced as much as possible, and distance images that do not include train windows are used as well as distance images that include train windows. Also, instead of extracting only the train window area within the distance image, the entire two-dimensional image is processed uniformly for pixels within the processing range to increase processing speed. Then, after the line image is histogrammed to reduce the amount of data, the vehicle or joint is determined as time-series data, and general histogram data is generated for each vehicle to generate feature data. For this reason, the method of this embodiment estimates the frequency distribution of the entire vehicle, not the situation at one location at the moment when each distance image is captured, by statistically applying it. Note that processing and analysis such as determination and extraction of train windows and detection of joints may be performed for each distance image, or only distance images that include train windows may be selected, and then general histogram data may be generated for each vehicle or each train window to generate feature data.

[学習フェーズ]
本発明の混雑率測定システム又はプログラムを用いて回帰モデルの学習が可能である。既知の混雑率と対応する特徴データとを取得し、特徴データを独立変数とし、混雑率を従属変数として学習させ、回帰モデルを構築する。例えば、クラウド上に蓄積された軽量化データ(ヒストグラムデータ、特徴データ)を用いて、蓄積データに対応する混雑率を応荷重などの指標を実測して取得し、蓄積データから算出した特徴と対応付けて回帰モデルを学習させてもよい。さらに、曜日、時間、天候などの情報を対応付けてデータを十分に集積し、これに機械学習を組み合わせることで、ブラインドや結露などで車内が確認できない場合であっても、同様な曜日、時間、天候などの情報を利用し、測定できなかった車内の度数分布を推定することも可能である。学習フェーズで回帰モデルを構築した後、運用フェーズに移行し、実際の列車における距離画像を撮像し、特徴データから混雑率を推定する。なお、運用中でも、引き続きデータを収集し、学習フェーズを並行して実施してもよい。
[Learning Phase]
A regression model can be learned using the congestion rate measurement system or program of the present invention. A known congestion rate and corresponding feature data are acquired, and the feature data is used as an independent variable, and the congestion rate is used as a dependent variable to learn and construct a regression model. For example, using lightened data (histogram data, feature data) stored on the cloud, a congestion rate corresponding to the stored data may be measured and acquired by measuring an index such as a load-bearing index, and the congestion rate may be associated with the feature calculated from the stored data to learn a regression model. Furthermore, by associating information such as the day of the week, time, and weather with data and combining this with machine learning, even if the interior of the car cannot be confirmed due to blinds or condensation, it is possible to estimate the frequency distribution of the interior of the car that could not be measured by using similar information such as the day of the week, time, and weather. After constructing a regression model in the learning phase, the operation phase is started, and a distance image of an actual train is captured, and the congestion rate is estimated from the feature data. Note that even during operation, data may be continuously collected and the learning phase may be performed in parallel.

[混雑率推定方法の他の実施例]
図18は、個別の距離画像から取得したヒートマップ41をもとに混雑率を求める処理方法の他の実施例を示すものである。測定系の雑音除去や処理の簡略化のためにヒートマップ41の濃淡分布の特徴量を損なわない程度にいくつかの隣接する複数のセル44を一つのセグメント45としてまとめる前処理を実施してもよい。各セグメント45の座標はx(i,j)で表すことができる。
[Another embodiment of the congestion rate estimation method]
18 shows another embodiment of a processing method for calculating the congestion rate based on a heat map 41 acquired from an individual distance image. In order to remove noise in the measurement system and simplify the processing, pre-processing may be performed to group several adjacent cells 44 into one segment 45 to an extent that does not impair the features of the shading distribution of the heat map 41. The coordinates of each segment 45 can be expressed as x(i, j).

前処理部46は、複数のセル44を一つのセグメント45に丸める処理を実行する。前処理部46では、カメラ画像の1画素に対応する被写体面積がカメラから被写体までの距離が異なる2点間でその距離の比の2乗に比例するため、その補正として各セルの画素数を2乗する処理と、そのセグメントに対する代表値y(i,j)としてセグメント内の各セル画素数の平均値や中央値を求める処理を行う。 The pre-processing unit 46 executes a process of rounding multiple cells 44 into one segment 45. Since the subject area corresponding to one pixel in the camera image is proportional to the square of the ratio of the distances between two points with different distances from the camera to the subject, the pre-processing unit 46 performs a process of squaring the number of pixels in each cell as a correction, and a process of finding the average or median number of pixels in each cell in the segment as the representative value y(i, j) for the segment.

前処理部の出力は、積和演算の乗算器47において、各セグメントに対応する重み係数w(i,j)を乗じる処理をすべてのセグメントに対して行ったのち、積和演算の加算器48においてバイアス値bを加算することで混雑率の推定値Zを得るものである。 The output of the pre-processing unit is multiplied by the weighting coefficient w(i, j) corresponding to each segment in a multiplier 47 that performs a product-sum operation, and then a bias value b is added in an adder 48 that performs a product-sum operation to obtain an estimated congestion rate Z.

ここで重み係数w(i,j)は、例えばカメラ寄りの座席シートに座る乗客は上半身の一部だけが写り、立位の乗客は手前の座位の乗客の有無によりカメラ画像に写る下半身の範囲の画素数が誤差要因になるなどカメラ設置位置によってその程度は変わるものであり、混雑率推定においてヒートマップ上の座標位置に応じた重み付けを変えることでこれら誤差要因の影響を軽減することが可能である。 The weighting coefficient w(i, j) here varies depending on the camera installation position; for example, if a passenger sits in a seat closer to the camera, only part of the upper body will be captured, and if a standing passenger is standing, the number of pixels in the area of the lower body captured in the camera image will be an error factor depending on whether there is a seated passenger in front. By changing the weighting according to the coordinate position on the heat map when estimating the congestion rate, the influence of these error factors can be reduced.

図19は、前述の処理にて得られた混雑率の推定値と、これに対応する混雑率の真値との関係を説明するために作成した散布図である。混雑率の真値は特許文献1に記載の応荷重データを用いて取得し、その車両に対して本発明の一実施例を適用して推定値を求めてプロットした。ここで、混雑率50%は座席シート全てに乗客が着座した程度、100%が全ての乗客が着座又は吊り革につかまるかドア付近の柱に掴まることができる状態、150%は肩が触れ合う程度で新聞は楽に読める程度に相当するもので、車窓から見た車内の画像において手前側ならびに奥側の座位の乗客が全て見える状態から、混雑していても奥側の立位の乗客が見える状態までに相当するもので本発明の一実施例として示したヒートマップの分布にその特徴が表れる範囲である。 Figure 19 is a scatter diagram created to explain the relationship between the estimated value of the congestion rate obtained by the above-mentioned process and the corresponding true value of the congestion rate. The true value of the congestion rate was obtained using the load-varying data described in Patent Document 1, and the estimated value was obtained and plotted by applying an embodiment of the present invention to the vehicle. Here, a congestion rate of 50% corresponds to the extent that all the seats are occupied by passengers, 100% corresponds to the extent that all passengers are seated or can hold onto a strap or a pillar near the door, and 150% corresponds to the extent that shoulders are touching and one can read a newspaper comfortably. This corresponds to the range from the state where all the seated passengers at the front and back are visible in the image of the interior of the vehicle seen from the window to the state where standing passengers at the back are visible even if the vehicle is crowded, and this is the range whose characteristics are shown in the distribution of the heat map shown as an embodiment of the present invention.

混雑率の推定に使用する図18の重み係数w(i,j)及びバイアスbのパラメータ値は、ヒートマップの分布に特徴が表れる混雑率50%~150%の範囲において、応荷重データをもとに取得された混雑率Vを従属変数、その車両の画像データに対して本発明により取得されたy(i,j)を独立変数とした重回帰式(1)により求まる推定混雑率Zとの残差をm個のサンプルデータに対して2乗和を取った式(2)に示すQが最小となるようパラメータを決定するもので、その計算は最小二乗法により求めることができる。 The parameter values of the weighting coefficient w(i, j) and bias b in FIG. 18 used to estimate the congestion rate are determined so that Q shown in equation (2) obtained by taking the sum of squares of the residual between m sample data and the estimated congestion rate Zk calculated by multiple regression equation (1) in which the congestion rate Vk obtained based on the load-responsive data is used as the dependent variable and yk (i, j) obtained by the present invention for the image data of the vehicle is used as the independent variable in the congestion rate range of 50 % to 150%, where the characteristics appear in the heat map distribution, is minimized, and the calculation can be performed using the least squares method.

本発明の実施においては、あらかじめ試験的に測定したデータをもとに重み係数w(i,j)及びバイアスbを前述の方法により求め、その値を処理装置21に記憶させておけばよい。処理装置21において推定された混雑率は、例えば特許文献2に示す鉄道情報配信システムにおける情報配信サーバにネットワークを介して伝送され、ユーザの携帯端末等で利用されてもよい。 In implementing the present invention, the weighting coefficient w(i,j) and bias b are calculated by the above-mentioned method based on data previously measured experimentally, and the values are stored in the processing device 21. The congestion rate estimated by the processing device 21 may be transmitted via a network to an information distribution server in a railway information distribution system shown in Patent Document 2, for example, and used on a user's mobile terminal, etc.

[システム処理の他の一例]
図20は、図7のシステム構成図におけるメインプログラムのフローチャートを示し、図21は、処理装置21のストレージ114に格納され、混雑率推定処理において書き込み及び読み出しを行う各データテーブルの構成例であり、列車別測定テーブル240、号車別測定テーブル241、測定画像データテーブル242、ヒートマップテーブル243が格納されている。処理装置21は起動後にストレージ114にある測定データを記録する列車別測定データ240の記録開始ポインタを設定し、列車在線情報の情報を利用する場合(例えば変形例7)においては列車運行管理システム22への接続を行い、処理装置内の初期化200を行うとともにカメラ11に対して起動210を行った後、複数のカメラに対して同じタイミングでの画像を取得すべく同時に複数のカメラで撮影211を実行させる。
[Another example of system processing]
Fig. 20 shows a flowchart of the main program in the system configuration diagram of Fig. 7, and Fig. 21 shows an example of the configuration of each data table stored in the storage 114 of the processing device 21 and written and read in the congestion rate estimation process, which stores a train-specific measurement table 240, a car-specific measurement table 241, a measured image data table 242, and a heat map table 243. After starting up, the processing device 21 sets a recording start pointer for the train-specific measurement data 240 that records the measurement data in the storage 114, and in the case where information on train location information is used (for example, variant 7), it connects to the train operation control system 22, performs initialization 200 within the processing device and starts up 210 the camera 11, and then causes multiple cameras to simultaneously take images 211 so as to obtain images at the same timing from the multiple cameras.

処理装置21は、複数のカメラ11より撮影された画像を取得し、例えば、図11に示したステレオカメラの原理により被写体の3次元空間の分布データを生成する処理201を実行する。処理201の結果に対して、列車の進入を検知する処理202を続け、列車の進入が検知されるまで処理201に戻りカメラからの画像を繰り返し取得する。 The processing device 21 acquires images captured by the multiple cameras 11, and executes process 201 to generate distribution data of the subjects in three-dimensional space, for example, using the stereo camera principle shown in FIG. 11. The processing device 21 continues with process 202, which detects the approach of a train, based on the results of process 201, and returns to process 201 to repeatedly acquire images from the cameras until the approach of a train is detected.

図22は、本発明の一実施例の車両の連結部及び車両の端を検出する方法の一例を示すもので、(A)は列車の先頭車両3aとカメラ11の位置関係及び列車の側面とカメラの撮影範囲31を示す図であり、(B)は車両3aと車両3bとの連結部4とカメラ11の位置関係及び列車の側面とカメラの撮影範囲32を示す図であり、(C)は先頭車両がカメラの撮影範囲31に入ってきた時に撮影した画像、(D)は連結部4がカメラ撮影範囲32に入ってきた時に撮影した画像、(E)は(C)の鎖線34の高さにおける被写体画素の奥行き方向のグラフ35を、(F)は(D)の鎖線34aと鎖線34bの高さにおける被写体画素の奥行き方向のそれぞれのグラフ35a、35bを示す。 Figure 22 shows an example of a method for detecting the coupling and end of a vehicle in one embodiment of the present invention, where (A) is a diagram showing the positional relationship between the leading vehicle 3a of the train and the camera 11, and the side of the train and the camera's shooting range 31, (B) is a diagram showing the positional relationship between the coupling 4 between vehicles 3a and 3b and the camera 11, and the side of the train and the camera's shooting range 32, (C) is an image taken when the leading vehicle enters the camera's shooting range 31, (D) is an image taken when the coupling 4 enters the camera's shooting range 32, (E) is a graph 35 of the depth direction of the subject pixel at the height of the dashed line 34 in (C), and (F) is graphs 35a and 35b of the depth direction of the subject pixel at the heights of the dashed lines 34a and 34b in (D), respectively.

列車の先頭車両の進入検出は、例えば図22(C)のカメラ画像において車両の背景33のところが車両3aに変わることでカメラ画像全体に縦方向に連続して発生する大きな変化の発生を検出する方法やカメラ11から被写体までの距離の測定方法を使用し、鎖線34の高さの画素の奥行き方向のグラフ35が境界L2よりも遠方から境界L1よりも手前に変化することを検出することでも実現することができる。 The approach of the leading car of a train can be detected, for example, by detecting a large change that occurs continuously in the vertical direction across the entire camera image when the background 33 of the car in the camera image in Figure 22 (C) changes to car 3a, or by using a method of measuring the distance from the camera 11 to the subject and detecting that the depth graph 35 of the pixels at the height of the dashed line 34 changes from farther away than the boundary L2 to closer than the boundary L1.

列車の連結部4の通過検出は、例えば図22(D)のカメラ画像において縦方向に連続する帯状の色又は明るさなど画像の特徴量の変化を検出することで実現する方法や、車窓を含む鎖線34aの高さの画素の奥行き方向のグラフ35aや鎖線34bの高さの画素の奥行き方向のグラフ35bが、境界L1よりも手前から境界L1を超えて境界L1と境界L2の間の処理対象範囲に入ることを検出することでも実現することができる。 The passing of the train coupling 4 can be detected by, for example, detecting a change in image features such as the color or brightness of a vertically continuous strip in the camera image of FIG. 22 (D), or by detecting that a graph 35a of the depth direction of pixels at the height of the dashed line 34a, which includes the train window, or a graph 35b of the depth direction of pixels at the height of the dashed line 34b, which includes the train window, passes over boundary L1 from just before boundary L1 and enters the processing range between boundaries L1 and L2.

列車の最終車両の端の通過検出は、例えば先に述べたカメラ11から被写体までの距離の測定方法により被写体の画素の奥行きが境界L2よりも連続して存在することを検出することで実現することができる。なお、図22の境界L1、L2は、図8のように車内の範囲に設定した場合であり、図7のように境界を車外に設定した場合には、境界L1ではなく画素の奥行きで連結部及び車両の端を検出すればよい。 Detection of the passing of the end of the last car of the train can be achieved, for example, by detecting that the depth of the pixels of the subject is continuous beyond the boundary L2 using the method of measuring the distance from the camera 11 to the subject described above. Note that the boundaries L1 and L2 in Figure 22 are set within the interior of the car as in Figure 8. If the boundary is set outside the car as in Figure 7, the joint and the end of the car can be detected by the pixel depth instead of the boundary L1.

図20の処理202において、図22(E)に示した被写体画像の奥行き方向が境界L2より遠方の背景33から境界L2より手前の距離に出現することにより、列車の進入が検知された場合は複数の車両が連結された一の列車の混雑率を推定するための処理203を開始する。列車在線情報の情報を利用する場合(例えば変形例7)においては、後述する図28に示すプログラムにより列車運行管理システム22より該当する列車番号及び車種を取得し列車別測定テーブル240に書き込み、これから測定する車両を計数するための号車番号カウンターをリセットする。 In process 202 of FIG. 20, if the depth direction of the subject image shown in FIG. 22(E) appears from the background 33, which is farther away than the boundary L2, to a distance closer to the boundary L2, and thus the approach of a train is detected, process 203 is started to estimate the congestion rate of a train made up of multiple cars. When using train location information (for example, variant 7), the program shown in FIG. 28 described later obtains the relevant train number and car type from the train operation control system 22 and writes them into the train-specific measurement table 240, and resets the car number counter for counting the cars to be measured.

列車混雑率の推定の処理は、複数台のカメラ画像の取得及び被写体の3次元空間の分布データを生成する201の処理から、車両の連結部の検出処理204、車窓の検出205及びヒートマップの生成を列車の終了端の検出206まで繰り返し実行した後、その間に測定されたデータをもとに検出した窓画像ごとの混雑率の推定から号車ごとの混雑率の推定及び一の列車の混雑率の計算とその結果を送信する処理209により構成されている。 The process of estimating train congestion rates consists of a process 201 of acquiring images from multiple cameras and generating three-dimensional spatial distribution data of the subject, a process 204 of detecting the coupling parts of the cars, a process 205 of detecting the car windows, and a process 206 of generating a heat map, which are then repeatedly executed until the end of the train is detected. Based on the data measured during this process, the congestion rate for each window image detected is estimated, and the congestion rate for each car is estimated, and the congestion rate for the entire train is calculated, and the results are transmitted.

連結部検出処理204は、図22(F)に示した被写体画像の奥行き方向が境界L1より手前から境界L1から境界L2までの処理対象範囲内に一定の横方向の長さ検出したことにより車両の連結部4であることを検知してもよい。検知した場合(204のYes)は、号車別測定テーブル241(図21参照)へ直前の車両に対する号車番号カウンターの値と直前の車両の測定にて検出された窓画像数及び測定画像テーブルのインデックスを記録し、号車番号カウンターをインクリメントし、及び車両ごとに検出した窓の画像を計数する窓画像検出カウンターをリセットし次の車両の測定準備を行う処理207を実行する。 The coupling detection process 204 may detect that the subject image shown in FIG. 22(F) is a vehicle coupling 4 by detecting a certain horizontal length in the depth direction within the processing range from boundary L1 to boundary L2, starting just before boundary L1. If detected (Yes in 204), the process executes process 207, which records the value of the car number counter for the immediately preceding vehicle, the number of window images detected in the measurement of the immediately preceding vehicle, and the index of the measurement image table in the car-specific measurement table 241 (see FIG. 21), increments the car number counter, and resets the window image detection counter that counts the window images detected for each vehicle, and prepares to measure the next vehicle.

窓画像検出205では、画像内に車窓から見た車内の画像があるか否かを検出し、車内の画像が有る場合(205のYes)は、図3にて示した処理により被写体画像の画素の分布を奥行きと高さごとに集計したヒートマップを生成し、その結果を測定画像データテーブル242及びヒートマップテーブル243(図21参照)に記録し、窓画像検出カウンターをインクリメントする処理208を実行する。画像内に車窓から見た車内の画像があるか否かは、例えば、図22(F)のグラフ35aに示すように、車窓を含む鎖線34aの高さの画素の奥行き方向のグラフ35aが境界L1から境界L2までの処理対象範囲内に位置することで撮影した画像に車窓から見た車内の画像があることを検出してもよい。 Window image detection 205 detects whether the image contains an image of the interior of the vehicle as seen through the vehicle window. If an image of the interior of the vehicle is present (Yes in 205), a heat map is generated by tallying the distribution of pixels in the subject image by depth and height using the process shown in FIG. 3, the results are recorded in the measured image data table 242 and the heat map table 243 (see FIG. 21), and process 208 is executed to increment the window image detection counter. Whether an image of the interior of the vehicle as seen through the vehicle window is present in the image may be detected by, for example, detecting that the image contains an image of the interior of the vehicle as seen through the vehicle window in the captured image when the graph 35a in the depth direction of the pixels at the height of the dashed line 34a including the vehicle window is located within the processing target range from boundary L1 to boundary L2, as shown in graph 35a in FIG. 22(F).

列車終了端の検出206は、列車先頭車両の検出と同様に被写体画像の奥行き方向が境界L2より手前の距離から境界L2より遠い距離に一定の長さ出現することにより検知すればよい。 The end of the train (206) can be detected by detecting the appearance of a certain length in the depth direction of the subject image from a distance before the boundary L2 to a distance farther away from the boundary L2, in the same way as detecting the leading car of the train.

処理装置21は、処理209にてストレージ114より列車別測定テーブル240と号車別測定テーブル241を読み出し情報配信サーバ23に送信し、送信完了後、列車別測定テーブルの書き込みポインタをインクリメントし、次の列車の測定に備える。情報配信サーバ23は、処理212にて処理装置21からの情報を受信し、列車番号によって特定された列車について、カメラ11の測定場所及び測定時間における列車及び各号車の混雑率推定値を得ることができ、鉄道情報として一般利用者に提供される配信コンテンツ213として利用する。 In process 209, the processing device 21 reads out the train-specific measurement table 240 and the car-specific measurement table 241 from the storage 114 and transmits them to the information distribution server 23. After transmission is complete, the processing device 21 increments the write pointer of the train-specific measurement table to prepare for measuring the next train. In process 212, the information distribution server 23 receives information from the processing device 21 and can obtain estimated congestion rates for the train and each car at the measurement location and measurement time of the camera 11 for the train identified by the train number, and uses this as distribution content 213 to be provided to general users as railway information.

図23は処理209における混雑率の計算を行う部分のプログラムのフローチャートを示す。図23に示すプログラムの処理の流れは、処理230にて1列車分のデータを図21の列車別測定テーブル240から車両数Nと号車別測定テーブルのポインタを取得する。以下、1車両ごとに号車を示すカウンターgにより指定する号車の混雑率を計算する処理231~235のループを回したのち、処理236にて全号車に対する混雑率の計算結果を号車別測定テーブル241から取得しその平均値として列車の混雑率Ztrainを求め、その結果を処理237にて列車別測定テーブル240に記録して終了する。 Fig. 23 shows a flow chart of the program for calculating the congestion rate in step 209. The flow of the program shown in Fig. 23 is as follows: in step 230, the number of cars N and a pointer to the car-specific measurement table are obtained from the train-specific measurement table 240 in Fig. 21 for data for one train. Thereafter, a loop of steps 231 to 235 is executed to calculate the congestion rate of a car designated by a counter g indicating the car number for each car, and then in step 236, the calculation results of the congestion rates for all cars are obtained from the car-specific measurement table 241, and the congestion rate Z train of the train is calculated as the average value, and in step 237, the result is recorded in the train-specific measurement table 240, and the program ends.

処理231~235は、1車両分の混雑率を計算するためのループであり、号車別測定テーブル241より検出窓画像数Mgと各画像に対するヒートマップテーブル243のポインタをもとに、当該車両で検出された窓画像に対するヒートマップHg,hを順次読み出し、図18に示す演算を行い窓画像ごとの混雑率推定値を求め、これを測定画像データテーブル242に書き込み、当該車両の全ての窓画像に対する混雑率推定値の計算が終了した後、測定画像データテーブル242に記録された窓幅と各画像から求めた混雑率推定値をもとに、例えば図24に示す方法により当該号車の混雑率推定値Zcarを求めこれをテーブル241に書き込む。 Processes 231 to 235 are a loop for calculating the congestion rate for one car, in which heat maps H g,h for the window images detected in that car are read out sequentially from the car-specific measurement table 241 based on the number of detected window images M g and a pointer to the heat map table 243 for each image, the calculation shown in FIG. 18 is performed to determine an estimated congestion rate for each window image, and this is written into the measured image data table 242. After calculation of the congestion rate estimates for all window images in that car has been completed, an estimated congestion rate Z car for that car is determined based on the window width recorded in the measured image data table 242 and the congestion rate estimates determined from each image, for example by the method shown in FIG. 24 , and this is written into table 241.

図24は、車窓を写した画像より推定した混雑率より1車両分の混雑率を推定する方法の一例を示したものであり、(A)は車両の側面であり、(B)は1車両分の混雑率推定値Zcarの計算式を示す。図24(A)において、破線の四角はカメラで撮影した範囲70であり、その中の灰色のエリアは画像中における混雑率を推定した窓の範囲71であり、窓の範囲71の横幅は窓幅Wiであり、各画像から得られた混雑率の推定値Ziが示されている。図24(B)におけるβiは窓幅Wiによって重み付けを変えるための係数であり、混雑率の推定を行った窓画像数N個の混雑率推定値に対して窓幅が一定の大きさ以下の場合に小さな値にすることでドア窓のような狭い窓幅から得られた混雑率推定値の影響を小さくすることができるものであり、小さな値をゼロとすることでドア窓から得られた混雑率推定値を除外することもできる。 FIG. 24 shows an example of a method for estimating the congestion rate of one vehicle from the congestion rate estimated from an image of a car window, where (A) is the side of the vehicle, and (B) shows a calculation formula for the congestion rate estimated value Z car of one vehicle. In FIG. 24(A), the dashed square is the range 70 photographed by the camera, the gray area therein is the window range 71 in which the congestion rate in the image is estimated, the width of the window range 71 is the window width W i , and the congestion rate estimate value Z i obtained from each image is shown. β i in FIG. 24(B) is a coefficient for changing the weighting according to the window width W i , and by setting it to a small value when the window width is equal to or smaller than a certain size, it is possible to reduce the influence of the congestion rate estimate value obtained from a narrow window width such as a door window, and by setting the small value to zero, it is also possible to exclude the congestion rate estimate value obtained from the door window.

図25は、本発明の一実施例の列車の窓の範囲の検出方法の一例を示すもので、カメラから被写体までの距離を水平方向a1-a2断面でプロットしたグラフ36において窓の範囲内で奥行き方向が境界L1よりも奥側の値を示しており、境界L1の手前側から奥側に横断する点を検出することで窓の水平方向の開始点を、境界L1の奥側から手前側に横断する点を検出することで窓の水平方向の終了点を検出することができ、その幅は窓幅に相当する。同様に垂直方向b1-b2断面でプロットしたグラフ37において窓の範囲内で奥行き方向が境界L1よりも奥側の値を示しており、境界L1の横断する点を検出することで窓の垂直方向の枠を検出することができ、その幅は窓の高さに相当する。検出した窓幅や窓の高さは測定画像データテーブル242に記録する。 Figure 25 shows an example of a method for detecting the range of a train window in one embodiment of the present invention. Graph 36, which plots the distance from the camera to the subject on a horizontal a1-a2 cross section, shows values within the window range that are deeper than boundary L1. By detecting a point that crosses boundary L1 from the near side to the far side, the start point of the window in the horizontal direction can be detected, and by detecting a point that crosses boundary L1 from the far side to the near side, the end point of the window in the horizontal direction can be detected, and the width of the window corresponds to the window width. Similarly, graph 37, which plots a vertical b1-b2 cross section, shows values within the window range that are deeper than boundary L1, and by detecting a point that crosses boundary L1, the vertical frame of the window can be detected, and the width of the window corresponds to the window height. The detected window width and window height are recorded in the measured image data table 242.

本実施形態では、カメラにより撮影された画像より車窓内の混雑率を求めるものであるが、窓幅がカメラの水平方向の撮影範囲を超える大きさの場合や、カメラの撮影タイミングによりカメラ画像に車窓全体ではなく一部が撮影された場合、それぞれカメラ画像に写る車窓内の混雑率をカメラ画像に写る車窓の幅で加重平均を取ることでカメラ画像をつなぎ合わせて車窓全体が写るデジタル画像を生成せずとも正しく混雑率を求めることができる。 In this embodiment, the congestion rate inside the train window is calculated from images captured by a camera, but if the window width exceeds the horizontal shooting range of the camera, or if the camera image captures only part of the train window rather than the entire window due to the timing of the camera's shooting, the congestion rate inside the train window captured in each camera image is weighted by the width of the train window captured in the camera image, making it possible to accurately calculate the congestion rate without having to stitch together the camera images to generate a digital image that captures the entire train window.

図26は、画像に写る車窓の幅で加重平均を取る処理の一例を示すもので、(A)は横幅の長い車窓の全体を示す図であり、(B)は車窓の左側を撮影した画像であり、(C)は車窓の中央部分を撮影した画像であり、(D)は車窓の右側を撮影した画像である。それぞれの画像で検出された窓幅をW1、W2及びW3、それぞれの画像から推定された混雑率をZ1、Z2、Z3とした場合、(A)に示す車窓全体から推定する混雑率Zwindowは(E)の式で求めることができる。この方法によれば、特許文献4に示される連続して撮影される画像を繋ぎ合わせたパノラマ画像を生成したのちに混雑率推定を行う方法と異なり、データ処理の簡素化及び高速化に寄与するものである。なお、窓幅によって混雑率推定の計算を変える場合は測定画像データテーブル242に記録された窓幅を使用する。 FIG. 26 shows an example of a process of taking a weighted average by the width of the car window shown in the image, where (A) is a diagram showing the entire car window with a long width, (B) is an image taken of the left side of the car window, (C) is an image taken of the center part of the car window, and (D) is an image taken of the right side of the car window. If the window widths detected in each image are W 1 , W 2 and W 3 , and the congestion rates estimated from each image are Z 1 , Z 2 and Z 3 , the congestion rate Z window estimated from the entire car window shown in (A) can be obtained by the formula (E). This method, unlike the method shown in Patent Document 4 in which a panoramic image is generated by stitching together images taken continuously and then the congestion rate is estimated, contributes to simplifying and speeding up data processing. Note that when the calculation of the congestion rate estimation is changed depending on the window width, the window width recorded in the measured image data table 242 is used.

また、図23の処理233にてヒートマップから混雑率を計算する際に使用するパラメータを車種ごとに切り替える場合は、列車別測定テーブル240から車種を取得し、車種ごとのパラメータが記録されたパラメータテーブル244を用いて、該当する車種のパラメータを選択し使用する。図27は、処理装置21のストレージ114に格納されたパラメータテーブル244の例である。パラメータテーブル244は、車種によってパラメータを異なる値とすることができる構造とし、例えば列車運行管理システム22から取得した車種の情報により該当するパラメータを選択して使用する。 When the parameters used to calculate the congestion rate from the heat map in process 233 of Figure 23 are to be switched for each vehicle type, the vehicle type is obtained from the train-specific measurement table 240, and the parameters for the relevant vehicle type are selected and used using the parameter table 244 in which the parameters for each vehicle type are recorded. Figure 27 is an example of the parameter table 244 stored in the storage 114 of the processing device 21. The parameter table 244 has a structure that allows parameters to have different values depending on the vehicle type, and the relevant parameters are selected and used based on the vehicle type information obtained from the train operation management system 22, for example.

図28は、列車運行管理システム22にアクセスするプログラムのフローチャートを示す。本プログラムは、図20の処理203より呼び出され実行されるプログラムであり、処理装置21は、列車運行管理システム22から列車在線情報223の取得処理220を実行し、列車位置がカメラ11の設置場所にある列車の列車番号及び車種の抽出処理221を行い、これを列車別測定テーブル240に書き込む処理222を実行する。図28は、メインプログラムで列車の先頭車両を検出する都度、列車運行管理システム22にアクセスしているが、メインプログラムとは非同期に一定時間ごとに列車運行管理システムへアクセスし、最新の列車在線情報を処理装置21の中に保持し、参照することで列車運行管理システムとのアクセスに要する時間がメインプログラムの処理タイミングからの影響をなくしても構わない。 Figure 28 shows a flowchart of a program that accesses the train traffic control system 22. This program is called and executed by process 203 in Figure 20, and the processing device 21 executes process 220 to acquire train location information 223 from the train traffic control system 22, process 221 to extract the train number and type of train whose train position is at the installation location of the camera 11, and process 222 to write this to the train-specific measurement table 240. In Figure 28, the train traffic control system 22 is accessed each time the leading car of the train is detected by the main program, but the train traffic control system may be accessed at regular intervals asynchronously with the main program, and the latest train location information may be stored in the processing device 21 and referenced, eliminating the effect of the time required to access the train traffic control system on the processing timing of the main program.

図29は、列車在線情報223を説明する図であり、(A)は列車位置80、次の混雑率推定対象の列車81及び本発明によるカメラ測定位置82の関係を示し、(B)は列車運行管理システム22に保持される列車を識別する列車番号、列車位置及び車種の情報を有する列車在線情報の例を示す。処理装置21は、一定の周期で運行管理システム22より列車在線情報を取得し最新の情報に更新しておくことで次にカメラ11の前を通過する列車の車種の情報をあらかじめ知ることができ、車種に応じた混雑率推定のパラメータを予め設定しておくことで車両構造の違いを考慮した混雑率推定を行うことができる。 Figure 29 is a diagram explaining train location information 223, where (A) shows the relationship between train position 80, the next train 81 to be estimated for congestion rate, and camera measurement position 82 according to the present invention, and (B) shows an example of train location information having train number, train position, and vehicle type information that identifies the train stored in the train traffic control system 22. By acquiring train location information from the traffic control system 22 at regular intervals and updating it to the latest information, the processing device 21 can know in advance the information on the vehicle type of the next train that will pass in front of the camera 11, and by setting in advance parameters for congestion rate estimation according to the vehicle type, congestion rate estimation that takes differences in vehicle structure into account can be performed.

[変形例1]
図30は、撮像手段11の変形例を説明する図である。図9の撮像手段は、1台ごとに一つの光学レンズを有するものとしていたが、本実施形態では、二つのレンズ120、121及びイメージセンサー122、123が2つ設けられており、2つのレンズから同時に取得できるデジタル画像にアクセスできるイメージメモリ124を具備する撮像手段11である。
[Modification 1]
Fig. 30 is a diagram for explaining a modified example of the imaging means 11. The imaging means in Fig. 9 has one optical lens per unit, but in this embodiment, two lenses 120, 121 and two image sensors 122, 123 are provided, and the imaging means 11 has an image memory 124 that can access digital images that can be simultaneously acquired from the two lenses.

図30に例として示した二つのレンズ120、121を備えたカメラは、自動運転やロボットにおいて3次元画像データを取得するものとして開発されたものであり、光学レンズのほかにステレオカメラの原理により3次元画像データを求めるためのプログラム125と演算部126及びCPU103、RAM105を内蔵し、通信インタフェース106より3次元画像データを、ネットワークNを介してライン画像生成手段に伝達できる。 The camera with two lenses 120, 121 shown as an example in Figure 30 was developed to acquire three-dimensional image data for autonomous driving and robots, and in addition to the optical lenses, it has a built-in program 125 for obtaining three-dimensional image data using the principles of a stereo camera, a calculation unit 126, a CPU 103, and a RAM 105, and the three-dimensional image data can be transmitted from the communication interface 106 to the line image generation means via the network N.

[変形例2]
図31及び図32は、図18の混雑率推定方法の変形例を説明する図である。図18においては、重み係数w(i,j)及びバイアスbを予め設定した固定値を使用していたが、本実施形態では、ヒートマップ41のデータによって重み係数及びバイアスを可変としたものである。図19の散布図において、エリア53では、混雑率の真値に対して推定値が低くなる誤差が生じているが、これは高い混雑率において立位の乗客の重なりによって奥側の乗客が見えなくなる確率が高くなるために生じる誤差である。重み係数及びバイアスを可変とすることにより、かかる誤差を補正することができる。
[Modification 2]
31 and 32 are diagrams for explaining a modification of the congestion rate estimation method of FIG. 18. In FIG. 18, the weighting coefficient w(i, j) and the bias b are fixed values set in advance, but in this embodiment, the weighting coefficient and the bias are made variable according to the data of the heat map 41. In the scatter diagram of FIG. 19, an error occurs in area 53 where the estimated value is lower than the true value of the congestion rate. This error occurs because, at a high congestion rate, the probability that passengers at the back will not be visible due to the overlap of standing passengers increases. By making the weighting coefficient and the bias variable, such an error can be corrected.

図31(A)は例として5×5のセグメントで構成されるヒートマップ41であり、(B)は通常時の各セグメントにおける重み係数の補正値を示し、(C)は補正時の各セグメントにおける重み係数の補正値を示す。補正の有無は、例えば、ヒートマップ41における所定のセグメント範囲の画素数の総和を条件として判定してもよい。図31では、セグメント(3,2)、(3,3)、(3,5)のエリア54における画素数の総和が一定以上の場合は、乗客が吊り革付近及び通路付近に多くいると判定し、(C)に示すように、エリア55について、重み係数w(i,j)の各i、jに対応して係数を乗じた重み係数を使用することで立位の乗客によって被写体の画素数が減少するヒートマップの左下側の画素数を補正し、それ以外の場合は、(B)に示すように係数の補正を行わない構成としてもよい。あるいは、重みに対する係数は変えずにバイアスbを変更してもよく、例えば、セグメント(3,2)、(3,3)、(3,5)の画素数の総和が一定以上である場合は、その総和の値に応じてバイアス値を大きくしても構わない。 Figure 31 (A) is an example of a heat map 41 consisting of 5 x 5 segments, (B) shows the weight coefficient correction value in each segment under normal conditions, and (C) shows the weight coefficient correction value in each segment under correction. The presence or absence of correction may be determined, for example, based on the total number of pixels in a predetermined segment range in the heat map 41. In Figure 31, if the total number of pixels in area 54 of segments (3, 2), (3, 3), and (3, 5) is equal to or greater than a certain amount, it is determined that there are many passengers near the straps and near the aisles, and as shown in (C), for area 55, the number of pixels in the lower left side of the heat map where the number of pixels of the subject is reduced by standing passengers is corrected by using a weight coefficient w (i, j) multiplied by a coefficient corresponding to each i and j of the weight coefficient w (i, j), and in other cases, the coefficient correction may be performed as shown in (B). Alternatively, the bias b can be changed without changing the coefficient for the weight. For example, if the sum of the pixel counts of segments (3,2), (3,3), and (3,5) is equal to or greater than a certain value, the bias value can be increased according to the value of that sum.

図32は、ヒートマップ41のデータによって重み係数及びバイアスを可変とした構成図の一例であり、図18の構成に加えて、ヒートマップの各セグメントに対して前処理46を施した値を入力として、補正の有無を判定し、通常又は補正後の重み係数w(i,j)及びバイアスbを出力する重み係数及びバイアス値の制御部49を追加した。 Figure 32 is an example of a configuration diagram in which the weighting coefficients and biases are variable depending on the data in the heat map 41. In addition to the configuration in Figure 18, a weighting coefficient and bias value control unit 49 has been added that receives as input the values obtained by performing preprocessing 46 on each segment of the heat map, determines whether correction is required, and outputs the normal or corrected weighting coefficient w(i,j) and bias b.

[変形例3]
図33は、混雑率推定時における座席シート6の影響を補正する変形例を説明する図である。図19の散布図において、エリア51では、混雑率の真値に対して推定値が高くなる傾向があるが、これは座席シート上に着座する乗客が少なくカメラ画像に写る奥側の座席シートの画素数が混雑率の推定に影響と考えらえる。このため、図33に示すように、混雑率推定のために使用する範囲として、境界L1及びL2だけではなく、奥側の座席シート6bに該当する位置のセグメントを集計対象から除外したエリア56とすることで座席シート6の影響を補正することができる。
[Modification 3]
Fig. 33 is a diagram for explaining a modified example for correcting the influence of the seat 6 when estimating the congestion rate. In the scatter diagram of Fig. 19, the estimated value tends to be higher than the true value of the congestion rate in area 51, but this is thought to be because there are few passengers seated on the seats and the number of pixels of the seats at the back side captured in the camera image affects the estimation of the congestion rate. Therefore, as shown in Fig. 33, the influence of the seat 6 can be corrected by setting the area 56, which excludes not only the boundaries L1 and L2 but also the segment corresponding to the seat 6b at the back side from the target of aggregation, as the range used for estimating the congestion rate.

[変形例4]
図34は、混雑率推定時における座席シート6の影響を補正する他の変形例を説明する図である。変形例3においては混雑率推定のための領域を予め車両の設計情報等を用いて求めていたが、本実施形態では、空車状態で走行した際に得られるカメラ画像に対するヒートマップのデータよりカメラから見た車両内の構造物の被写体が占めるセルやその陰で見えないセルの位置を処理装置21に記録しておくことで、混雑率推定のための対象セル又はセグメントの情報を得ることができる。図34は、空車の状態で走行した際に取得できるヒートマップ41の例を示したものであり、ヒートマップ41のセル44のうち車両構造物が占めるセル44aをハッチングし、車両構造物の陰で見えないセル44bを灰色で示している。このうち、乗客の有無によって画素数が変わるセルは混雑率の推定における誤差の要因となるものでありカメラから遠い側の座席シート6bが位置するセル又はセルを含むセグメントがこれに該当するものとして混雑率推定の対象外とし、乗客の有無によって画素数が変化しない例えば網棚9等は固定値として発生するものであり混雑率推定におけるバイアスbにより補正することができる。
[Modification 4]
FIG. 34 is a diagram for explaining another modified example for correcting the influence of the seat 6 when estimating the congestion rate. In the modified example 3, the area for estimating the congestion rate was obtained in advance using the design information of the vehicle, etc., but in this embodiment, the positions of the cells occupied by the objects of the structures inside the vehicle as seen from the camera and the cells that are hidden behind the structures are recorded in the processing device 21 from the data of the heat map for the camera image obtained when the vehicle is running in an empty state, so that information on the target cells or segments for estimating the congestion rate can be obtained. FIG. 34 shows an example of a heat map 41 that can be obtained when the vehicle is running in an empty state, in which the cells 44a occupied by the vehicle structures among the cells 44 in the heat map 41 are hatched, and the cells 44b that are hidden behind the vehicle structures are shown in gray. Among these, cells whose pixel count changes depending on the presence or absence of passengers are a cause of error in estimating the congestion rate, and the cell or segment including the cell where the seat 6b on the far side from the camera is located corresponds to this and is excluded from the congestion rate estimation, and the number of pixels that does not change depending on the presence or absence of passengers, for example, the luggage rack 9, etc., occurs as a fixed value and can be corrected by the bias b in the congestion rate estimation.

本発明はカメラ画像を用いて混雑率を推定するものでありカメラ設置位置などにより混雑率推定において使用するパラメータが変わる可能性があるが、空車走行時に取得するヒートマップのデータを使用することで複数の箇所で測定を行い場合におけるカメラ設置位置の違いによるパラメータの調整を簡略化することができる。 The present invention estimates congestion rates using camera images, and the parameters used to estimate congestion rates may vary depending on factors such as the camera installation position. However, by using heat map data acquired when the vehicle is running empty, it is possible to simplify parameter adjustments due to differences in camera installation positions when measurements are taken at multiple locations.

[変形例5]
図35は、混雑率推定方法における更なる変形例を説明する図であり、(A)は混雑率200%以上における車内の状態を示し、(B)はそのヒートマップ41を示す。本実施形態では、車両の構造が進行方向に向かって左右対称である場合、高い混雑率では乗客が大きな隙間なく乗車する必要があるため、乗客の配置は概ね左右均等になるとみなし、演算の簡略化と精度の高い推定値を得るものである。変形例2においては、高い混雑率において立位の乗客の重なりによって奥側の乗客が見えなくなる確率が高くなるために生じる誤差を補正するため、ヒートマップの分布に応じて重み係数及びバイアスを可変としたものであるが、図35(B)のヒートマップ41における左下のエリア61のように、被写体の画素数がゼロとなるエリアについては、重み係数を乗じる補正ができない。高い混雑率では車内の乗客の配置が左右均等とみなせることを考慮し、例えば中心線60に対してカメラ寄りのエリア62に対する混雑率を奥側の推定混雑率として使用することで高い混雑率の状態でも精度の高い推定値を得ることができる。しかも、図18に示す混雑率推定の構成の中でエリア62に対する演算のみを行うものとすることで実現でき、処理の簡便化が図れる。また、同様の処理は、変形例2の重み係数w(i,j)の補正によっても実現でき、例えば、図31(A)の中心よりも右側セグメント(n,4)、(n,5)に対応するy(i,j)に乗ずる重み係数w(i,j)を2とし、中心よりも左側セグメント(n,1)、(n,2)に対応するy(i,j)に乗ずる重み係数w(i,j)を0とすることでも実現できる。そして、この係数の切り替えは例えば変形例2で説明した図31のエリア56の値を条件として実施してもよい。
[Modification 5]
FIG. 35 is a diagram for explaining a further modification of the congestion rate estimation method, in which (A) shows the state inside the vehicle when the congestion rate is 200% or more, and (B) shows the heat map 41. In this embodiment, when the structure of the vehicle is symmetrical in the direction of travel, passengers need to board without large gaps at a high congestion rate, so the passengers are assumed to be arranged roughly evenly on the left and right, and calculations are simplified and a highly accurate estimated value is obtained. In modification 2, in order to correct errors that occur because the probability that passengers at the back are not visible due to the overlap of standing passengers at a high congestion rate increases, the weighting coefficient and bias are made variable according to the distribution of the heat map. However, for areas where the number of pixels of the subject is zero, such as the area 61 at the bottom left of the heat map 41 in FIG. 35(B), correction by multiplying the weighting coefficient cannot be performed. Considering that the arrangement of passengers inside the vehicle can be considered to be even on the left and right at a high congestion rate, for example, the congestion rate for an area 62 closer to the camera than the center line 60 is used as the estimated congestion rate at the back, and a highly accurate estimated value can be obtained even in a state of high congestion rate. Moreover, this can be realized by performing calculations only for area 62 in the configuration of congestion rate estimation shown in Fig. 18, and processing can be simplified. In addition, the same processing can also be realized by correcting the weighting coefficient w(i,j) of Modification 2, for example, by setting the weighting coefficient w(i,j) multiplied by y(i,j) corresponding to the segments (n,4) and (n,5) on the right side of the center in Fig. 31(A) to 2, and setting the weighting coefficient w(i,j) multiplied by y(i,j) corresponding to the segments (n,1) and (n,2) on the left side of the center to 0. This coefficient switching may be performed, for example, using the value of area 56 in Fig. 31 described in Modification 2 as a condition.

[変形例6]
図36は、車両ドアのドア窓5bに基づく混雑率推定を説明する図であり、(A)はドア窓5b間近に立つ乗客10eがいる場合の車両側面から見た図であり、(B)は車両内の状況を示し、(C)はドア窓5bに対応するヒートマップ41の例を示す。車両のドア窓5bに関しても混雑率推定の対象となるものであり、座席シートが空いていても車両のドア間近に立位で乗車する乗客がいることがあり幅の狭いドア窓間近に立つ乗客10eによって車内の視界が制限されるなど座席シート近くの車窓とは異なるヒートマップの分布を呈することがある。図36(C)のヒートマップにはドア窓間近に立位する乗客10eに対応して手前側の低い位置から高い位置のエリア65の全体において高い画素の分布となっている。一方、それ以外のエリアでは狭いドア窓間近に立つ乗客10bによって被写体の画像の分布は僅かとなっている。このため、図24(B)に示したように、1車両分の混雑率推定値Zcarの計算式において、窓幅Wiによる重み付け係数βiを窓幅が一定の大きさ以下の場合に小さな値にすることによって、1車両分の混雑率推定の中でドア窓の影響を小さくすることができる。なお、ドア窓の係数βiをゼロとすることでドア窓から得られた混雑率推定値を除外することもできる。
[Modification 6]
FIG. 36 is a diagram for explaining congestion rate estimation based on the door window 5b of the vehicle door, where (A) is a view from the side of the vehicle when there is a passenger 10e standing close to the door window 5b, (B) shows the situation inside the vehicle, and (C) shows an example of a heat map 41 corresponding to the door window 5b. The door window 5b of the vehicle is also subject to congestion rate estimation, and even if the seat is vacant, there may be a passenger standing close to the door of the vehicle, and the visibility inside the vehicle may be restricted by the passenger 10e standing close to the narrow door window, resulting in a heat map distribution different from that of the vehicle window near the seat. In the heat map of FIG. 36(C), a high pixel distribution is shown in the entire area 65 from a low position to a high position on the front side corresponding to the passenger 10e standing close to the door window. On the other hand, in other areas, the distribution of the image of the subject is small due to the passenger 10b standing close to the narrow door window. For this reason, as shown in Fig. 24(B), in the calculation formula of the congestion rate estimate value Zcar for one vehicle, the weighting coefficient βi by the window width W i is set to a small value when the window width is equal to or smaller than a certain size, thereby making it possible to reduce the influence of the door window in the congestion rate estimate for one vehicle. Note that the congestion rate estimate value obtained from the door window can also be excluded by setting the coefficient βi of the door window to zero.

[変形例7]
本実施形態は、混雑率の推定に車両の構造に関するパラメータを使用する場合に、さまざまな車両タイプが運用されるケースにおいても混雑率の推定精度を高めるための方法に関する。例えば、変形例3のカメラ画像に写る座席シートなど車両構造物の範囲を考慮した測定範囲、変形例6のドア窓など横幅の狭い窓から得られる混雑率推定値に対する重み付けなどは、車両の構造によってこれらのパラメータが変化する。本発明において車両の混雑率を推定する際に使用するパラメータを車両の構造に対応した車種の情報により切り替えるため、列車運行管理システム22より列車位置とその車種の情報を取得することであらかじめ複数の車種に対するパラメータのセットを処理装置21に記憶しておき、列車の検出の都度、対応する車種に対するパラメータを混雑率の推定に使用することで実現できる。
[Modification 7]
This embodiment relates to a method for improving the estimation accuracy of the congestion rate even in cases where various vehicle types are operated when parameters related to the structure of a vehicle are used to estimate the congestion rate. For example, the measurement range considering the range of vehicle structures such as seats captured in a camera image in Modification 3, and the weighting of the congestion rate estimate value obtained from a narrow window such as a door window in Modification 6, etc., are changed depending on the structure of the vehicle. In order to switch the parameters used when estimating the congestion rate of a vehicle in the present invention based on information on the vehicle type corresponding to the vehicle structure, it is possible to realize this by acquiring information on the train position and its vehicle type from the train operation management system 22, storing parameter sets for multiple vehicle types in advance in the processing device 21, and using the parameters for the corresponding vehicle type for estimating the congestion rate every time a train is detected.

例えば、処理装置21は、一定の周期で運行管理システム22にアクセスし、図29(B)に示すような列車在線情報を取得し、最新の情報に更新することによって、次にカメラの前を通過する列車の車種の情報を予め判別することができ、パラメータテーブル244(図27)を参照して、車種に応じた混雑率推定のパラメータを設定することで車両構造の違いを考慮した混雑率推定を行うことができる。また、図37(A)に示すように、車両側面の距離画像を撮影する撮像手段11とは別のカメラ25を列車の先頭車両3aの前面を撮影する方向25aに設置し、処理装置21に実装した画像認識プログラムによって、カメラ25により取得される図37(B)の列車前面の画像から車種を判定することでも、パラメータテーブル244(図27)を参照して、車種に応じた混雑率推定のパラメータを設定し、車両構造の違いを考慮した混雑率推定を行うことができる。なお、画像認識プログラムは、列車前面のデザインから車種を判定してもよいし、列車前面の列車番号91及び/又は車種に対応する車両型式92の文字を判定してもよい。 For example, the processing device 21 accesses the traffic control system 22 at regular intervals, acquires train location information as shown in FIG. 29(B), and updates it to the latest information, thereby being able to determine in advance the information on the type of train that will pass in front of the camera next, and can perform congestion rate estimation taking into account differences in vehicle structure by setting parameters for congestion rate estimation according to the type of train with reference to the parameter table 244 (FIG. 27). Also, as shown in FIG. 37(A), a camera 25 other than the imaging means 11 that captures distance images of the side of the train is installed in a direction 25a that captures the front of the leading vehicle 3a of the train, and the image recognition program implemented in the processing device 21 determines the type of train from the image of the front of the train in FIG. 37(B) captured by the camera 25, and can set parameters for congestion rate estimation according to the type of train with reference to the parameter table 244 (FIG. 27), thereby performing congestion rate estimation taking into account differences in vehicle structure. The image recognition program may determine the type of train from the design of the front of the train, or may determine the train number 91 on the front of the train and/or the characters of the vehicle model 92 corresponding to the type of train.

上記変形例1~7では、個別の距離画像に基づくヒートマップについて説明したが、複数の距離画像に基づく総括ヒストグラムデータから生成された特徴データ(ヒートマップ:例えば図17)についても利用可能である。また、本明細書において説明した構成は一例であり、これらを相互に組み合わせること、ある実施形態における一部の構成を別の実施形態に適用することも可能である。 In the above variants 1 to 7, heat maps based on individual distance images have been described, but feature data (heat maps: e.g., FIG. 17) generated from overall histogram data based on multiple distance images can also be used. In addition, the configurations described in this specification are merely examples, and they can be combined with each other, and some configurations in one embodiment can be applied to another embodiment.

1 混雑率測定システム
2 列車
3 車両
4 連結部
5、5a、5b 車窓
11 撮像手段
12 ライン画像生成手段
13 ヒストグラム生成手段
14 特徴データ取得手段
15 推定手段
16 出力手段
Reference Signs List 1: Congestion rate measurement system 2: Train 3: Car 4: Coupler 5, 5a, 5b: Car window 11: Imaging means 12: Line image generation means 13: Histogram generation means 14: Feature data acquisition means 15: Estimation means 16: Output means

Claims (20)

二次元画像の画素単位で被写体までの距離情報を有する距離画像を取得できる撮像手段であって、列車の進行方向の側方から前記列車の距離画像を撮像する撮像手段と、
前記撮像手段により撮像した前記列車の距離画像を高さ方向に分割して複数のライン画像を生成するライン画像生成手段と、
前記ライン画像生成手段で生成したライン画像から距離を階級としたヒストグラムデータを生成するヒストグラム生成手段と、
前記ヒストグラム生成手段で生成したヒストグラムデータから、高さに関する要素、ヒストグラムの度数に関する要素及び距離に関する要素を含む特徴データを取得する特徴データ取得手段と、
前記特徴データを用いて前記列車の混雑率を推定する推定手段と、
を含む混雑率測定システム。
An imaging means capable of acquiring a distance image having distance information to a subject in pixel units of a two-dimensional image, the imaging means capturing a distance image of the train from a side in the train's traveling direction;
a line image generating means for generating a plurality of line images by dividing the distance image of the train captured by the imaging means in a height direction;
a histogram generating means for generating histogram data with distance as a class from the line image generated by the line image generating means;
a feature data acquisition means for acquiring feature data including a height element, a histogram frequency element, and a distance element from the histogram data generated by the histogram generation means;
an estimation means for estimating a congestion rate of the train using the feature data;
A congestion rate measurement system including:
前記特徴データは、高さに関する要素を一方の軸とし、距離に関する要素を他方の軸とした平面に、度数の要素を各座標に表示した二次元特徴データである請求項1に記載の混雑率測定システム。 The congestion rate measurement system according to claim 1, wherein the feature data is two-dimensional feature data in which the frequency element is displayed at each coordinate on a plane with the height element on one axis and the distance element on the other axis. 前記特徴データ取得手段は、複数の距離画像に基づいて生成された総括ヒストグラムデータから特徴データを生成する請求項1又は2に記載の混雑率測定システム。 The congestion rate measurement system according to claim 1 or 2, wherein the feature data acquisition means generates feature data from overall histogram data generated based on multiple distance images. 前記混雑率測定システムは、前記特徴データを取得する前に、距離画像のフレーム数によって前記総括ヒストグラムデータを正規化する機能を有する請求項3に記載の混雑率測定システム。 The crowding rate measurement system according to claim 3, which has a function of normalizing the overall histogram data by the number of frames of the distance image before acquiring the feature data. 前記混雑率測定システムは、前記特徴データを取得する前に、前記距離画像又は前記ヒストグラムデータに基づいて前記列車の単位判定領域を検出する機能を有する請求項1乃至4の何れか1項に記載の混雑率測定システム。 The congestion rate measurement system according to any one of claims 1 to 4, wherein the congestion rate measurement system has a function of detecting a unit judgment area of the train based on the distance image or the histogram data before acquiring the feature data. 前記ヒストグラム生成手段は、前記距離画像の画素のうち、被写体までの距離が所定の範囲内の画素の距離情報を用いてヒストグラムデータを生成する請求項1乃至5の何れか1項に記載の混雑率測定システム。 The crowding rate measurement system according to any one of claims 1 to 5, wherein the histogram generation means generates histogram data using distance information of pixels of the distance image whose distance to the subject is within a predetermined range. 前記混雑率測定システムは、前記特徴データを取得する前に、前記距離画像における窓の領域を検出する機能を有する請求項1乃至6の何れか1項に記載の混雑率測定システム。 The congestion rate measurement system according to any one of claims 1 to 6, wherein the congestion rate measurement system has a function of detecting a window area in the distance image before acquiring the feature data. 前記ヒストグラム生成手段は、前記距離画像の画素のうち、前記窓の領域内の画素の距離情報を用いてヒストグラムデータを生成し、
前記推定手段は、前記窓の領域内の混雑率を推定する請求項7に記載の混雑率測定システム。
the histogram generating means generates histogram data using distance information of pixels within the window region among the pixels of the distance image;
The congestion rate measuring system according to claim 7 , wherein the estimation means estimates the congestion rate within the window area.
前記推定手段は、前記列車の単位判定領域内に含まれる前記窓の領域内の混雑率を集計して前記列車の単位判定領域の混雑率を推定する請求項8に記載の混雑率測定システム。 The congestion rate measurement system according to claim 8, wherein the estimation means estimates the congestion rate of the unit judgment area of the train by tallying up the congestion rates within the window areas included in the unit judgment area of the train. 前記推定手段は、前記窓の領域の幅、大きさ又は形状により異なる重み付けを行い集計することを特徴とする請求項9に記載の混雑率測定システム。 The congestion rate measurement system according to claim 9, characterized in that the estimation means performs aggregation by weighting differently depending on the width, size or shape of the window area. 前記推定手段は、被写体までの距離が前記列車の中央までの混雑率に所定の倍数を乗じて混雑率を推定する請求項1乃至10の何れか1項に記載の混雑率測定システム。 The congestion rate measurement system according to any one of claims 1 to 10, wherein the estimation means estimates the congestion rate by multiplying the congestion rate at the distance to the subject from the center of the train by a predetermined multiple. 前記推定手段は、前記特徴データにおける度数分布に応じて、混雑率計算におけるパラメータを変更する請求項1乃至11の何れか1項に記載の混雑率測定システム。 The congestion rate measurement system according to any one of claims 1 to 11, wherein the estimation means changes parameters in the congestion rate calculation according to the frequency distribution in the feature data. 前記推定手段は、前記特徴データにおける度数分布を前記列車内の構造物の配置に応じて補正することを特徴とする請求項1乃至12の何れか1項に記載の混雑率測定システム。 The congestion rate measurement system according to any one of claims 1 to 12, characterized in that the estimation means corrects the frequency distribution in the feature data according to the arrangement of structures within the train. 前記混雑率測定システムは、乗客が乗車していない状態の列車に対して撮影した距離画像に基づく特徴データから前記列車内の構造物の配置に関する情報を取得する請求項13に記載の混雑率測定システム。 The congestion rate measurement system according to claim 13, wherein the congestion rate measurement system obtains information about the layout of structures within the train from feature data based on distance images taken of a train with no passengers on board. 前記混雑率測定システムは、前記列車の車両種別を判定し、当該車両種別に応じたパラメータを使用して混雑率を推定する請求項1乃至14の何れか1項に記載の混雑率測定システム。 The congestion rate measurement system according to any one of claims 1 to 14, wherein the congestion rate measurement system determines the train's vehicle type and estimates the congestion rate using parameters corresponding to the train type. 前記推定手段は、前記特徴データを独立変数とし、混雑率を従属変数として学習させた回帰モデルを用いて前記列車の混雑率を推定する請求項1乃至15の何れか1項に記載の混雑率測定システム。 The congestion rate measurement system according to any one of claims 1 to 15, wherein the estimation means estimates the congestion rate of the train using a regression model trained with the feature data as an independent variable and the congestion rate as a dependent variable. 二次元画像の画素単位で被写体までの距離情報を有する距離画像を取得できる撮像手段を用いて、列車の進行方向の側方から撮像することで得られた前記列車の距離画像を取得する画像取得部と、
前記画像取得部で取得した前記列車の距離画像を高さ方向に分割して複数のライン画像を生成するライン画像生成部と、
前記ライン画像生成で生成したライン画像から距離を階級としたヒストグラムデータを生成するヒストグラム生成部と、
前記ヒストグラムデータを出力するデータ出力部と、
を含む混雑率測定システムの処理装置。
an image acquisition unit that acquires a distance image of the train obtained by capturing an image of the train from a side in the traveling direction of the train using an imaging means that can acquire a distance image having distance information to a subject in pixel units of a two-dimensional image;
a line image generating unit that generates a plurality of line images by dividing the distance image of the train acquired by the image acquiring unit in a height direction;
a histogram generating unit for generating histogram data with distance as a class from the line image generated by the line image generating unit ;
a data output unit that outputs the histogram data;
A processing device for a congestion rate measurement system including:
二次元画像の画素単位で被写体までの距離情報を有する距離画像を取得できる撮像手段を用いて、列車の進行方向の側方から撮像することで得られた前記列車の距離画像を高さ方向に分割して生成された複数のライン画像から生成された距離を階級としたヒストグラムデータを取得するデータ取得部と、
前記データ取得部で取得したヒストグラムデータから、高さに関する要素、ヒストグラムの度数に関する要素及び距離に関する要素を含む特徴データを取得する特徴データ取得部と、
前記特徴データを用いて前記列車の混雑率を推定する推定部と、
を含む混雑率測定システムの処理装置。
a data acquisition unit that acquires histogram data with distances as classes generated from a plurality of line images that are generated by dividing a distance image of the train obtained by imaging from the side in the traveling direction of the train using an imaging means that can acquire a distance image having distance information to a subject in pixel units of a two-dimensional image; and
a feature data acquisition unit that acquires feature data including a height element, a histogram frequency element, and a distance element from the histogram data acquired by the data acquisition unit;
an estimation unit that estimates a congestion rate of the train using the feature data;
A processing device for a congestion rate measurement system including:
コンピュータに、
二次元画像の画素単位で被写体までの距離情報を有する距離画像を取得できる撮像手段を用いて、列車の進行方向の側方から撮像することで得られた前記列車の距離画像を取得する画像取得機能と、
前記画像取得機能で取得した前記列車の距離画像を高さ方向に分割して複数のライン画像を生成するライン画像生成機能と、
前記ライン画像生成機能で生成したライン画像から距離を階級としたヒストグラムデータを生成するヒストグラム生成機能と、
前記ヒストグラムデータを出力するデータ出力機能と、
を実現させるプログラム。
On the computer,
an image acquisition function for acquiring a distance image of the train obtained by capturing an image from the side in the direction of travel of the train using an imaging means capable of acquiring a distance image having distance information to a subject in pixel units of a two-dimensional image;
a line image generation function that generates a plurality of line images by dividing the distance image of the train acquired by the image acquisition function in a height direction;
a histogram generating function for generating histogram data with distance as a scale from the line image generated by the line image generating function ;
a data output function for outputting the histogram data;
A program to achieve this.
コンピュータに、
二次元画像の画素単位で被写体までの距離情報を有する距離画像を取得できる撮像手段を用いて、列車の進行方向の側方から撮像することで得られた前記列車の距離画像を高さ方向に分割して生成された複数のライン画像から生成された距離を階級としたヒストグラムデータを取得するデータ取得機能と
記データ取得機能で取得したヒストグラムデータから、高さに関する要素、ヒストグラムの度数に関する要素及び距離に関する要素を含む特徴データを取得する特徴データ取得機能と、
前記特徴データを用いて前記列車の混雑率を推定する推定機能と、
を実現させるプログラム。
On the computer,
a data acquisition function that acquires histogram data with distance hierarchical classes generated from a plurality of line images that are generated by dividing a distance image of the train obtained by imaging the train from the side in the direction of travel using an imaging means that can acquire a distance image having distance information to a subject in pixel units of a two-dimensional image ; and
a feature data acquisition function for acquiring feature data including a height element, a histogram frequency element, and a distance element from the histogram data acquired by the data acquisition function;
an estimation function for estimating a congestion rate of the train using the feature data;
A program to achieve this.
JP2021027001A 2021-02-24 2021-02-24 Congestion rate measurement system and program Active JP7598779B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021027001A JP7598779B2 (en) 2021-02-24 2021-02-24 Congestion rate measurement system and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021027001A JP7598779B2 (en) 2021-02-24 2021-02-24 Congestion rate measurement system and program

Publications (2)

Publication Number Publication Date
JP2022128660A JP2022128660A (en) 2022-09-05
JP7598779B2 true JP7598779B2 (en) 2024-12-12

Family

ID=83150357

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021027001A Active JP7598779B2 (en) 2021-02-24 2021-02-24 Congestion rate measurement system and program

Country Status (1)

Country Link
JP (1) JP7598779B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005014690A (en) 2003-06-24 2005-01-20 Ntt Data Corp Vehicle situation estimation method, vehicle situation estimation support method, vehicle situation estimation apparatus, and vehicle situation estimation system
JP2009057006A (en) 2007-09-03 2009-03-19 Nomura Research Institute Ltd Riding position guidance system and method based on congestion by vehicle
JP2014225220A (en) 2013-02-18 2014-12-04 株式会社リコー Moving surface information detection device, mobile apparatus control system using the same, and moving surface information detection program
JP2020139877A (en) 2019-02-28 2020-09-03 キヤノン株式会社 Information processing equipment, information processing methods and programs

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6662388B2 (en) * 2015-11-27 2020-03-11 株式会社リコー Image processing device, imaging device, device control system, distribution data generation method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005014690A (en) 2003-06-24 2005-01-20 Ntt Data Corp Vehicle situation estimation method, vehicle situation estimation support method, vehicle situation estimation apparatus, and vehicle situation estimation system
JP2009057006A (en) 2007-09-03 2009-03-19 Nomura Research Institute Ltd Riding position guidance system and method based on congestion by vehicle
JP2014225220A (en) 2013-02-18 2014-12-04 株式会社リコー Moving surface information detection device, mobile apparatus control system using the same, and moving surface information detection program
JP2020139877A (en) 2019-02-28 2020-09-03 キヤノン株式会社 Information processing equipment, information processing methods and programs

Also Published As

Publication number Publication date
JP2022128660A (en) 2022-09-05

Similar Documents

Publication Publication Date Title
US11747809B1 (en) System and method for evaluating the perception system of an autonomous vehicle
US11669972B2 (en) Geometry-aware instance segmentation in stereo image capture processes
US20210192225A1 (en) Apparatus for real-time monitoring for construction object and monitoring method and computer program for the same
US8655078B2 (en) Situation determining apparatus, situation determining method, situation determining program, abnormality determining apparatus, abnormality determining method, abnormality determining program, and congestion estimating apparatus
CN112712023A (en) Vehicle type identification method and system and electronic equipment
EP4213128A1 (en) Obstacle detection device, obstacle detection system, and obstacle detection method
KR101030317B1 (en) Apparatus and method for tracking obstacles using stereo vision
CN115187941A (en) Target detection positioning method, system, equipment and storage medium
WO2024018726A1 (en) Program, method, system, road map, and road map creation method
Lu et al. Accurate road user localization in aerial images captured by unmanned aerial vehicles
US20190385010A1 (en) Determining geographical map features with multi-sensor input
CN110490103A (en) Method and device for detecting passenger flow density in rail transit
CN102262733B (en) Laser point detection method and apparatus thereof
JP2017027197A (en) Monitoring program, monitoring device and monitoring method
JP7598779B2 (en) Congestion rate measurement system and program
CN110955243B (en) Travel control method, apparatus, device, readable storage medium, and mobile apparatus
KR20220120211A (en) Drone image analysis system based on deep learning for traffic measurement
US20210348920A1 (en) Object Position Estimation Device and Method Therefor
CN119254941B (en) Virtual reality display system, method, device, equipment and medium
Mohamed et al. Automated Traffic Safety Assessment Tool Utilizing Monocular 3D Convolutional Neural Network Based Detection Algorithm at Signalized Intersections
CN113435224B (en) Method and device for obtaining 3D information of a vehicle
Li et al. Roadside Traffic Surveillance System for Optimal Traffic Control
CN117606500A (en) Deceleration strip detection method, deceleration strip passing method, network training method and related device
JP7305698B2 (en) Vehicle congestion determination method and vehicle congestion determination system
JP7040627B2 (en) Calculator, information processing method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20231207

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240628

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240731

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240807

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20241129

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20241202

R150 Certificate of patent or registration of utility model

Ref document number: 7598779

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150