JP5910252B2 - Imaging setting control system and imaging setting control method - Google Patents

Imaging setting control system and imaging setting control method Download PDF

Info

Publication number
JP5910252B2
JP5910252B2 JP2012083363A JP2012083363A JP5910252B2 JP 5910252 B2 JP5910252 B2 JP 5910252B2 JP 2012083363 A JP2012083363 A JP 2012083363A JP 2012083363 A JP2012083363 A JP 2012083363A JP 5910252 B2 JP5910252 B2 JP 5910252B2
Authority
JP
Japan
Prior art keywords
imaging
focus position
temperature
imaging setting
setting
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
JP2012083363A
Other languages
Japanese (ja)
Other versions
JP2013214839A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2012083363A priority Critical patent/JP5910252B2/en
Publication of JP2013214839A publication Critical patent/JP2013214839A/en
Application granted granted Critical
Publication of JP5910252B2 publication Critical patent/JP5910252B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)

Description

本発明は、撮像装置の撮像設定を制御する技術に関する。   The present invention relates to a technique for controlling imaging settings of an imaging apparatus.

撮像装置に使われるプラスチック製レンズの屈折率は、温度に応じて変化する。よって、温度に応じてデフォーカスが生じることがある。そこで、温度に起因するデフォーカスを防ぐための技術がいくつか提案されている。   The refractive index of the plastic lens used in the imaging device changes according to the temperature. Therefore, defocus may occur depending on the temperature. Thus, several techniques for preventing defocus due to temperature have been proposed.

例えば、あるカメラ装置は、温度変化により生じるフォーカスぼけを、低コストで、かつ、特に遠赤外線の透過率を低下させないで、補正するためのものである。具体的には、カメラケース部内に、レンズ、カメラ本体、制御部が配置される。また、フォーカス駆動用の電動モータとフォーカスリングの位置検出用ポテンショメータがレンズに装着される。さらに、レンズ周辺の温度を検出する温度センサが設置される。これらの構成要素は、制御部に接続される。   For example, a certain camera device is for correcting a focus blur caused by a temperature change at a low cost and without particularly reducing the transmittance of far infrared rays. Specifically, a lens, a camera body, and a control unit are arranged in the camera case unit. Further, an electric motor for driving the focus and a potentiometer for detecting the position of the focus ring are attached to the lens. Furthermore, a temperature sensor for detecting the temperature around the lens is installed. These components are connected to the control unit.

そして、操作器により、カメラを設置した時の周囲温度で、撮影したい場所のフォーカスが設定され、このときの位置検出用ポテンショメータの値と温度センサの値が記憶部に記憶される。演算部は、常時温度センサの値を監視し、ある一定以上の温度変化が生じたとき、温度変化量に対するフォーカスリング位置補正量を計算し、フォーカス駆動用の電動モータを制御する。   Then, the focus of the place to be photographed is set by the operating device at the ambient temperature when the camera is installed, and the value of the position detecting potentiometer and the value of the temperature sensor at this time are stored in the storage unit. The calculation unit constantly monitors the value of the temperature sensor, and when the temperature change exceeds a certain level, calculates the focus ring position correction amount with respect to the temperature change amount, and controls the electric motor for focus driving.

また、温度変化があってもスルー画をピントよく表示できるデジタルカメラも提案されている。具体的には、電源投入後にズームレンズが沈胴位置から繰り出され、初期位置にセットされると同時に、パンフォーカス状態となるように絞りの絞り径がセットされる。続いて、スルー画取り込みと取り込んだスルー画の液晶パネルへの表示が開始される。   In addition, a digital camera that can display a through image with good focus even when the temperature changes has been proposed. Specifically, after the power is turned on, the zoom lens is extended from the retracted position and set to the initial position, and at the same time, the aperture diameter of the aperture is set so that the pan focus state is achieved. Subsequently, the through image capture and the display of the captured through image on the liquid crystal panel are started.

そして、CPU(Central Processing Unit)は、温度センサから出力される温度データをチェックして、各焦点距離における現在の温度を確認する。現在の温度が現状位置での温度範囲を満たさなくなった時、ルックアップテーブルから読み出されたパルス数がレンズ駆動機構のステッピングモータに印加され、ズームレンズのフォーカスレンズが移動される。以上の動作により、ピント位置が修正され、ピントが合ったシャープなスルー画が液晶パネルに表示される。   Then, a CPU (Central Processing Unit) checks temperature data output from the temperature sensor to confirm the current temperature at each focal length. When the current temperature does not satisfy the temperature range at the current position, the number of pulses read from the lookup table is applied to the stepping motor of the lens driving mechanism, and the focus lens of the zoom lens is moved. With the above operation, the focus position is corrected, and a sharp through image in focus is displayed on the liquid crystal panel.

また、目的の距離にある被写体の合焦位置にフォーカスレンズを正確に移動させるための、次のような技術も提案されている。まず、撮影者が撮影予定位置を入力すると、撮影予定位置に対応するレンズ位置が、フォーカスレンズの移動範囲内に基準位置として設定される。そして、基準位置にある被写体の輝度値が検出され、輝度値が閾値以上の場合には、ズームレンズの位置と第1のデータテーブルに基づいて、基準位置を中心に探索範囲が設定される。   In addition, the following technique for accurately moving the focus lens to the in-focus position of the subject at the target distance has been proposed. First, when the photographer inputs a planned shooting position, a lens position corresponding to the planned shooting position is set as a reference position within the movement range of the focus lens. Then, the luminance value of the subject at the reference position is detected, and when the luminance value is equal to or greater than the threshold value, the search range is set around the reference position based on the position of the zoom lens and the first data table.

さらに、フォーカスレンズの周辺温度と第2のデータテーブルを用いて探索範囲の補正が行われ、補正後の探索範囲が設定される。CPUは、補正後の探索範囲の一端から他端までフォーカスレンズを移動させ、AF(autofocus)検出回路でAF評価値を検出しながら合焦位置の探索を行う。補正後の探索範囲内の探索が終了すると、探索によって発見された合焦位置にフォーカスレンズが移動される。   Further, the search range is corrected using the ambient temperature of the focus lens and the second data table, and the corrected search range is set. The CPU moves the focus lens from one end to the other end of the corrected search range, and searches for an in-focus position while detecting an AF evaluation value with an AF (autofocus) detection circuit. When the search within the corrected search range is completed, the focus lens is moved to the in-focus position found by the search.

例えば以上例示したように、温度変化に起因するぼけを防ぐための技術がいくつか提案されている。
一方で、例えば監視システムなど、画像認識処理をともなう各種のシステムが使われている。そして、近年では、撮像装置の画素数の増大にともない、撮像視野に入る範囲が以前よりも広くなってきた。
For example, as exemplified above, several techniques for preventing blur caused by temperature change have been proposed.
On the other hand, various systems with image recognition processing, such as a monitoring system, are used. In recent years, with the increase in the number of pixels of the imaging device, the range that falls within the imaging field of view has become wider than before.

特開2003−131106号公報JP 2003-131106 A 特開2004−287183号公報JP 2004-287183 A 特開2007−94023号公報JP 2007-94023 A

広い範囲が撮像装置により撮像され得る場合、撮像装置と被写体との間の距離も、広範囲にわたり得る。また、撮像装置に含まれるレンズ等の構成部品は、温度変化の影響を受ける。   When a wide range can be imaged by the imaging device, the distance between the imaging device and the subject can also be wide. In addition, components such as a lens included in the imaging apparatus are affected by temperature changes.

よって、撮像装置によって撮像され得る範囲の中で最も撮像装置に近い位置から、撮像装置によって撮像され得る範囲の中で最も撮像装置から遠い位置までの範囲に含まれる任意の位置が、温度によらず必ず被写界深度の範囲内に含まれるとは限らない。温度によっては、撮像装置から遠い位置が被写界深度の範囲から外れるかもしれず、逆に、撮像装置から近い位置が被写界深度の範囲から外れる。   Therefore, an arbitrary position included in the range from the position closest to the imaging device in the range that can be imaged by the imaging device to the position farthest from the imaging device in the range that can be imaged by the imaging device depends on the temperature. Not necessarily within the range of depth of field. Depending on the temperature, a position far from the imaging device may be out of the range of depth of field, and conversely, a position near the imaging device is out of the range of depth of field.

一方で、撮像装置の用途の1つは、表面上に特定文字パターンを有する移動物体を撮像し、撮像により得られた画像を用いて特定文字パターンを認識するようなシステムにおける利用である。移動物体は移動するので、特定文字パターンは、撮像装置と特定文字パターンの距離に応じて、画像内の任意の位置に写る可能性がある。   On the other hand, one use of the imaging apparatus is for use in a system that images a moving object having a specific character pattern on the surface and recognizes the specific character pattern using an image obtained by imaging. Since the moving object moves, the specific character pattern may appear in an arbitrary position in the image according to the distance between the imaging device and the specific character pattern.

よって、撮像された画像内で特定文字パターンが写っている位置によらず、特定文字パターンの認識が成功することが好ましい。換言すれば、特定文字パターンと撮像装置の距離によらず、特定文字パターンの認識が成功することが好ましい。   Therefore, it is preferable that the specific character pattern is successfully recognized regardless of the position where the specific character pattern is captured in the captured image. In other words, it is preferable that the specific character pattern is successfully recognized regardless of the distance between the specific character pattern and the imaging device.

ここで、撮像装置と特定文字パターンの距離が近いほど、特定文字パターンは画像内で大きな領域を占める。換言すれば、撮像装置と特定文字パターンの距離が近いほど、特定文字パターンは高解像度で画像に写る。そして、高解像度の画像と低解像度の画像を比較すれば、高解像度の画像の方が、画像認識が成功する確率が高いと期待される。   Here, the closer the distance between the imaging device and the specific character pattern is, the larger the area of the specific character pattern is in the image. In other words, the closer the distance between the imaging device and the specific character pattern, the higher the resolution of the specific character pattern appears in the image. If a high-resolution image is compared with a low-resolution image, the high-resolution image is expected to have a higher probability of successful image recognition.

よって、ある特定文字パターンが撮像装置から近くにあるために大きく写っている場合と、当該特定文字パターンが撮像装置から遠くにあるために小さく写っている場合とを比べると、前者の場合の方が、当該特定文字パターンの認識が成功する確率が高い。つまり、特定文字パターンの認識は、撮像装置と特定文字パターンの距離が近いほど、温度に起因するデフォーカスに対して頑健(robust)である。   Therefore, comparing the case where a specific character pattern is large because it is close to the imaging device and the case where the specific character pattern is small because it is far from the imaging device, the former case However, the probability of successful recognition of the specific character pattern is high. That is, the recognition of the specific character pattern is more robust against defocus caused by temperature as the distance between the imaging device and the specific character pattern is shorter.

ところが、温度によらずに所望の位置に焦点を合わせるための仕組みだけでは、特定文字パターンと撮像装置との距離が認識成功率に与える影響が考慮されない。
本発明は、1つの側面では、温度にもよらず、特定文字パターンと撮像装置の距離にもよらずに、高い確率で特定文字パターンの認識が成功するような、認識に適した画像を撮像装置に撮像させることを目的とする。
However, the influence of the distance between the specific character pattern and the imaging device on the recognition success rate is not considered only by a mechanism for focusing on a desired position regardless of temperature.
In one aspect, the present invention captures an image suitable for recognition such that the specific character pattern can be recognized with high probability regardless of the temperature and the distance between the specific character pattern and the imaging device. The purpose is to let the device image.

一態様による撮像設定制御システムは、抽出手段と制御手段を備える。
前記抽出手段は、撮像を複数回行って複数の移動物体を撮像する撮像装置により撮像された各撮像画像から、前記移動物体を識別する情報を示す特定文字パターンに対応する特定領域を抽出する。
An imaging setting control system according to an aspect includes an extraction unit and a control unit.
The extraction unit extracts a specific area corresponding to a specific character pattern indicating information for identifying the moving object from each captured image captured by an imaging device that performs imaging a plurality of times and images a plurality of moving objects.

前記制御手段は、前記撮像装置の撮像設定の変更要否を判断し、変更要と判断した場合は、変更した前記撮像設定である変更撮像設定を求め、前記変更撮像設定を前記撮像装置に適用する。前記制御手段による前記判断は、複数の前記撮像画像からそれぞれ抽出された各特定領域についての、当該特定領域に対応する特定文字パターンと前記撮像装置の被写界深度との間の位置関係を反映する第1の評価値、および当該特定領域の大きさを反映する第2の評価値に基づく。前記制御手段による前記判断は、複数の前記撮像画像それぞれの撮像時の温度および撮像設定にも基づく。   The control means determines whether or not the imaging setting of the imaging device needs to be changed. If it is determined that a change is necessary, the control unit obtains a changed imaging setting that is the changed imaging setting and applies the changed imaging setting to the imaging device To do. The determination by the control unit reflects a positional relationship between a specific character pattern corresponding to the specific area and a depth of field of the imaging apparatus for each specific area extracted from the plurality of captured images. Based on the first evaluation value and the second evaluation value reflecting the size of the specific area. The determination by the control unit is also based on the temperature and imaging setting at the time of imaging of each of the plurality of captured images.

上記の撮像設定制御システムによれば、温度にもよらず、特定文字パターンと撮像装置の距離にもよらずに、高い確率で特定文字パターンの認識が成功するような、認識に適した画像を撮像装置に撮像させることができる。   According to the above-described imaging setting control system, an image suitable for recognition that can recognize a specific character pattern with a high probability regardless of the temperature and the distance between the specific character pattern and the imaging device is obtained. The imaging device can capture an image.

特定文字パターンがどの程度画像認識処理に適した状態で画像に写っているのかという適合性を示す指標値について説明する図である。It is a figure explaining the index value which shows the adaptability of how much a specific character pattern is reflected in the image in the state suitable for image recognition processing. 被写界深度に収まる範囲の温度依存性を説明する図である。It is a figure explaining the temperature dependence of the range settled in a depth of field. 焦点距離調整システムのブロック構成図である。It is a block block diagram of a focal distance adjustment system. ハードウェア構成の2つの例を示す図である。It is a figure which shows two examples of a hardware configuration. 各種データの例を示す図である。It is a figure which shows the example of various data. 指標値の算出について説明する図である。It is a figure explaining calculation of an index value. 動的調整処理のフローチャート(その1)である。It is a flowchart (the 1) of a dynamic adjustment process. 動的調整処理のフローチャート(その2)である。It is a flowchart (the 2) of a dynamic adjustment process. フォーカス位置更新処理のフローチャート(その1)である。It is a flowchart (the 1) of a focus position update process. フォーカス位置更新処理のフローチャート(その2)である。It is a flowchart (the 2) of a focus position update process. フォーカス位置更新処理のフローチャート(その3)である。It is a flowchart (the 3) of a focus position update process. フォーカス位置更新処理のフローチャート(その4)である。It is a flowchart (the 4) of a focus position update process. フォーカス位置更新処理のフローチャート(その5)である。It is a flowchart (the 5) of a focus position update process. 動作例の説明図である。It is explanatory drawing of an operation example.

以下、実施形態について、図面を参照しながら詳細に説明する。
具体的には、まず図1を参照して本実施形態で使われる指標値(index)について説明する。詳しくは後述するとおり、指標値は、撮像設定(具体的には、撮像装置に設定する焦点距離)の調整のために使われる。また、焦点距離の調整は、温度変化や撮像装置の経時変化に対する画像認識の頑健性を高めるために行われる。そこで、次に図2を参照して温度変化の影響について説明する。
Hereinafter, embodiments will be described in detail with reference to the drawings.
Specifically, first, an index value (index) used in the present embodiment will be described with reference to FIG. As will be described in detail later, the index value is used for adjusting the imaging setting (specifically, the focal length set in the imaging apparatus). In addition, the adjustment of the focal length is performed in order to improve robustness of image recognition with respect to a change in temperature or a change with time of the imaging apparatus. Therefore, the effect of temperature change will be described next with reference to FIG.

その後、図3と4を参照して本実施形態のシステムの構成を説明する。さらに、図5を参照して本実施形態で処理に使われる各種データについて説明する。
さらに、図6〜14を参照して、本実施形態で行われる処理についてより具体的に説明する。最後に、いくつかの変形例についても説明する。
Thereafter, the system configuration of the present embodiment will be described with reference to FIGS. Furthermore, various data used for processing in this embodiment will be described with reference to FIG.
Furthermore, with reference to FIGS. 6-14, the process performed by this embodiment is demonstrated more concretely. Finally, some modifications will be described.

図1は、本実施形態で使われる指標値について説明する図である。ある種の移動物体(例えば自動車など)の表面上には、複数の文字が所定の規則にしたがって配置されたパターン(以下、説明の便宜上「特定文字パターン」という)がある。特定文字パターンは、移動物体を識別する情報を示す。例えば、ナンバプレートは特定文字パターンの具体例である。そして、本実施形態で使われる指標値は、「特定文字パターンがどの程度画像認識処理に適した状態で画像に写っているのか」という適合度を示す。   FIG. 1 is a diagram for explaining index values used in the present embodiment. There is a pattern (hereinafter, referred to as “specific character pattern” for convenience of description) in which a plurality of characters are arranged according to a predetermined rule on the surface of a certain moving object (for example, an automobile). The specific character pattern indicates information for identifying the moving object. For example, the number plate is a specific example of a specific character pattern. The index value used in the present embodiment indicates the degree of suitability “how much the specific character pattern is reflected in the image in a state suitable for the image recognition process”.

特定文字パターンは、例えば、移動物体を監視するためのある種の監視システム中の撮像装置により、撮像されてもよい。監視システムは、画像認識処理を実行し、その結果、画像に写った1つまたは複数の特定文字パターンを認識する。指標値が示す上記適合度は、換言すれば、特定文字パターンの認識容易性(recognizability)である。   The specific character pattern may be imaged by, for example, an imaging device in a certain type of monitoring system for monitoring a moving object. The monitoring system executes an image recognition process, and as a result, recognizes one or more specific character patterns appearing in the image. In other words, the adaptability indicated by the index value is the recognizability of the specific character pattern.

本実施形態の撮像装置は、焦点距離が変更可能なタイプの撮像装置である。撮像装置は、例えばズームレンズやフォーカスレンズなどの複数のレンズを有する。撮像装置は、設定された焦点距離にしたがってレンズを光軸に沿って動かすことで、合焦位置を変更する。   The imaging device of this embodiment is a type of imaging device whose focal length can be changed. The imaging device has a plurality of lenses such as a zoom lens and a focus lens. The imaging apparatus changes the in-focus position by moving the lens along the optical axis according to the set focal length.

詳しくは後述するとおり、本実施形態では、撮像装置に設定する焦点距離が、指標値に基づいて、焦点距離調整システムにより調整される(なお、焦点距離調整システムの詳細は図3とともに後述する)。焦点距離は撮像設定の例であり、焦点距離調整システムは撮像設定制御システムの例である。   As will be described in detail later, in the present embodiment, the focal length set in the imaging apparatus is adjusted by the focal length adjustment system based on the index value (details of the focal length adjustment system will be described later with reference to FIG. 3). . The focal length is an example of an imaging setting, and the focal length adjustment system is an example of an imaging setting control system.

指標値は、1枚の画像内に写った1つ以上の特定文字パターンそれぞれについて、焦点距離調整システムにより算出される。1つの特定文字パターンについての指標値は、「所定のアルゴリズム(例えば所定のパターンマッチングアルゴリズム)にしたがって行われる画像認識処理にどの程度適した状態で、当該特定文字パターンが画像に写っているのか」ということを示す。図1は、以上のような指標値について説明する図である。   The index value is calculated by the focal length adjustment system for each of one or more specific character patterns appearing in one image. The index value for one specific character pattern is “how appropriate is the image for the image recognition process performed according to a predetermined algorithm (for example, a predetermined pattern matching algorithm), and the specific character pattern appears in the image”. It shows that. FIG. 1 is a diagram illustrating the index values as described above.

図1に示す画像100、110、および120は、カメラなどの撮像装置により撮像される画像の例である。例えば、撮像装置は、30fps(frames per second)などの決められたフレームレートで撮像を行う装置であってもよい。その場合、画像100、110、および120の各々は、1枚のフレーム画像である。   Images 100, 110, and 120 illustrated in FIG. 1 are examples of images captured by an imaging device such as a camera. For example, the imaging device may be a device that performs imaging at a determined frame rate such as 30 fps (frames per second). In that case, each of the images 100, 110, and 120 is one frame image.

撮像視野が比較的広い場合、撮像装置により撮像された画像には、複数の移動物体それぞれの特定文字パターンが写ることがある。例えば、撮像装置から見た奥行き方向に沿って(例えば道路の1車線に沿って)、2つ以上の移動物体が並んでいることもあり得る。また、2つ以上の移動物体が、撮像装置から見た幅方向において互いに異なる位置(例えば互いに異なる車線)に存在することもあり得る。   When the imaging field of view is relatively wide, the specific character pattern of each of the plurality of moving objects may be reflected in the image captured by the imaging device. For example, two or more moving objects may be arranged along the depth direction viewed from the imaging device (for example, along one lane of a road). In addition, two or more moving objects may exist at different positions (for example, different lanes) in the width direction viewed from the imaging device.

以下では説明の便宜上、撮像装置が撮像した画像において特定文字パターンが写っている領域を「特定領域」という。また、撮像装置が撮像した画像から、1つの特定領域を抽出することによって得られる画像を、「特定領域画像」という。後述するように、特定領域画像は、拡大または縮小されることもあるが、文脈から明らかな場合には、拡大または縮小された特定領域画像も、単に「特定領域画像」ということがある。   Hereinafter, for convenience of description, an area in which a specific character pattern is captured in an image captured by the imaging apparatus is referred to as a “specific area”. An image obtained by extracting one specific area from an image captured by the imaging apparatus is referred to as a “specific area image”. As will be described later, the specific area image may be enlarged or reduced, but the enlarged or reduced specific area image may be simply referred to as a “specific area image” if it is apparent from the context.

さて、画像100には、具体的には3つの特定文字パターンが写っている。つまり、画像100は、3つの特定領域101〜103を含む。それに対して、画像110は1つの特定領域111のみを含み、画像120は1つの特定領域121のみを含む。   Now, specifically, the image 100 includes three specific character patterns. That is, the image 100 includes three specific areas 101 to 103. In contrast, the image 110 includes only one specific area 111, and the image 120 includes only one specific area 121.

ところで、以下では説明の便宜上、撮像装置により撮像された画像(例えば画像100、110、および120など)における水平方向および垂直方向それぞれの座標軸を、「h軸」および「v軸」とする。紙幅の都合上、図1では画像100にのみh軸とv軸が示されている。   By the way, hereinafter, for convenience of explanation, the coordinate axes in the horizontal direction and the vertical direction in an image (for example, the images 100, 110, and 120) captured by the imaging device are referred to as “h-axis” and “v-axis”. For convenience of the paper width, the h axis and the v axis are shown only in the image 100 in FIG.

また、以下では説明の簡単化のため、撮像装置の設置位置と設置角は固定されているものとする。例えば、撮像装置は、ある方向に沿って移動する移動物体を、斜め上方から見下ろすように設置されていてもよい。   In the following description, it is assumed that the installation position and the installation angle of the imaging device are fixed for simplification of description. For example, the imaging apparatus may be installed so that a moving object that moves along a certain direction is looked down obliquely from above.

以下では説明の便宜上、移動物体が移動する方向に平行な座標軸(すなわち、撮像装置により撮像された画像内ではなく、物理空間内での座標軸)を「x軸」とする。参照の便宜のため、図1には、x軸の方向が画像100中のどの方向に見えるのかを示す矢印も示してある。   Hereinafter, for convenience of explanation, a coordinate axis parallel to a moving direction of the moving object (that is, a coordinate axis in the physical space, not in an image captured by the imaging device) is referred to as an “x axis”. For convenience of reference, FIG. 1 also shows an arrow indicating which direction in the image 100 the x-axis direction is visible.

図1におけるx軸の矢印の向きは、「撮像装置から見て手前側(near side)から奥側(far side)へ向かう方向が、x軸の正の方向である」ということを示す。各移動物体は、ほぼx軸に沿って、x軸の負の方向へ向かって(つまり奥側から手前側へ)移動するものとする。   The direction of the arrow on the x axis in FIG. 1 indicates that “the direction from the near side to the far side when viewed from the imaging device is the positive direction of the x axis”. Each moving object moves along the x-axis in the negative direction of the x-axis (that is, from the back side to the near side).

なお、図1においてx軸に対応する矢印は、V軸とほぼ平行に描かれている。しかし、実施形態によっては、x軸に対応する矢印の方向が画像100における斜めの方向になるような角度で、撮像装置が設置されていてもよい。   In FIG. 1, the arrow corresponding to the x axis is drawn substantially parallel to the V axis. However, depending on the embodiment, the imaging device may be installed at an angle such that the direction of the arrow corresponding to the x-axis is an oblique direction in the image 100.

画像100、110、および120などの画像は、パターンマッチングなどの画像認識処理により移動物体上の特定文字パターンを認識するために撮像される。したがって、画像認識処理に適した画像を撮像することができるように、撮像装置に適切な焦点距離が設定されることが望ましい。   Images such as the images 100, 110, and 120 are captured in order to recognize a specific character pattern on a moving object by image recognition processing such as pattern matching. Therefore, it is desirable to set an appropriate focal length in the imaging device so that an image suitable for the image recognition process can be taken.

ここで、被写体である移動物体は、場合によっては非常に高速に(例えば時速100km程度で)移動することがあり得る。そのため、各フレーム画像の撮像のたびにオートフォーカス機能によって焦点距離を設定することは難しい。   Here, in some cases, the moving object that is the subject may move at a very high speed (for example, at a speed of about 100 km / h). Therefore, it is difficult to set the focal length by the autofocus function every time each frame image is captured.

しかし、「固定的に焦点距離を撮像装置に設定する」という運用法(例えば、最初に撮像装置が設置されるときに、一度だけ焦点距離が調整されるような運用法)は好ましくない。なぜなら、何らかの原因により合焦位置が変化することがあるからである。   However, an operation method of “fixing the focal length in the imaging device” (for example, an operation method in which the focal length is adjusted only once when the imaging device is first installed) is not preferable. This is because the in-focus position may change for some reason.

したがって、撮像装置に設定する焦点距離を、動的かつ自動的に調整する技術がもしあれば、安定的に高い認識成功率を達成することができ、有益である。本実施形態は、そのような技術を提供することを1つの目的とする。   Therefore, if there is a technique for dynamically and automatically adjusting the focal length set in the imaging apparatus, it is possible to stably achieve a high recognition success rate, which is beneficial. One object of the present embodiment is to provide such a technique.

そして、本実施形態では、焦点距離の適切な調整を実現するため、上記指標値が使われる。以下では、合焦位置が変化する要因と、画像認識処理による認識容易性と、本実施形態の指標値について、順に詳しく説明する。   In the present embodiment, the index value is used to realize appropriate adjustment of the focal length. Hereinafter, the factors that change the in-focus position, the ease of recognition by the image recognition process, and the index value of the present embodiment will be described in detail.

撮像装置の部品(プラスチックレンズなど)は、温度の影響を受けて膨張したり収縮したりする。そのため、ある温度のときに、ある所望の位置(例えば画像の中心付近に写るような位置)で合焦するよう、撮像装置に焦点距離が設定されたとしても、別の温度のときには、実際の焦点が上記所望の位置からずれる可能性がある。   The components (such as plastic lenses) of the imaging device expand or contract under the influence of temperature. Therefore, even if the focal length is set in the imaging device so that it is focused at a certain desired position (for example, a position near the center of the image) at a certain temperature, There is a possibility that the focal point deviates from the desired position.

また、たとえ温度が変化しなくても、レンズを駆動する機械部品(例えばギアやモータなど)の経年劣化(degradation over time)や、レンズの位置を検出するポテンショメータの抵抗値の経時変化などが起こり得る。すると、ある決められた値に焦点距離が設定されていたとして、かつ、温度が変化しないとしても、時間の経過とともに、実際の合焦位置は変化する可能性がある。   In addition, even if the temperature does not change, degradation of the mechanical parts (such as gears and motors) that drive the lens, and changes in the resistance value of the potentiometer that detects the position of the lens over time occur. obtain. Then, even if the focal length is set to a predetermined value and the temperature does not change, the actual in-focus position may change over time.

以上のように、合焦位置が何らかの原因で変化することがあり得る。つまり、何らかの原因でデフォーカスが生じ得る。すると、撮像装置の被写界深度によっては、ピントが合っていない部分を含む画像が撮像されることもあり得る。   As described above, the focus position may change for some reason. That is, defocus can occur for some reason. Then, depending on the depth of field of the imaging device, an image including a portion out of focus may be captured.

ここで、特定文字パターンに撮像装置のピントが合っているほど、特定文字パターンの認識は成功しやすい。換言すれば、特定文字パターンが鮮明に画像に写っているほど、認識成功率は高い。つまり、特定領域における鮮鋭度(sharpness)が高いほど、認識成功率が高い。   Here, the more the image pickup apparatus is focused on the specific character pattern, the more easily the specific character pattern is recognized. In other words, the clearer the specific character pattern is in the image, the higher the recognition success rate. That is, the higher the sharpness in a specific area, the higher the recognition success rate.

鮮鋭度は、具体的にはエッジ強度により表されてもよい。特定領域における鮮鋭度は、特定領域に対応する特定文字パターンと、撮像装置の被写界深度との間の位置関係を反映する1種の評価値である。具体的には、特定文字パターンが被写界深度の範囲から外れた位置にあれば鮮鋭度は低く、特定文字パターンが被写界深度内の位置にあれば鮮鋭度は高い。また、特定文字パターンが被写界深度の端に近い位置にあるときよりも、特定文字パターンが合焦位置にあるときの方が、鮮鋭度はやや高い。なお、上記位置関係は画像内ではなく物理空間内での関係だが、特定領域における鮮鋭度は、物理空間内の特定文字パターンの位置を使わずとも、撮像された画像から算出可能である。   Specifically, the sharpness may be represented by edge strength. The sharpness in the specific area is a kind of evaluation value that reflects the positional relationship between the specific character pattern corresponding to the specific area and the depth of field of the imaging device. Specifically, the sharpness is low when the specific character pattern is outside the depth of field range, and the sharpness is high when the specific character pattern is within the depth of field. In addition, the sharpness is slightly higher when the specific character pattern is at the in-focus position than when the specific character pattern is near the end of the depth of field. Although the positional relationship is a relationship in the physical space, not in the image, the sharpness in the specific area can be calculated from the captured image without using the position of the specific character pattern in the physical space.

一方で、画像認識が成功するか否かは、特定領域における鮮鋭度以外の要因にも左右される。具体的には、各特定領域の大きさ(換言すれば、画像に写った各特定文字パターンの解像度)が成功率に影響する。特定領域が大きいほど(つまり解像度が高いほど)、認識成功率も高い。   On the other hand, whether or not the image recognition succeeds depends on factors other than the sharpness in the specific area. Specifically, the size of each specific area (in other words, the resolution of each specific character pattern in the image) affects the success rate. The larger the specific area (that is, the higher the resolution), the higher the recognition success rate.

ここで、被写体が撮像装置に近づくほど、当該被写体は画像に大きく写る。また、本実施形態では、複数の異なる移動物体それぞれの特定文字パターンの物理的な大きさは、同じである。   Here, the closer the subject is to the imaging apparatus, the larger the subject is in the image. Moreover, in this embodiment, the physical size of the specific character pattern of each of a plurality of different moving objects is the same.

よって、画像100の例では、3つの特定文字パターンの中で撮像装置に最も近い特定文字パターンが写った特定領域101が、3つの特定領域101〜103の中で最も大きい。また、3つの特定文字パターンの中で2番目に撮像装置の近い特定文字パターンが写った特定領域102は、3つの特定領域101〜103の中で2番目に大きい。そして、3つの特定文字パターンの中で撮像装置から最も遠い特定文字パターンが写った特定領域103が、3つの特定領域101〜103の中で最も小さい。   Therefore, in the example of the image 100, the specific area 101 in which the specific character pattern closest to the imaging device is captured among the three specific character patterns is the largest among the three specific areas 101 to 103. In addition, the specific area 102 in which the second specific character pattern closest to the imaging device is captured among the three specific character patterns is the second largest among the three specific areas 101 to 103. Then, the specific area 103 in which the specific character pattern farthest from the imaging device among the three specific character patterns is reflected is the smallest among the three specific areas 101 to 103.

また、ある1つの移動物体の特定文字パターンが、移動物体の移動につれて、あるフレーム画像では小さく写り、その後に撮像された別のフレーム画像では大きく写ることがある。例えば、画像110中の小さな特定領域111に写っている特定文字パターンは、移動物体が撮像装置に近づくのにつれて、画像110よりも後に撮像された画像120においては、大きな特定領域121に写っている。   In addition, as the moving object moves, a specific character pattern of one moving object may appear smaller in one frame image and appear larger in another frame image captured thereafter. For example, the specific character pattern reflected in the small specific area 111 in the image 110 is reflected in the large specific area 121 in the image 120 captured after the image 110 as the moving object approaches the imaging device. .

以上のように、特定領域の大きさは、特定文字パターンと撮像装置の距離に応じて異なる。したがって、特定文字パターンの認識成功率は、間接的には、特定文字パターンと撮像装置の距離の影響を受ける。   As described above, the size of the specific area varies depending on the distance between the specific character pattern and the imaging device. Therefore, the recognition success rate of the specific character pattern is indirectly influenced by the distance between the specific character pattern and the imaging device.

本実施形態の指標値は、以上説明したように鮮鋭度と距離の双方に依存する認識容易性を示す。以下、具体的な特定領域画像131〜134を参照しながら、指標値についてさらに詳しく説明する。   As described above, the index value of the present embodiment indicates the ease of recognition depending on both the sharpness and the distance. Hereinafter, the index value will be described in more detail with reference to specific specific region images 131 to 134.

特定領域画像131は、特定文字パターンが撮像装置の比較的近くにあり、かつ、特定文字パターンが被写界深度内にあるときに撮像された画像から抽出される特定領域画像の例である。よって、特定領域画像131は比較的大きく、かつ、特定領域画像131には各文字がくっきりと写っている。   The specific area image 131 is an example of a specific area image extracted from an image captured when the specific character pattern is relatively close to the imaging device and the specific character pattern is within the depth of field. Therefore, the specific area image 131 is relatively large, and each character is clearly shown in the specific area image 131.

特定領域画像132は、特定文字パターンが撮像装置から比較的遠くにあり、かつ、特定文字パターンが被写界深度内にあるときに撮像された画像から抽出される特定領域画像の例である。よって、特定領域画像132は比較的小さく、かつ、特定領域画像132には各文字がくっきりと写っている。   The specific area image 132 is an example of a specific area image extracted from an image captured when the specific character pattern is relatively far from the imaging device and the specific character pattern is within the depth of field. Therefore, the specific area image 132 is relatively small, and each character is clearly shown in the specific area image 132.

特定領域画像133は、特定文字パターンが撮像装置の比較的近くにあり、かつ、特定文字パターンが被写界深度から外れているときに撮像された画像から抽出される特定領域画像の例である。よって、特定領域画像133は比較的大きく、かつ、特定領域画像133では各文字がぼやけて写っている。   The specific area image 133 is an example of a specific area image extracted from an image captured when the specific character pattern is relatively close to the imaging apparatus and the specific character pattern is out of the depth of field. . Therefore, the specific area image 133 is relatively large, and each character is blurred in the specific area image 133.

特定領域画像134は、特定文字パターンが撮像装置から比較的遠くにあり、かつ、特定文字パターンが被写界深度から外れているときに撮像された画像から抽出される特定領域画像の例である。よって、特定領域画像134は比較的小さく、かつ特定領域画像134では各文字がぼやけて写っている。   The specific area image 134 is an example of a specific area image extracted from an image captured when the specific character pattern is relatively far from the imaging apparatus and the specific character pattern is out of the depth of field. . Therefore, the specific area image 134 is relatively small, and each character is blurred in the specific area image 134.

特定領域画像131と132の比較から理解されるように、また、特定領域画像133と134の比較からも理解されるように、撮像装置と特定文字パターンの距離が短いほど、撮像装置により撮像された画像中の特定文字パターンの解像度も高い。そして、特定領域画像131と133の比較から理解されるように、また、特定領域画像132と134の比較からも理解されるように、特定文字パターンにおける合焦の程度が良いほど、特定文字パターンの写った特定領域におけるエッジ強度も強い。エッジ強度が強いことは、換言すれば、鮮鋭度が高いことを意味する。   As understood from the comparison between the specific area images 131 and 132 and as understood from the comparison between the specific area images 133 and 134, the shorter the distance between the imaging device and the specific character pattern, the more the image is captured by the imaging apparatus. The resolution of specific character patterns in images is also high. As understood from the comparison between the specific area images 131 and 133, and as understood from the comparison between the specific area images 132 and 134, the specific character pattern increases as the degree of focusing in the specific character pattern increases. The edge strength in the specific area where the image is shown is also strong. In other words, the high edge strength means that the sharpness is high.

例えば、撮像装置の視野全体が撮像装置の被写界深度に収まっていれば、特定文字パターンが画像内のどこに写っていようとも、特定領域画像131や132のように鮮明な特定領域画像が得られる。   For example, if the entire field of view of the imaging device is within the depth of field of the imaging device, a clear specific area image such as the specific area image 131 or 132 can be obtained no matter where the specific character pattern appears in the image. It is done.

しかし、撮像装置の視野の一部分が被写界深度の範囲外にあれば、当該部分に位置する特定文字パターンは、例えば特定領域画像133や134に示すように、ぼやけて画像に写る。より具体的には、特定領域画像133は、撮像装置に近いある範囲が被写界深度から外れてしまった場合に撮像された画像から抽出される特定領域画像の例である。また、特定領域画像134は、撮像装置から遠くのある範囲が被写界深度から外れてしまった場合に撮像された画像から抽出される特定領域画像の例である。   However, if a part of the field of view of the imaging device is outside the range of the depth of field, the specific character pattern located in the part is blurred and appears in the image as shown in the specific area images 133 and 134, for example. More specifically, the specific area image 133 is an example of a specific area image extracted from an image captured when a certain range close to the imaging device has deviated from the depth of field. Further, the specific area image 134 is an example of a specific area image extracted from an image captured when a certain range far from the imaging device has deviated from the depth of field.

ところで、本実施形態における画像認識処理は、具体的には、テンプレート画像を用いたパターンマッチング処理である。パターンマッチングの前処理として、本実施形態では、特定領域画像が基準サイズに拡大または縮小される。そして、以下の(1a)と(1b)の画像を用いたパターンマッチングが行われる。   Incidentally, the image recognition process in the present embodiment is specifically a pattern matching process using a template image. As preprocessing for pattern matching, in this embodiment, the specific area image is enlarged or reduced to the reference size. Then, pattern matching using the following images (1a) and (1b) is performed.

(1a)サイズ変更後の特定領域画像。
(1b)特定文字パターンに含まれる可能性のある各文字を、特定文字パターン全体が基準サイズに写る場合のスケールで示すテンプレート画像。
(1a) Specific area image after size change.
(1b) A template image showing each character that may be included in the specific character pattern on a scale when the entire specific character pattern appears in the reference size.

特定文字パターンは、上記のとおり、複数の文字が所定の規則にしたがって配置されたパターンである。例えば、所定の規則により、以下の(2a)〜(2d)のように決められていてもよい。   As described above, the specific character pattern is a pattern in which a plurality of characters are arranged according to a predetermined rule. For example, the following (2a) to (2d) may be determined according to a predetermined rule.

(2a)ひらがなまたは漢字で記載された、地名を表す文字列(ある観点から見れば、所定の複数の地名の表記に使われ得る文字の集合に含まれる文字を並べてできる、長さ1以上の文字列)が、左上に配置される。
(2b)「数字」という所定の文字集合に含まれる文字を1〜3個並べてできる文字列が、右上に配置される。
(2c)「ひらがな」という所定の文字集合に含まれるいずれか1文字が、左下に配置される。
(2d)「数字」という所定の文字集合に含まれる文字を1〜4個並べてできる文字列(ただし長さが4のときは2文字目と3文字目の間にハイフンを含む)が、右下に配置される。
(2a) A character string representing a place name written in hiragana or kanji (from a certain point of view, it can be arranged with characters included in a set of characters that can be used to represent a plurality of place names, and has a length of 1 or more Character string) is arranged at the upper left.
(2b) A character string formed by arranging 1 to 3 characters included in a predetermined character set “number” is arranged on the upper right.
(2c) Any one character included in the predetermined character set “Hiragana” is arranged in the lower left.
(2d) A character string formed by arranging 1 to 4 characters included in a predetermined character set called “number” (however, when the length is 4, a hyphen is included between the second and third characters) Arranged below.

所定の規則は、「どのような文字集合に含まれる文字が使われるのか」、「どこに各文字が配置されるのか」、ということだけでなく、各文字の大きさや書体などをさらに規定していてもよい。所定の規則による特定文字パターンの定義に応じて、適宜のテンプレート画像が使われる。   Predetermined rules further define not only “what character sets are used in characters” and “where each character is placed”, but also the size and typeface of each character. May be. An appropriate template image is used according to the definition of the specific character pattern according to a predetermined rule.

本実施形態では、パターンマッチングの結果として、1種の評価値が得られる。以下では説明の便宜上、当該評価値を「文字類似判定度」という。また、説明の簡単化のため、文字類似判定度の数値が大きいほど、文字類似判定度は高評価を示すものとする。   In the present embodiment, one type of evaluation value is obtained as a result of pattern matching. Hereinafter, for convenience of explanation, the evaluation value is referred to as “character similarity determination degree”. In addition, for simplicity of explanation, it is assumed that the character similarity determination degree indicates higher evaluation as the numerical value of the character similarity determination degree is larger.

具体的には、特定領域内の1つ以上の所定の部分それぞれが、所定の文字集合中のいずれかの文字の形状と一致する確度が高いほど、文字類似判定度は高評価を示す。説明の便宜上、確度がパーセンテージで表されるとすると、例えば右上に「300」という長さ3の文字列を含む特定文字パターンに関して、画像認識処理の結果として、例えば以下の(3a)〜(3d)のような確度が計算される。   Specifically, the higher the probability that each of the one or more predetermined portions in the specific area matches the shape of any character in the predetermined character set, the higher the character similarity determination degree. For the convenience of explanation, assuming that the accuracy is expressed as a percentage, for example, the following (3a) to (3d) are obtained as a result of the image recognition processing for a specific character pattern including a character string of length 3 “300” on the upper right. ) Is calculated.

(3a)当該文字列の1番左の文字が「3」という数字と一致する確度は95%である。
(3b)当該文字列の1番左の文字が「8」という数字と一致する確度は20%である。
(3c)当該文字列の1番左の文字が「6」という数字と一致する確度は10%である。
(3d)当該文字列の1番左の文字が他の数字と一致する確度はいずれも10%未満である。
(3a) The probability that the leftmost character of the character string matches the number “3” is 95%.
(3b) The probability that the leftmost character of the character string matches the number “8” is 20%.
(3c) The probability that the leftmost character of the character string matches the number “6” is 10%.
(3d) The probability that the leftmost character of the character string matches another number is less than 10%.

例えば以上のように確度が計算された場合、最も高い確度(すなわち95%)が、当該文字列の1番左の文字に関する確度として後の計算に使われてもよい。例えば、文字列に含まれる各文字について上記のようにして得られた確度に基づいて、文字類似判定度が計算されてもよい。ある観点から見れば、確度は、パターンマッチングにおけるテンプレート画像と、基準サイズに拡大または縮小された特定領域画像内の文字の部分の合致率である。   For example, when the accuracy is calculated as described above, the highest accuracy (that is, 95%) may be used in the subsequent calculation as the accuracy regarding the leftmost character of the character string. For example, the character similarity determination degree may be calculated based on the accuracy obtained as described above for each character included in the character string. From a certain point of view, the accuracy is the matching rate between the template image in pattern matching and the character portion in the specific area image enlarged or reduced to the reference size.

実施形態に応じて、特定文字パターン全体に対して、1つの値が文字類似判定度として計算されてもよい。あるいは、特定文字パターンに含まれる複数の部分パターンのそれぞれに対して、文字類似判定度が計算されてもよい。例えば、特定文字パターン中の右上に位置する長さ1〜3の文字列の部分が、1つの部分パターンであってもよい。文字類似判定度が、特定文字パターン全体と各部分パターンのどちらに対して計算されるにせよ、「特定領域内の1つ以上の所定の部分それぞれが、所定の文字集合中のいずれかの文字の形状と一致する確度が高いほど、文字類似判定度が高評価を示す」という点は変わらない。   Depending on the embodiment, one value may be calculated as the character similarity determination degree for the entire specific character pattern. Alternatively, the character similarity determination degree may be calculated for each of a plurality of partial patterns included in the specific character pattern. For example, the portion of the character string having a length of 1 to 3 located at the upper right in the specific character pattern may be one partial pattern. Regardless of whether the character similarity determination degree is calculated for the entire specific character pattern or each partial pattern, “one or more predetermined portions in the specific region are any character in the predetermined character set. The higher the probability of matching with the shape of the character, the higher the character similarity determination degree is. "

さて、以上説明したような文字類似判定度は、パターンマッチングの結果として得られるが、上述したとおり本実施形態では、基準サイズに拡大または縮小された特定領域画像に対してパターンマッチングが行われる。   The character similarity determination degree as described above is obtained as a result of pattern matching. As described above, in this embodiment, pattern matching is performed on a specific area image enlarged or reduced to the reference size.

そのため、サイズが変更される前の元の特定領域画像のサイズが、文字類似判定度に影響する。換言すれば、文字類似判定度は、元の特定領域画像のサイズ(具体的には、元の特定領域画像に含まれる画素数)を反映している。   For this reason, the size of the original specific area image before the size is changed affects the character similarity determination degree. In other words, the character similarity determination degree reflects the size of the original specific area image (specifically, the number of pixels included in the original specific area image).

例えば、大きな特定領域画像133は、基準サイズにまで縮小される。そして、縮小により得られた基準サイズ画像141が、パターンマッチングに使われる。
逆に、小さな特定領域画像134は、基準サイズにまで拡大される。そして、拡大により得られた基準サイズ画像142が、パターンマッチングに使われる。
For example, the large specific area image 133 is reduced to the reference size. Then, the reference size image 141 obtained by the reduction is used for pattern matching.
Conversely, the small specific area image 134 is enlarged to the reference size. The reference size image 142 obtained by enlargement is used for pattern matching.

ここで、特定領域画像133におけるエッジ強度と、特定領域画像134におけるエッジ強度は、ほぼ同程度であるが、縮小により得られた基準サイズ画像141と、拡大により得られた基準サイズ画像142を比較すると、図1に示すとおり、基準サイズ画像142の方が、基準サイズ画像141よりもぼやけている。   Here, the edge intensity in the specific area image 133 and the edge intensity in the specific area image 134 are approximately the same, but the reference size image 141 obtained by the reduction and the reference size image 142 obtained by the enlargement are compared. Then, as shown in FIG. 1, the reference size image 142 is more blurred than the reference size image 141.

つまり、特定領域画像134におけるぼけが拡大されるため、基準サイズ画像142は不鮮明である。一方、特定領域画像133におけるぼけの影響は、縮小された基準サイズ画像141では低減される。   That is, since the blur in the specific area image 134 is enlarged, the reference size image 142 is unclear. On the other hand, the influence of the blur in the specific area image 133 is reduced in the reduced reference size image 141.

したがって、基準サイズ画像141のエッジ強度の方が、基準サイズ画像142のエッジ強度よりも強い。そのため、基準サイズ画像141の文字類似判定度の方が、基準サイズ画像142の文字類似判定度よりも高い。   Therefore, the edge strength of the reference size image 141 is stronger than the edge strength of the reference size image 142. Therefore, the character similarity determination degree of the reference size image 141 is higher than the character similarity determination degree of the reference size image 142.

つまり、基準サイズ画像141の文字類似判定度は、元の大きな特定領域画像133のサイズを反映しており、高い。それに対し、基準サイズ画像142の文字類似判定度は、元の小さな特定領域画像134のサイズを反映しており、低い。   That is, the character similarity determination degree of the reference size image 141 reflects the size of the original large specific area image 133 and is high. On the other hand, the character similarity determination degree of the reference size image 142 reflects the size of the original small specific area image 134 and is low.

別の観点から換言すれば、ある同じレベルの文字類似判定度が得られるような複数の場合同士を比較してみると、「サイズ変更前の元の特定領域画像が大きいほど、元の特定領域画像におけるエッジ強度が低い」という傾向がある。つまり、認識成功と見なせるような比較的高レベルの文字類似判定度が得られるからといって、必ずしも特定文字パターンが被写界深度の範囲内にあるとは限らない。そして、特定文字パターンが被写界深度の範囲外にある場合、当該特定文字パターンが被写界深度の範囲内に収まるように適宜焦点距離を調整することができれば、一層高いレベルの文字類似判定度が得られる(すなわち、認識の正確性が高まる)と期待される。つまり、あるレベル以上の文字類似判定度が得られるとしても、「特定文字パターンがどの程度画像認識処理に適した状態にあるのか」という観点からは、改善の余地がある。   In other words, when comparing a plurality of cases where a certain degree of character similarity determination can be obtained, the larger the original specific area image before resizing, the larger the original specific area. There is a tendency that the edge strength in the image is low. That is, just because a relatively high level of character similarity determination that can be regarded as successful recognition is obtained, the specific character pattern is not necessarily within the range of the depth of field. When the specific character pattern is outside the depth of field range, if the focal length can be adjusted as appropriate so that the specific character pattern falls within the depth of field range, a higher level character similarity determination is possible. Is expected (ie increased recognition accuracy). In other words, even if a character similarity determination level of a certain level or more is obtained, there is room for improvement from the viewpoint of “how much a specific character pattern is suitable for image recognition processing”.

あるいは、次のような観点もある。撮像装置の被写界深度は、撮像視野全体をカバーするほど深くはない場合がある。その場合、撮像装置から遠い位置が被写界深度から外れた状態における平均的な認識成功率よりも、撮像装置に近い位置が被写界深度から外れた状態における平均的な認識成功率の方が高いであろう。なお、ここでの「平均的な認識成功率」とは、具体的には、複数の画像に様々な位置に写っている複数の特定文字パターンそれぞれの認識成功率の平均値である。つまり、撮像装置の被写界深度が撮像視野全体をカバーするほど深くない場合であっても、「画像内の任意の位置に写った特定文字パターンがどの程度画像認識処理に適した状態か否か」を適切に評価するためには、エッジ強度による評価だけでは不十分である。大きな特定領域と小さな特定領域では、仮に同程度の低いエッジ強度であっても、認識容易性が異なるからである。   Or there is also the following viewpoint. The depth of field of the imaging device may not be so deep as to cover the entire imaging field. In that case, the average recognition success rate when the position close to the imaging device is out of the depth of field is more than the average recognition success rate when the position far from the imaging device is outside the depth of field. Will be expensive. The “average recognition success rate” here is specifically an average value of recognition success rates of a plurality of specific character patterns appearing at various positions in a plurality of images. In other words, even if the depth of field of the imaging device is not deep enough to cover the entire imaging field of view, “how well is the specific character pattern in any position in the image suitable for image recognition processing? In order to appropriately evaluate “ka”, it is not sufficient to evaluate only by edge strength. This is because the ease of recognition differs between a large specific area and a small specific area even if the edge strength is comparable.

そこで、本実施形態では、「特定文字パターンがどの程度画像認識処理に適した状態で画像に写っているのか」という適合度を示す指標値として、文字類似判定度と、サイズ変更前の元の特定領域画像のエッジ強度の双方を考慮した指標値が使われる。具体的には、文字類似判定度が高いほど、指標値も高い適合度(すなわち高い認識容易性)を示す。また、元の特定領域画像のエッジ強度が強いほど(つまり元の特定領域画像の鮮鋭度が高いほど)、指標値も高い適合度を示す。   Therefore, in the present embodiment, the character similarity determination degree and the original size before the size change are used as index values indicating the degree of suitability “how much the specific character pattern is reflected in the image in a state suitable for image recognition processing”. An index value that considers both the edge strength of the specific area image is used. Specifically, the higher the character similarity determination level is, the higher the index value is (ie, the higher recognition ease). In addition, the higher the edge strength of the original specific area image is (that is, the higher the sharpness of the original specific area image is), the higher the index value is.

以下では説明の便宜上、文字類似判定度は0以上であり、大きな値ほど高い文字類似判定度を示すものとする。また、エッジ強度も0以上であり、大きな値ほど強いエッジ強度を示すものとする。同様に、指標値も0以上であり、大きな値ほど高い適合度を示すものとする。以上の仮定によれば、指標値は、文字類似判定度に対して単調増加するとともに、元の特定領域画像のエッジ強度に対しても単調増加する。   Hereinafter, for convenience of explanation, the character similarity determination degree is 0 or more, and a larger value indicates a higher character similarity determination degree. The edge strength is also 0 or more, and a larger value indicates a stronger edge strength. Similarly, the index value is 0 or more, and a higher value indicates a higher fitness. According to the above assumption, the index value monotonously increases with respect to the character similarity determination degree and also monotonously increases with respect to the edge strength of the original specific area image.

例えば、特定領域画像133と134という2つの元の特定領域画像のエッジ強度は同程度であるが、基準サイズ画像141から得られる文字類似判定度の方が基準サイズ画像142から得られる文字類似判定度より高い。したがって、指標値の上記定義によれば、特定領域画像133の指標値は、特定領域画像134の指標値よりも高い。つまり、2つの指標値は、同程度のエッジ強度でも、大きな特定領域画像133の方が、小さな特定領域画像134よりも画像認識処理に適していることを示す。   For example, although the edge strengths of the two original specific area images 133 and 134 have the same edge strength, the character similarity determination obtained from the reference size image 142 has the character similarity determination degree obtained from the reference size image 141. Higher than degree. Therefore, according to the above definition of the index value, the index value of the specific area image 133 is higher than the index value of the specific area image 134. That is, the two index values indicate that the large specific area image 133 is more suitable for image recognition processing than the small specific area image 134 even with the same edge strength.

また、上記のとおり、2つの特定文字パターンについて同程度の文字類似判定度が得られるとしても、2つの元の特定領域画像のエッジ強度には差がある。指標値の上記定義によれば、元の特定領域画像のエッジ強度が低い場合は、指標値が低くなる。よって、以上のような指標値を用いて、指標値が高くなるように焦点距離の調整を動的に行えば、撮像装置は、画像認識処理により適した画像を撮像することができるようになる。   Further, as described above, even if the same degree of character similarity determination is obtained for two specific character patterns, there is a difference in edge strength between the two original specific area images. According to the above definition of the index value, when the edge strength of the original specific area image is low, the index value is low. Therefore, if the focal length is dynamically adjusted so that the index value is increased using the index value as described above, the imaging apparatus can capture an image suitable for the image recognition process. .

上記のとおり、温度変化や経時変化の影響で、撮像装置に設定する焦点距離として適切な値は変動し得る。しかし、焦点距離調整システムが指標値を用いて動的に焦点距離を調整することで、安定的に高い認識成功率が達成される。指標値に基づく調整は、具体的には、以下のように行われる。   As described above, an appropriate value as the focal length set in the imaging apparatus may fluctuate due to the influence of a temperature change or a change with time. However, the focal length adjustment system dynamically adjusts the focal length using the index value, so that a high recognition success rate is stably achieved. Specifically, the adjustment based on the index value is performed as follows.

焦点距離調整システムは、撮像装置によって撮像された複数の画像の各々を用いて、当該画像に写った1つ以上の移動物体それぞれの表面上の特定文字パターンについて、上記のように定義される指標値を算出する。また、焦点距離調整システムは、温度と焦点距離の複数の組み合わせの各々に対応する、指標値の代表値(average; measure of central tendency)を算出する。例えば、ある温度とある焦点距離の組み合わせに対応する代表値は、当該組み合わせに対応する複数の指標値の全部または一部の算術平均(arithmetic mean)であってもよい。   The focal length adjustment system uses each of a plurality of images picked up by an image pickup device, and an index defined as described above for a specific character pattern on the surface of each of one or more moving objects shown in the image. Calculate the value. In addition, the focal length adjustment system calculates a representative value (average of measure of central tendency) corresponding to each of a plurality of combinations of temperature and focal length. For example, the representative value corresponding to a combination of a certain temperature and a certain focal length may be an arithmetic mean of all or part of a plurality of index values corresponding to the combination.

代表値は、各画像が撮像されたときに撮像装置で(または撮像装置の設置された場所で)検出された各温度と、各画像が撮像されたときに撮像装置に設定されていた各焦点距離に基づいて算出される。   The representative values are the temperatures detected by the imaging device (or the location where the imaging device is installed) when each image is captured, and the focal points set for the imaging device when each image is captured. Calculated based on distance.

ここで、撮像装置で(または撮像装置の設置された場所で)現在検出される温度と、撮像装置に現在設定されている第1の焦点距離との組み合わせに対応して算出された代表値を、便宜上、「第1の代表値」とする。例えば、後述の図9〜13における代表値Qcurは、第1の代表値の具体例である。   Here, the representative value calculated corresponding to the combination of the temperature currently detected by the imaging device (or the location where the imaging device is installed) and the first focal length currently set in the imaging device is obtained. For convenience, it is referred to as “first representative value”. For example, the representative value Qcur in FIGS. 9 to 13 described later is a specific example of the first representative value.

また、撮像装置で(または撮像装置の設置された場所で)現在検出される温度と、第1の焦点距離とは異なる第2の焦点距離との組み合わせに対応して算出された代表値を、便宜上、「第2の代表値」とする。例えば、後述の図9〜13における代表値Qnearは、第2の代表値の具体例であり、図9〜13における代表値Qfarは、第2の代表値の他の具体例である。   In addition, a representative value calculated corresponding to a combination of a temperature currently detected by the imaging device (or at a place where the imaging device is installed) and a second focal length different from the first focal length, For convenience, it is referred to as a “second representative value”. For example, a representative value Qnear in FIGS. 9 to 13 described later is a specific example of the second representative value, and a representative value Qfar in FIGS. 9 to 13 is another specific example of the second representative value.

また、上記のとおり、指標値は、「特定文字パターンがどの程度画像認識処理に適した状態で画像に写っているか」という適合度(換言すれば認識容易性)を示す。よって、指標値の代表値も上記適合度を示す。   Further, as described above, the index value indicates the degree of suitability (in other words, the ease of recognition) “how much the specific character pattern is reflected in the image in a state suitable for image recognition processing”. Therefore, the representative value of the index value also indicates the degree of fitness.

第1の代表値が第2の代表値よりも低い適合度を示す場合、焦点距離調整システムは、制御情報を撮像装置に出力する。当該制御情報は、撮像装置に設定する焦点距離を、第1の焦点距離から第2の焦点距離への変化の方向に変化させるための情報である。より具体的には、焦点距離調整システムは、第2の焦点距離を撮像装置に設定するための制御情報を出力してもよい。   When the first representative value indicates a lower fitness than the second representative value, the focal length adjustment system outputs control information to the imaging device. The control information is information for changing the focal length set in the imaging apparatus in the direction of change from the first focal length to the second focal length. More specifically, the focal length adjustment system may output control information for setting the second focal length in the imaging apparatus.

逆に、第1の代表値が第2の代表値よりも高い適合度を示す場合、焦点距離調整システムは、撮像装置に設定する焦点距離を変えないこともある。
例えば、第1の焦点距離を間に挟んで第2の焦点距離とは逆側の焦点距離を、「第3の焦点距離」ということにする。また、撮像装置で(または撮像装置の設置された場所で)現在検出される温度と第3の焦点距離の組み合わせに対応して算出された代表値を「第3の代表値」ということにする。第1の代表値が、第2の代表値よりも高い適合度を示し、かつ、第3の代表値の代表値よりも高い適合度を示す場合、焦点距離調整システムは、撮像装置に設定する焦点距離を変えなくてもよい。
On the other hand, when the first representative value shows a higher degree of matching than the second representative value, the focal length adjustment system may not change the focal length set in the imaging apparatus.
For example, the focal length opposite to the second focal length with the first focal length in between is referred to as a “third focal length”. Also, the representative value calculated corresponding to the combination of the temperature currently detected by the imaging device (or at the place where the imaging device is installed) and the third focal length will be referred to as a “third representative value”. . When the first representative value indicates a higher fitness than the second representative value and indicates a higher fitness than the third representative value, the focal length adjustment system sets the imaging device. It is not necessary to change the focal length.

あるいは、第1の代表値が第2の代表値よりも高い適合度を示す場合、焦点距離調整システムは、焦点距離を変更するための制御情報を撮像装置に出力することもある。当該制御情報は、具体的には、撮像装置に設定する焦点距離を、第2の焦点距離から第1の焦点距離への変化の方向に変化させるための情報である。   Alternatively, when the first representative value indicates a higher degree of matching than the second representative value, the focal length adjustment system may output control information for changing the focal length to the imaging apparatus. Specifically, the control information is information for changing the focal length set in the imaging apparatus in the direction of change from the second focal length to the first focal length.

焦点距離調整システムは、以上のように場合に応じて適宜の制御情報を撮像装置に出力することにより、場合に応じた変更後の撮像設定を撮像装置に適用する。
以上説明したように、本実施形態では、撮像された複数の画像内で様々な位置にある様々な特定領域の各々についての指標値を利用したフィードバック制御が行われ、撮像設定の1種である焦点距離が制御される。ここで、指標値は、特定文字パターンと撮像装置の被写界深度との位置関係を反映する第1の評価値としての鮮鋭度と、特定領域の大きさを反映する第2の評価値としての文字類似判定度に基づく値である。そのため、ある観点から見れば、上記フィードバック制御は、第1と第2の評価値と、各画像の撮像時の温度と撮像設定(具体的には焦点距離)に基づく制御であると言える。
As described above, the focal length adjustment system outputs appropriate control information to the imaging apparatus according to the case, and thereby applies the changed imaging setting according to the case to the imaging apparatus.
As described above, in the present embodiment, feedback control using index values for each of various specific areas at various positions in a plurality of captured images is performed, which is one type of imaging setting. The focal length is controlled. Here, the index value is a sharpness as a first evaluation value that reflects the positional relationship between the specific character pattern and the depth of field of the imaging device, and a second evaluation value that reflects the size of the specific region. It is a value based on the character similarity determination degree. Therefore, from a certain viewpoint, it can be said that the feedback control is control based on the first and second evaluation values, the temperature at the time of capturing each image, and the image capturing setting (specifically, the focal length).

そして、フィードバック制御の結果、撮像画像内のどの位置の特定領域に関しても指標値の示す認識容易性が高くなるように、撮像装置の焦点距離は動的に調整される。
焦点距離調整システムによる調整のさらなる詳細は、図7〜14とともに後述する。なお、図9〜13とともに後述するとおり、温度の変化や撮像装置の部品の特性の変化への焦点距離の追従性と、焦点距離の安定性のバランスをとるために、焦点距離調整システムは、代表値の算出や焦点距離の変更を行わない期間を設けてもよい。例えば、後述の図14の動作例におけるデータの蓄積期間では、焦点距離が変更されない。
Then, as a result of the feedback control, the focal length of the imaging device is dynamically adjusted so that the recognizability indicated by the index value is high for any specific region in the captured image.
Further details of the adjustment by the focal length adjustment system will be described later in conjunction with FIGS. As will be described later with reference to FIGS. 9 to 13, in order to balance the followability of the focal length to changes in temperature and changes in the characteristics of the components of the imaging device and the stability of the focal length, the focal length adjustment system is A period in which the calculation of the representative value and the change of the focal length are not performed may be provided. For example, the focal length is not changed in the data accumulation period in the operation example of FIG.

図2は、被写界深度に収まる範囲の温度依存性を説明する図である。図2には、路面201上のx軸の方向に沿って移動する4つの移動物体202a〜202dが描かれている。移動物体202a〜202dそれぞれの表面上には、特定文字パターン203a〜203dがある。なお、x軸については、図1に関して説明したとおりである。   FIG. 2 is a diagram for explaining the temperature dependence of a range that falls within the depth of field. In FIG. 2, four moving objects 202a to 202d moving along the x-axis direction on the road surface 201 are depicted. There are specific character patterns 203a to 203d on the surface of each of the moving objects 202a to 202d. The x-axis is as described with reference to FIG.

また、図2の例では、支柱204に取り付けられたカメラ205が、x軸の方向に沿って路面201上を移動する移動物体を撮像する。図2には、カメラ205の光軸206と撮像視野207も模式的に示されている。   In the example of FIG. 2, the camera 205 attached to the column 204 images a moving object that moves on the road surface 201 along the x-axis direction. In FIG. 2, the optical axis 206 and the imaging field 207 of the camera 205 are also schematically shown.

また、路面201に対して垂直な座標軸を「z軸」とすると、光軸206とz軸のなす角はθである。撮像視野207のx軸方向の広がり(例えば、特定文字パターン203a〜203dが位置すると想定される高さにおける、x軸方向の広がり)は、角θと、カメラ205が設置された点のz座標と、カメラ205の仕様から、幾何学的に計算可能である。   If the coordinate axis perpendicular to the road surface 201 is “z-axis”, the angle formed by the optical axis 206 and the z-axis is θ. The spread of the imaging field of view 207 in the x-axis direction (for example, the spread in the x-axis direction at the height at which the specific character patterns 203a to 203d are assumed) is the angle θ and the z coordinate of the point where the camera 205 is installed. From the specifications of the camera 205, it can be calculated geometrically.

図2の例では、カメラ205に1番近い特定文字パターン203aは、近すぎるため撮像視野207から外れている。また、カメラ205から1番遠い特定文字パターン203dは、遠すぎるため撮像視野207から外れている。他方、特定文字パターン203bと203cは撮像視野207内に入っている。   In the example of FIG. 2, the specific character pattern 203 a closest to the camera 205 is too close to the imaging field of view 207. In addition, the specific character pattern 203d that is the farthest from the camera 205 is too far away from the imaging field of view 207. On the other hand, the specific character patterns 203b and 203c are in the imaging field of view 207.

ところで、カメラ205に設定される焦点距離の値が仮に不変だとしても、光軸206上の実際の合焦位置は、温度の変化やカメラ205の部品の経時変化に応じて、変化し得る。このような変化の要因については、図1に関して説明したとおりである。そして、実際の合焦位置の変化に応じて、当然被写界深度の範囲も変化する。   By the way, even if the value of the focal length set in the camera 205 is not changed, the actual in-focus position on the optical axis 206 can change according to a change in temperature or a change with time of components of the camera 205. The cause of such a change is as described with reference to FIG. Then, naturally, the range of the depth of field also changes in accordance with the change in the actual focusing position.

図2では、被写界深度の範囲を、x軸方向に投影した長さで示している。より具体的には、特定文字パターン203a〜203dが位置すると想定される高さにおいて被写界深度に含まれる範囲が、x軸と平行な3本の両向き矢印により示されている。   In FIG. 2, the range of the depth of field is indicated by the length projected in the x-axis direction. More specifically, the range included in the depth of field at the height at which the specific character patterns 203a to 203d are assumed is indicated by three double-headed arrows parallel to the x-axis.

例えば、範囲208は、温度が10℃のときに被写界深度に収まる範囲である。また、範囲209は、温度が−10℃のときに被写界深度に収まる範囲である。そして、範囲210は、温度が30℃のときに被写界深度に収まる範囲である。   For example, the range 208 is a range that falls within the depth of field when the temperature is 10 ° C. The range 209 is a range that falls within the depth of field when the temperature is −10 ° C. The range 210 is a range that falls within the depth of field when the temperature is 30 ° C.

なお、図2の説明における「温度」とは、カメラ205の温度であることが好ましいが、カメラ205が設置された場所の気温であってもよい。
図2には、説明の便宜上、6つのx座標xa〜xfが示されている(ただしxa<xb<xc<xd<xe<xfとする)。例えば、範囲208はxbからxeまでの範囲であり、範囲209はxaからxdまでの範囲であり、範囲210はxcからxfまでの範囲である。
The “temperature” in the description of FIG. 2 is preferably the temperature of the camera 205, but may be the temperature of the place where the camera 205 is installed.
For convenience of explanation, FIG. 2 shows six x coordinates xa to xf (where xa <xb <xc <xd <xe <xf). For example, the range 208 is a range from xb to xe, the range 209 is a range from xa to xd, and a range 210 is a range from xc to xf.

仮に、温度が10℃のときに、例えば作業員により、カメラ205の初期設定が行われたとする。作業員は、撮像視野207の全部(またはなるべく広い範囲)が被写界深度の範囲内に収まるように、適宜の焦点距離を手動でカメラ205に設定してもよい。すると、範囲208の矢印に示すように、撮像視野207内の特定文字パターン203bも203cも、被写界深度の範囲内に収まる。よって、特定文字パターン203bも203cも鮮明に画像に写る。   Suppose that when the temperature is 10 ° C., the camera 205 is initialized by, for example, an operator. The operator may manually set an appropriate focal length in the camera 205 so that the entire imaging field of view 207 (or as wide a range as possible) is within the range of the depth of field. Then, as indicated by the arrows in the range 208, both the specific character patterns 203b and 203c in the imaging field of view 207 fall within the depth of field. Therefore, the specific character patterns 203b and 203c are clearly displayed in the image.

ここで、仮に本実施形態による焦点距離の動的な調整が行われないとすると、上記のとおり、温度が−10℃のときに被写界深度に収まる範囲は範囲209である。よって、温度が−10℃のときは、特定文字パターン203cが被写界深度から外れてしまう。   If the dynamic adjustment of the focal length according to the present embodiment is not performed, the range that falls within the depth of field when the temperature is −10 ° C. is the range 209 as described above. Therefore, when the temperature is −10 ° C., the specific character pattern 203c deviates from the depth of field.

つまり、もし焦点距離が調整されないと、温度が−10℃のときには特定文字パターン203cはぼやけて画像に写る。しかも、特定文字パターン203cはカメラ205から遠いので、画像に小さく写る。   That is, if the focal length is not adjusted, the specific character pattern 203c is blurred and appears in the image when the temperature is −10 ° C. Moreover, since the specific character pattern 203c is far from the camera 205, it appears small in the image.

より具体的には、温度が−10℃のときは、特定文字パターン203cは、図1の特定領域画像134のように小さくぼやけて写る。なお、温度が10℃のときと温度が30℃のときには、特定文字パターン203cは、被写界深度の範囲内にあるので図1の特定領域画像132のように鮮明に写る。   More specifically, when the temperature is −10 ° C., the specific character pattern 203c appears small and blurred like the specific area image 134 of FIG. When the temperature is 10 ° C. and the temperature is 30 ° C., the specific character pattern 203c is clearly visible as the specific area image 132 in FIG. 1 because it is within the depth of field.

同様に、仮に本実施形態による焦点距離の動的な調整が行われないとすると、温度が30℃のときに被写界深度に収まる範囲は範囲210である。よって、温度が30℃のときは、特定文字パターン203bが被写界深度から外れてしまう。   Similarly, if dynamic adjustment of the focal length according to the present embodiment is not performed, the range that falls within the depth of field when the temperature is 30 ° C. is a range 210. Therefore, when the temperature is 30 ° C., the specific character pattern 203b deviates from the depth of field.

つまり、もし焦点距離が調整されないと、温度が30℃のときに特定文字パターン203bはぼやけて画像に写る。なお、特定文字パターン203bはカメラ205に近いので、画像に大きく写る。   That is, if the focal length is not adjusted, the specific character pattern 203b is blurred and appears in the image when the temperature is 30 ° C. Since the specific character pattern 203b is close to the camera 205, it appears large in the image.

より具体的には、温度が30℃のときには、特定文字パターン203bは、図1の特定領域画像133のように大きくぼやけて写る。なお、温度が−10℃のときと温度が10℃のときには、特定文字パターン203bは、被写界深度の範囲内にあるので図1の特定領域画像131のように鮮明に写る。   More specifically, when the temperature is 30 ° C., the specific character pattern 203b appears largely blurred as in the specific area image 133 of FIG. When the temperature is −10 ° C. and the temperature is 10 ° C., the specific character pattern 203b is clearly shown as the specific area image 131 in FIG. 1 because it is within the depth of field.

本実施形態では、図1とともに説明した上記指標値を用いて、焦点距離調整システムが、カメラ205に設定する焦点距離を動的に調整する。その結果、温度が−10℃のときと、温度が10℃のときと、温度が30℃のときで、異なる焦点距離がカメラ205に設定される。調整の結果として、どの温度のときでも、被写界深度が範囲208とほぼ一致するようになるので、安定的に高い認識成功率が達成される。   In the present embodiment, the focal length adjustment system dynamically adjusts the focal length set in the camera 205 using the index value described with reference to FIG. As a result, different focal lengths are set in the camera 205 when the temperature is −10 ° C., when the temperature is 10 ° C., and when the temperature is 30 ° C. As a result of the adjustment, the depth of field becomes substantially equal to the range 208 at any temperature, so that a high recognition success rate is stably achieved.

さて、図3は、焦点距離調整システムのブロック構成図である。本実施形態の焦点距離調整システム300は、指標値算出部301と、代表値算出部302と、焦点距離制御部303と、調整手順制御部304を含む。また、図3には、撮像装置310と、温度検出装置320と、記憶装置330も図示されている。なお、温度検出装置320は撮像装置310の外に描かれているが、撮像装置310が温度検出装置320を内蔵していることが好ましい。以下に、焦点距離調整システム300の各コンポーネントについて説明する。   FIG. 3 is a block diagram of the focal length adjustment system. The focal length adjustment system 300 of this embodiment includes an index value calculation unit 301, a representative value calculation unit 302, a focal length control unit 303, and an adjustment procedure control unit 304. FIG. 3 also shows an imaging device 310, a temperature detection device 320, and a storage device 330. Although the temperature detection device 320 is drawn outside the imaging device 310, the imaging device 310 preferably includes the temperature detection device 320. Hereinafter, each component of the focal length adjustment system 300 will be described.

指標値算出部301は、撮像装置310が撮像した画像を用いて、指標値を算出する。また、指標値算出部301は、以下の(4a)〜(4d)の値を対応づける。   The index value calculation unit 301 calculates an index value using an image captured by the imaging device 310. The index value calculation unit 301 associates the following values (4a) to (4d).

(4a)算出した指標値。
(4b)画像が撮像されたときに、撮像装置310(または、撮像装置310が設置された場所)で温度検出装置320により検出された温度。
(4c)画像が撮像されたときに撮像装置310に設定されていた焦点距離。
(4d)指標値を算出した特定文字パターンと撮像装置310の距離。
(4a) The calculated index value.
(4b) The temperature detected by the temperature detection device 320 at the imaging device 310 (or the location where the imaging device 310 is installed) when the image is captured.
(4c) The focal length set in the imaging device 310 when the image is captured.
(4d) The distance between the specific character pattern for which the index value is calculated and the imaging device 310.

1枚の画像には、特定文字パターンが1つも写っていないこともあるし、1つだけ写っていることもあるし、複数写っていることもある。しかし、撮像装置310は複数の画像を撮像するので、指標値算出部301により複数の指標値が算出される。   One image may not include one specific character pattern, may include only one specific character pattern, or may include a plurality of images. However, since the imaging device 310 captures a plurality of images, the index value calculation unit 301 calculates a plurality of index values.

代表値算出部302は、指標値算出部301が算出した指標値の代表値を算出する。上記のとおり、1つの代表値は、温度と焦点距離の1つの組み合わせに対応する。
代表値算出部302は、代表値として、例えば単純に算術平均を算出してもよい。代表値算出部302は、外れ値や古い値を除外するなどの何らかの操作を行ってもよい。つまり、代表値算出部302は、ある温度とある焦点距離の組み合わせに対応する多数の指標値のうちの一部(例えば最近算出された指標値)のみを使って代表値を算出してもよい。また、代表値算出部302は、各指標値が算出された時刻からの経過時間に応じた重みを用いて、重み付け平均を代表値として算出してもよい。
The representative value calculation unit 302 calculates a representative value of the index value calculated by the index value calculation unit 301. As described above, one representative value corresponds to one combination of temperature and focal length.
The representative value calculation unit 302 may simply calculate, for example, an arithmetic average as the representative value. The representative value calculation unit 302 may perform some operation such as excluding outliers and old values. That is, the representative value calculation unit 302 may calculate the representative value using only a part (for example, a recently calculated index value) of many index values corresponding to a combination of a certain temperature and a certain focal length. . Further, the representative value calculation unit 302 may calculate a weighted average as a representative value by using a weight according to an elapsed time from the time when each index value is calculated.

また、指標値算出部301は、算出した各指標値を、(4b)〜(4d)の組み合わせに対応づけて記憶装置330に格納してもよい。代表値算出部302は、記憶装置330を参照することにより、代表値を算出してもよい。   In addition, the index value calculation unit 301 may store the calculated index values in the storage device 330 in association with the combinations (4b) to (4d). The representative value calculation unit 302 may calculate the representative value by referring to the storage device 330.

焦点距離制御部303は、代表値算出部302が算出する代表値に基づいて、撮像装置310に設定する焦点距離を決定する。そして、焦点距離制御部303は、撮像装置310に焦点距離を設定するための制御情報を出力する。   The focal length control unit 303 determines a focal length to be set in the imaging device 310 based on the representative value calculated by the representative value calculation unit 302. Then, the focal length control unit 303 outputs control information for setting the focal length to the imaging device 310.

具体的には、焦点距離制御部303は、(5a)と(5b)に示す第1と第2の代表値を比較する。   Specifically, the focal length control unit 303 compares the first and second representative values shown in (5a) and (5b).

(5a)温度検出装置320が現在検出する温度と、撮像装置310に現在設定されている第1の焦点距離との組み合わせに対応して、代表値算出部302が算出した第1の代表値。
(5b)温度検出装置320が現在検出する温度と、第1の焦点距離とは異なる第2の焦点距離との組み合わせに対応して、代表値算出部302が算出した第2の代表値。
(5a) The first representative value calculated by the representative value calculation unit 302 corresponding to the combination of the temperature currently detected by the temperature detection device 320 and the first focal length currently set in the imaging device 310.
(5b) The second representative value calculated by the representative value calculation unit 302 corresponding to the combination of the temperature currently detected by the temperature detection device 320 and the second focal length different from the first focal length.

ここで、指標値は、「特定文字パターンがどの程度画像認識処理に適した状態で画像に写っているか」という適合度を示す。そして、代表値算出部302が算出する代表値は、指標値算出部301が算出した指標値から算出される。したがって、代表値も上記適合度を示す。   Here, the index value indicates the degree of suitability “how much the specific character pattern is reflected in the image in a state suitable for the image recognition process”. The representative value calculated by the representative value calculation unit 302 is calculated from the index value calculated by the index value calculation unit 301. Therefore, the representative value also indicates the degree of conformity.

焦点距離制御部303は、第1と第2の代表値を比較することにより、第1と第2の代表値がそれぞれ示す適合度を比較する。そして、焦点距離制御部303は場合に応じて制御情報を出力する。すると、撮像装置310には、制御情報にしたがって新たな焦点距離が設定される。   The focal length control unit 303 compares the first and second representative values, thereby comparing the fitness levels respectively indicated by the first and second representative values. Then, the focal length control unit 303 outputs control information depending on the case. Then, a new focal length is set in the imaging device 310 according to the control information.

例えば、第1の代表値が第2の代表値よりも低い適合度を示す場合、焦点距離制御部303は、撮像装置310に設定する焦点距離を、第1の焦点距離から第2の焦点距離への変化の方向に変化させるための制御情報を出力する。具体的には、焦点距離制御部303は、第2の焦点距離を撮像装置310に設定するための制御情報を出力してもよい。   For example, when the first representative value indicates a lower fitness than the second representative value, the focal length control unit 303 changes the focal length to be set in the imaging device 310 from the first focal length to the second focal length. Outputs control information for changing in the direction of change. Specifically, the focal length control unit 303 may output control information for setting the second focal length in the imaging device 310.

逆に、第1の代表値が第2の代表値よりも高い適合度を示す場合、焦点距離制御部303は、撮像装置310に設定する焦点距離を変えないこともある。あるいは、第1の代表値が第2の代表値よりも高い適合度を示す場合、焦点距離制御部303は、撮像装置310に設定する焦点距離を、第2の焦点距離から第1の焦点距離への変化の方向に変化させるための制御情報を出力することもある。   On the other hand, when the first representative value shows a higher degree of matching than the second representative value, the focal length control unit 303 may not change the focal length set in the imaging device 310. Alternatively, when the first representative value indicates a higher fitness than the second representative value, the focal length control unit 303 changes the focal length to be set in the imaging device 310 from the second focal length to the first focal length. The control information for changing in the direction of the change may be output.

調整手順制御部304は、焦点距離調整システム300が行う調整の手順やタイミングを制御する。例えば、調整手順制御部304は、指標値算出部301が指標値を算出するタイミングを制御してもよい。また、代表値算出部302は、調整手順制御部304による制御にしたがって、温度と焦点距離の適宜の組み合わせについて、適宜のタイミングで代表値を算出する。そして、焦点距離制御部303は、調整手順制御部304による制御にしたがって、適宜、新たな制御情報を生成する。   The adjustment procedure control unit 304 controls an adjustment procedure and timing performed by the focal length adjustment system 300. For example, the adjustment procedure control unit 304 may control the timing at which the index value calculation unit 301 calculates the index value. The representative value calculation unit 302 calculates a representative value at an appropriate timing for an appropriate combination of temperature and focal length according to control by the adjustment procedure control unit 304. Then, the focal length control unit 303 appropriately generates new control information according to the control by the adjustment procedure control unit 304.

ところで、図3の焦点距離調整システム300を実現するためのハードウェア構成は様々である。図4に、ハードウェア構成の2つの例を示す。具体的には、図3の焦点距離調整システム300は、図4の監視システム400に実装されてもよく、監視システム500に実装されてもよい。   Incidentally, there are various hardware configurations for realizing the focal length adjustment system 300 of FIG. FIG. 4 shows two examples of hardware configurations. Specifically, the focal length adjustment system 300 in FIG. 3 may be implemented in the monitoring system 400 in FIG. 4 or may be implemented in the monitoring system 500.

監視システム400は、移動物体を監視するシステムであり、具体的には路側に設置される路側機410により実現される。路側機410は、カメラ411と、温度センサ412と、CPU(Central Processing Unit)413と、RAM(Random Access Memory)414と、HDD(Hard Disk Drive)415を有し、これらの構成要素同士はバス416を介して接続されている。   The monitoring system 400 is a system that monitors a moving object, and is specifically realized by a roadside device 410 installed on the roadside. The roadside machine 410 includes a camera 411, a temperature sensor 412, a CPU (Central Processing Unit) 413, a RAM (Random Access Memory) 414, and an HDD (Hard Disk Drive) 415, and these components are connected to each other by a bus. 416 is connected.

カメラ411は、例えば30fpsなどの所定の間隔で、モノクロームの輝度画像を撮像する。実施形態によっては、カメラ411は、カラー画像を撮像するものでもよい。温度センサ412は、カメラ411の温度を検出する。あるいは、温度センサ412は外気温を検出してもよい。温度センサ412はカメラ411の外側に描かれているが、温度センサ412はカメラ411に内蔵されていてもよい。   The camera 411 captures a monochrome luminance image at a predetermined interval such as 30 fps. Depending on the embodiment, the camera 411 may capture a color image. The temperature sensor 412 detects the temperature of the camera 411. Alternatively, the temperature sensor 412 may detect the outside air temperature. Although the temperature sensor 412 is drawn outside the camera 411, the temperature sensor 412 may be built in the camera 411.

CPU413は、プログラムをRAM414にロードし、RAM414をワーキングエリアとしても利用しながら、プログラムを実行する。プログラムは、不揮発性記憶装置であるHDD415に予め格納されていてもよい。また、HDD415の代わりに(あるいはHDD415とともに)、ROM(Read Only Memory)、フラッシュメモリ、SSD(Solid State Drive)などのその他の不揮発性記憶装置が使われてもよい。   The CPU 413 loads the program into the RAM 414 and executes the program while using the RAM 414 as a working area. The program may be stored in advance in the HDD 415 which is a nonvolatile storage device. Further, instead of the HDD 415 (or together with the HDD 415), other nonvolatile storage devices such as a ROM (Read Only Memory), a flash memory, and an SSD (Solid State Drive) may be used.

図3の撮像装置310はカメラ411であってもよく、温度検出装置320は温度センサ412であってもよい。記憶装置330は、RAM414でもよく、HDD415でもよく、RAM414とHDD415の組み合わせであってもよい。そして、指標値算出部301と代表値算出部302と焦点距離制御部303と調整手順制御部304は、プログラムを実行するCPU413により実現されてもよい。   3 may be a camera 411, and the temperature detection device 320 may be a temperature sensor 412. The storage device 330 may be the RAM 414, the HDD 415, or a combination of the RAM 414 and the HDD 415. The index value calculation unit 301, the representative value calculation unit 302, the focal length control unit 303, and the adjustment procedure control unit 304 may be realized by a CPU 413 that executes a program.

さて、監視システム500も、移動物体を監視するシステムである。監視システム500は、路側に設置される複数の路側機510および520と、サーバ530を含む。路側機の数は任意である。路側機510と520は同様に構成されており、いずれもネットワーク540を介してサーバ530に接続されている。   The monitoring system 500 is also a system that monitors a moving object. The monitoring system 500 includes a plurality of roadside devices 510 and 520 installed on the roadside, and a server 530. The number of roadside machines is arbitrary. The roadside devices 510 and 520 are configured in the same manner, and both are connected to the server 530 via the network 540.

路側機510は、カメラ511と、温度センサ512と、CPU513と、RAM514と、HDD515と、通信インタフェイス516を有し、これらの構成要素同士はバス517を介して接続されている。なお、紙幅の都合上、図4では「インタフェイス」が「I/F」と表記されている。   The roadside machine 510 includes a camera 511, a temperature sensor 512, a CPU 513, a RAM 514, an HDD 515, and a communication interface 516, and these components are connected to each other via a bus 517. For convenience of paper width, “Interface” is described as “I / F” in FIG.

カメラ511、温度センサ512、CPU513、RAM514、およびHDD515は、それぞれ、カメラ411、温度センサ412、CPU413、RAM414、およびHDD415と同様である。温度センサ512はカメラ511の外側に描かれているが、温度センサ512はカメラ511に内蔵されていてもよい。また、HDD515の代わりに(あるいはHDD515とともに)、ROM、フラッシュメモリ、SSDなどのその他の不揮発性記憶装置が使われてもよい。   The camera 511, temperature sensor 512, CPU 513, RAM 514, and HDD 515 are the same as the camera 411, temperature sensor 412, CPU 413, RAM 414, and HDD 415, respectively. Although the temperature sensor 512 is drawn outside the camera 511, the temperature sensor 512 may be built in the camera 511. Further, instead of the HDD 515 (or together with the HDD 515), other nonvolatile storage devices such as a ROM, a flash memory, and an SSD may be used.

通信インタフェイス516は、例えば有線または無線のLAN(Local Area Network)インタフェイスでもよい。ネットワーク540は、LAN、WAN(Wide Area Network)、インターネット、またはそれらの組み合わせでもよい。路側機510は、通信インタフェイス516とネットワーク540を介してサーバ530と通信することができる。   The communication interface 516 may be, for example, a wired or wireless LAN (Local Area Network) interface. The network 540 may be a LAN, a WAN (Wide Area Network), the Internet, or a combination thereof. The roadside device 510 can communicate with the server 530 via the communication interface 516 and the network 540.

なお、CPU513が実行するプログラムは、HDD515に予め格納されていてもよい。あるいは、プログラムは、ネットワーク540を介して、サーバ530または不図示の他のコンピュータから、HDD515にダウンロードされてもよい。   Note that the program executed by the CPU 513 may be stored in the HDD 515 in advance. Alternatively, the program may be downloaded to the HDD 515 from the server 530 or another computer (not shown) via the network 540.

サーバ530は、CPU531と、RAM532と、HDD533と、入力装置534と、出力装置535と、通信インタフェイス536と、記憶媒体550の駆動装置537を有し、これらの構成要素同士はバス538を介して接続されている。   The server 530 includes a CPU 531, a RAM 532, an HDD 533, an input device 534, an output device 535, a communication interface 536, and a drive device 537 for a storage medium 550, and these components are connected via a bus 538. Connected.

CPU531は、プログラムをRAM532にロードし、RAM532をワーキングエリアとしても利用しながら、プログラムを実行する。プログラムは、HDD533に予め格納されていてもよいし、ネットワーク540を介して、不図示の他のコンピュータからHDD533にダウンロードされてもよい。また、HDD533の代わりに(あるいはHDD533とともに)、ROM、フラッシュメモリ、SSDなどのその他の不揮発性記憶装置が使われてもよい。   The CPU 531 loads the program into the RAM 532 and executes the program while using the RAM 532 as a working area. The program may be stored in advance in the HDD 533, or may be downloaded to the HDD 533 from another computer (not shown) via the network 540. Further, instead of the HDD 533 (or together with the HDD 533), other nonvolatile storage devices such as a ROM, a flash memory, and an SSD may be used.

入力装置534は、キーボード、マウスなどのポインティングデバイス、またはその組み合わせである。出力装置535は、ディスプレイ、マイク、またはその組み合わせである。通信インタフェイス536は、例えば有線または無線のLANインタフェイスでもよい。   The input device 534 is a pointing device such as a keyboard and a mouse, or a combination thereof. The output device 535 is a display, a microphone, or a combination thereof. The communication interface 536 may be a wired or wireless LAN interface, for example.

記憶媒体550は、コンピュータ読み取り可能な記憶媒体である。記憶媒体550としては、CD(Compact Disc)やDVD(Digital Versatile Disk)などの光ディスク、光磁気ディスク、磁気ディスク、半導体メモリカードなどが利用可能である。CPU531が実行するプログラムは、記憶媒体550に格納されて提供されてもよい。プログラムは、駆動装置537により記憶媒体550から読み取られ、HDD533にコピーされてもよい。   The storage medium 550 is a computer-readable storage medium. As the storage medium 550, an optical disk such as a CD (Compact Disc) or a DVD (Digital Versatile Disk), a magneto-optical disk, a magnetic disk, a semiconductor memory card, or the like can be used. The program executed by the CPU 531 may be stored in the storage medium 550 and provided. The program may be read from the storage medium 550 by the driving device 537 and copied to the HDD 533.

実施形態によっては、駆動装置537と類似の駆動装置を路側機410がさらに有していてもよく、適宜の記憶媒体に記憶されたプログラムが、当該駆動装置により読み取られ、HDD415にコピーされてもよい。路側機510と520についても同様である。   Depending on the embodiment, the roadside device 410 may further include a driving device similar to the driving device 537, and a program stored in an appropriate storage medium may be read by the driving device and copied to the HDD 415. Good. The same applies to the roadside devices 510 and 520.

図3の撮像装置310はカメラ511であってもよく、温度検出装置320は温度センサ512であってもよい。指標値算出部301は、プログラムを実行するCPU513により実現されてもよい。   The imaging device 310 in FIG. 3 may be a camera 511, and the temperature detection device 320 may be a temperature sensor 512. The index value calculation unit 301 may be realized by a CPU 513 that executes a program.

指標値算出部301として動作するCPU513は、算出した(4a)の指標値を、(4b)〜(4d)のデータとともに、通信インタフェイス516とネットワーク540を介して、サーバ530に送信してもよい。また、調整手順制御部304のうち、指標値算出部301の制御に関わる一部も、プログラムを実行するCPU513により実現されてもよい。   The CPU 513 operating as the index value calculation unit 301 may transmit the calculated index value (4a) to the server 530 via the communication interface 516 and the network 540 together with the data (4b) to (4d). Good. A part of the adjustment procedure control unit 304 related to the control of the index value calculation unit 301 may also be realized by the CPU 513 that executes the program.

そして、路側機510から送信された(4a)〜(4d)のデータは、サーバ530のRAM532に格納されてもよい。つまり、RAM532が図3の記憶装置330として使われてもよい。もちろん、HDD533が記憶装置330として使われてもよいし、RAM532とHDD533の組み合わせが記憶装置330として使われてもよい。   The data (4a) to (4d) transmitted from the roadside device 510 may be stored in the RAM 532 of the server 530. That is, the RAM 532 may be used as the storage device 330 in FIG. Of course, the HDD 533 may be used as the storage device 330, or a combination of the RAM 532 and the HDD 533 may be used as the storage device 330.

代表値算出部302と焦点距離制御部303は、プログラムを実行するCPU531により実現されてもよい。また、調整手順制御部304のうち、代表値算出部302と焦点距離制御部303の制御に関わる一部も、プログラムを実行するCPU531により実現されてもよい。   The representative value calculation unit 302 and the focal length control unit 303 may be realized by a CPU 531 that executes a program. Also, part of the adjustment procedure control unit 304 related to the control of the representative value calculation unit 302 and the focal length control unit 303 may be realized by the CPU 531 that executes the program.

焦点距離制御部303として動作するCPU531は、カメラ511に設定する焦点距離を調整するための制御情報を出力する。具体的には、CPU531は、制御情報を、通信インタフェイス536とネットワーク540を介して、路側機510に送信してもよい。すると、路側機510は、制御情報を受信し、受信した制御情報にしたがってカメラ511に焦点距離を設定する。   The CPU 531 operating as the focal length control unit 303 outputs control information for adjusting the focal length set in the camera 511. Specifically, the CPU 531 may transmit the control information to the roadside device 510 via the communication interface 536 and the network 540. Then, the roadside device 510 receives the control information, and sets the focal length for the camera 511 according to the received control information.

以上例示したように、図3の焦点距離調整システム300は、1台の路側機410により実現されてもよいし、監視システム500の中の複数の装置(例えば路側機510とサーバ530)に分散して実装されていてもよい。以下では説明の簡単化のため、特に断らない限り、焦点距離調整システム300が路側機410により実現されるものとする。   As exemplified above, the focal length adjustment system 300 of FIG. 3 may be realized by a single roadside device 410 or distributed to a plurality of devices (for example, the roadside device 510 and the server 530) in the monitoring system 500. May be implemented. Hereinafter, for the sake of simplification of description, it is assumed that the focal length adjustment system 300 is realized by the roadside device 410 unless otherwise specified.

なお、RAM414、514、532も、HDD415、515、533に含まれる磁気ディスク媒体も、記憶媒体550も、コンピュータ読み取り可能な記憶媒体の例である。これらの記憶媒体は、いずれも有形の(tangible)媒体であり、信号搬送波のような一時的な(transitory)媒体ではない。また、実施形態によっては、CPU413、513、および531のような汎用的なプロセッサの代わりに(あるいは汎用的なプロセッサとともに)、ASIC(Application Specific Integrated Circuit)などの専用ハードウェア回路が使われてもよい。   The RAMs 414, 514, and 532, the magnetic disk media included in the HDDs 415, 515, and 533, and the storage medium 550 are examples of computer-readable storage media. These storage media are all tangible media and not transitory media such as signal carriers. In some embodiments, instead of a general-purpose processor such as the CPUs 413, 513, and 531 (or together with a general-purpose processor), a dedicated hardware circuit such as an ASIC (Application Specific Integrated Circuit) may be used. Good.

続いて、図3の焦点距離調整システム300で使われる各種データについて図5を参照して説明する。図5は、各種データの例を示す図である。
図5の各種データは、図3の記憶装置330に記憶されていてもよい。図3の焦点距離調整システム300が図4の路側機410により実現される場合は、図5の各種データは、RAM414、HDD415、またはその組み合わせに記憶されていてもよい。
Next, various data used in the focal length adjustment system 300 of FIG. 3 will be described with reference to FIG. FIG. 5 is a diagram illustrating examples of various data.
Various data in FIG. 5 may be stored in the storage device 330 in FIG. 3. When the focal length adjustment system 300 in FIG. 3 is realized by the roadside device 410 in FIG. 4, various data in FIG. 5 may be stored in the RAM 414, the HDD 415, or a combination thereof.

焦点距離調整システム300が路側機510とサーバ530に分散して実装される場合は、図5の各種データは、サーバ530内の記憶装置(つまりRAM532、HDD533、またはその組み合わせ)に記憶されてもよい。なぜなら、この場合、図5のデータを使う代表値算出部302と焦点距離制御部303がサーバ530により実現されるからである。また、図5の各種データは、サーバ530に記憶される場合は、各路側機を識別する識別情報と対応づけられて、路側機別に記憶される。   When the focal length adjustment system 300 is distributed and implemented in the roadside device 510 and the server 530, the various types of data in FIG. 5 may be stored in a storage device (that is, the RAM 532, the HDD 533, or a combination thereof) in the server 530. Good. This is because in this case, the server 530 implements the representative value calculation unit 302 and the focal length control unit 303 that use the data of FIG. 5 is stored in the server 530, is associated with identification information for identifying each roadside device, and is stored for each roadside device.

以下では説明の簡単化のため、焦点距離調整システム300が路側機410により実現される場合を例にして図5の各種データについて説明する。
集計テーブル群(set of aggregation tables)600は、N枚の集計テーブル601−1〜601−Nを含む(N>1)。集計テーブル群600には、代表値算出部302が代表値を算出するために使うデータが記憶される。
In the following, for simplification of description, various data in FIG. 5 will be described by taking as an example a case where the focal length adjustment system 300 is realized by the roadside device 410.
A set of aggregation tables 600 includes N aggregation tables 601-1 to 601-N (N> 1). The aggregation table group 600 stores data used by the representative value calculation unit 302 to calculate representative values.

より具体的には、各集計テーブル601−j(1≦j≦N)は、温度tに対応する。図5には、温度tが25℃の場合が図示されている。本実施形態では、温度tは−50℃であり、温度tは50℃である。 More specifically, each aggregation table 601-j (1 ≦ j ≦ N) corresponds to the temperature t j . FIG. 5 shows a case where the temperature t j is 25 ° C. In the present embodiment, the temperature t 1 is −50 ° C., and the temperature t N is 50 ° C.

また、本実施形態では、各j(1≦j<N)について、温度tj+1と温度tの差は1℃である。温度tに対応する集計テーブル601−jには、温度tを中心とする1℃の範囲に含まれる温度を温度検出装置320が検出したときに撮像装置310により撮像された画像に基づいて算出されたデータが記憶される。 In this embodiment, for each j (1 ≦ j <N), the difference between the temperature t j + 1 and the temperature t j is 1 ° C. The summary table 601-j corresponding to the temperature t j, based on the image captured by the imaging device 310 when the temperature detecting device 320 to a temperature comprised in the range of 1 ℃ around the temperature t j detects The calculated data is stored.

例えば、温度25℃に対応する集計テーブルには、24.5℃以上25.5℃未満の範囲の温度を温度検出装置320が検出したときに撮像装置310により撮像された画像中の特定領域に基づいて算出されたデータが記憶される。以下では説明の簡単化のため、例えば24.5℃以上25.5℃未満の範囲の温度を温度検出装置320が検出した場合のことを、単に「温度検出装置320が25℃という温度を検出した」などと表現することがある。   For example, in the aggregation table corresponding to the temperature of 25 ° C., a specific region in the image captured by the imaging device 310 when the temperature detection device 320 detects a temperature in the range of 24.5 ° C. or more and less than 25.5 ° C. Data calculated based on this is stored. In the following, for the sake of simplicity of explanation, for example, when the temperature detection device 320 detects a temperature in the range of 24.5 ° C. or more and less than 25.5 ° C., simply “the temperature detection device 320 detects a temperature of 25 ° C. It may be expressed as "

また、本実施形態の撮像装置310は焦点距離を可変に設定することができるタイプの撮像装置である。以下では説明の便宜上、「フォーカス位置」と呼ばれる256段階の離散値が、焦点距離の設定のために焦点距離制御部303から撮像装置310に与えられるものとする。撮像装置310は、与えられたフォーカス位置の値に応じて、フォーカスレンズ等のレンズを光軸方向に移動する。例えば、撮像装置310は、レンズを移動するためのステッピングモータに、与えられたフォーカス位置の値に応じた数のパルスを印加することで、フォーカス位置の値に応じてレンズを移動してもよい。   In addition, the imaging device 310 of the present embodiment is a type of imaging device that can variably set the focal length. Hereinafter, for convenience of explanation, it is assumed that 256-stage discrete values called “focus positions” are given from the focal length control unit 303 to the imaging device 310 for setting the focal length. The imaging device 310 moves a lens such as a focus lens in the optical axis direction in accordance with a given focus position value. For example, the imaging device 310 may move the lens according to the value of the focus position by applying a number of pulses corresponding to the value of the given focus position to a stepping motor for moving the lens. .

以下では、フォーカス位置を記号「f」により表記することがある。また、説明の便宜上、“0”というフォーカス位置が、撮像装置310に設定可能な焦点距離のうち、近距離側(ニア(near)側)の端点に対応するものとする。そして、“255”というフォーカス位置が、撮像装置310に設定可能な焦点距離のうち、遠距離側(ファー(far)側)の端点に対応するものとする。1枚の集計テーブル601−jは、各フォーカス位置f(0≦f≦255)に対応する行を含む。   Hereinafter, the focus position may be represented by the symbol “f”. Further, for convenience of explanation, it is assumed that the focus position “0” corresponds to the end point on the near distance side (near side) among the focal distances that can be set in the imaging apparatus 310. A focus position “255” corresponds to an end point on the far side (far side) of the focal lengths that can be set in the imaging apparatus 310. One tabulation table 601-j includes a row corresponding to each focus position f (0 ≦ f ≦ 255).

ところで、例えば図1の画像100中の特定領域101に写った特定文字パターンと、撮像装置310(より具体的には、例えば、撮像装置310のレンズ)との間の距離は、特定領域101の中心点のh座標とv座標から算出することができる。   By the way, for example, the distance between the specific character pattern reflected in the specific area 101 in the image 100 of FIG. 1 and the imaging device 310 (more specifically, for example, the lens of the imaging device 310) is the distance of the specific area 101. It can be calculated from the h coordinate and the v coordinate of the center point.

例えば、図2のカメラ205が、図3の撮像装置310(より具体的には図4のカメラ411またはカメラ511)として使われてもよい。この場合、カメラ205が設置された高さと、カメラ205の設置角θと、特定領域101の中心点のh座標・v座標から、特定領域101に写った特定文字パターンと撮像装置310との間の距離を算出することができる。   For example, the camera 205 in FIG. 2 may be used as the imaging device 310 in FIG. 3 (more specifically, the camera 411 or the camera 511 in FIG. 4). In this case, the distance between the specific character pattern captured in the specific area 101 and the imaging device 310 based on the height at which the camera 205 is installed, the installation angle θ of the camera 205, and the h and v coordinates of the center point of the specific area 101. Can be calculated.

本実施形態では、指標値算出部301が、指標値だけでなく、特定文字パターンと撮像装置310との間の距離も算出する。なお、距離の算出に使われる式は、公知の式でよい。   In the present embodiment, the index value calculation unit 301 calculates not only the index value but also the distance between the specific character pattern and the imaging device 310. The formula used for calculating the distance may be a known formula.

ところで、特定文字パターンが撮像装置310の撮像視野(例えば図2の撮像視野207)内にあるという条件下では、上記距離に最小値と最大値が存在することは明らかである。そこで、本実施形態では、上記距離の最小値から最大値までの範囲を複数の区間に分割し、各区間に番号を割り当て、この番号で上記距離を表すことにする。以下では、番号で表された上記距離を記号「d」により表記することがある。   By the way, it is clear that there is a minimum value and a maximum value in the distance under the condition that the specific character pattern is in the imaging field of view of the imaging device 310 (for example, the imaging field of view 207 in FIG. 2). Therefore, in the present embodiment, the range from the minimum value to the maximum value of the distance is divided into a plurality of sections, a number is assigned to each section, and the distance is represented by this number. Hereinafter, the distance represented by a number may be represented by a symbol “d”.

例えば、「ある特定文字パターンの距離dが“10”である」とは、「当該特定文字パターンと撮像装置310の間の距離が、10番の区間の範囲内に含まれる」ということを意味する。なお、各区間の大きさは、互いに等しくてもよいし、不均等でもよい。   For example, “the distance d of a certain specific character pattern is“ 10 ”” means that “the distance between the specific character pattern and the imaging device 310 is included in the range of the 10th section”. To do. In addition, the size of each section may be equal to each other, or may be unequal.

図5の例では、具体的には、特定文字パターンと撮像装置310の間の距離の最小値から最大値までの範囲が、0番から20番までの21個の区間に分割されている。なお、説明の便宜上、距離dが“0”のとき特定文字パターンが撮像装置310に最も近いものとし、距離dが“20”のとき特定文字パターンが撮像装置310から最も遠いものとする。   In the example of FIG. 5, specifically, the range from the minimum value to the maximum value of the distance between the specific character pattern and the imaging device 310 is divided into 21 sections from 0th to 20th. For convenience of explanation, it is assumed that the specific character pattern is the closest to the imaging device 310 when the distance d is “0”, and the specific character pattern is the farthest from the imaging device 310 when the distance d is “20”.

図5に示すように、集計テーブル601−jの各行は、“0”という距離dに対応するセルから、“20”という距離dに対応するセルまでの、21個のセルを含む。図5の例では、温度tに対応する集計テーブル601−jの、フォーカス位置fの行の距離dの列のセルに、2つの値aj,f,dとcj,f,dが記憶されている(1≦j≦N、0≦f≦255、0≦d≦20)。 As shown in FIG. 5, each row of the aggregation table 601-j includes 21 cells from a cell corresponding to a distance d of “0” to a cell corresponding to a distance d of “20”. In the example of FIG. 5, two values a j, f, d and c j, f, d are stored in the cell in the column of the distance d in the row of the focus position f in the aggregation table 601-j corresponding to the temperature t j. Stored (1 ≦ j ≦ N, 0 ≦ f ≦ 255, 0 ≦ d ≦ 20).

また、図5では、理解の助けとするために、フォーカス位置fが“128”の行には、具体的な数値の例が示されているが、これらの数値は単なる説明の便宜上の例である。
値cj,f,dは、撮像装置310から距離dの位置にあるときに「撮像装置310にフォーカス位置fが設定されていて、かつ、温度検出装置320が温度tを検出した」という条件下で撮像装置310により撮像されたことのある特定文字パターンの個数を示す。つまり、値cj,f,dは、今までの累計のサンプル数を示すカウンタ値である。よって、値cj,f,dの初期値は0である。
Further, in FIG. 5, in order to help understanding, specific numerical examples are shown in the row where the focus position f is “128”, but these numerical values are merely examples for convenience of explanation. is there.
The values c j, f, and d indicate that the focus position f is set in the imaging device 310 and the temperature detection device 320 has detected the temperature t j when it is at a distance d from the imaging device 310. The number of specific character patterns that have been imaged by the imaging device 310 under the conditions is shown. That is, the values c j, f, and d are counter values indicating the total number of samples so far. Therefore, the initial value of the values c j, f, d is 0.

また、値aj,f,dは、値cj,f,dが所定の閾値R以上の場合に算出され、値cj,f,dが閾値R未満の場合には初期値0に設定される。具体的には、値cj,f,dが閾値R以上の場合、値aj,f,dは、cj,f,d個の上記特定文字パターンのうち、撮像された時刻が新しい方からR個の特定文字パターンについて指標値算出部301が算出した指標値の、算術平均である。 The value a j, f, d is set, the value c j, f, d is calculated in the case of more than the predetermined threshold value R, the value c j, f, the initial value 0 if d is less than the threshold value R Is done. Specifically, when the value c j, f, d is equal to or greater than the threshold value R, the value a j, f, d is the newest imaged time among the c j, f, d specific character patterns. To the arithmetic average of the index values calculated by the index value calculation unit 301 for the R specific character patterns.

例えば、説明の便宜上R=50とする。図5の例では、集計テーブル601−jのフォーカス位置fが128の行の距離dが2の列のセルには、“90”と“110”という2つの値が記憶されている。これら2つの値は、次の(6a)と(6b)のことを示す。   For example, R = 50 is assumed for convenience of explanation. In the example of FIG. 5, two values “90” and “110” are stored in the cell of the column where the distance d is 2 in the row where the focus position f is 128 in the aggregation table 601-j. These two values indicate the following (6a) and (6b).

(6a)説明の便宜上、「撮像装置310にフォーカス位置fとして128が設定されていて、かつ、温度検出装置320が検出した温度が24.5度以上25.5℃未満」という条件を、「条件A」という。撮像装置310からの距離dが“2”の位置にあるときに条件Aで撮像された特定文字パターンは、今までで合計110個ある。
(6b)上記110個の特定文字パターンのうち、直近のR(=50)個(すなわち、撮像された時刻が新しい方から50個)について指標値算出部301が算出した指標値(すなわち、50個の指標値)の算術平均は、90である。
(6a) For convenience of explanation, the condition that “128 is set as the focus position f in the imaging device 310 and the temperature detected by the temperature detection device 320 is 24.5 ° C. or higher and lower than 25.5 ° C.” It is referred to as “condition A”. To date, there are a total of 110 specific character patterns that have been imaged under the condition A when the distance d from the imaging device 310 is at the position “2”.
(6b) The index value calculated by the index value calculation unit 301 for the latest R (= 50) (that is, 50 from the latest imaged time) among the 110 specific character patterns (that is, 50 The arithmetic average of the index values) is 90.

ところで、上記のような直近のR個の指標値の算術平均の計算のために、本実施形態では、各集計テーブル601−j(1≦j≦N)の各セルに対応して、直近のR個の指標値を記憶するためのリングバッファが使われる。各リングバッファのバッファサイズは、上記の閾値Rである。図5に例示したリングバッファ610は、集計テーブル601−jの、フォーカス位置fが“1”で距離dが“2”のセルに対応する。   By the way, in order to calculate the arithmetic average of the latest R index values as described above, in the present embodiment, the latest table corresponding to each cell of each aggregation table 601-j (1 ≦ j ≦ N) is used. A ring buffer for storing R index values is used. The buffer size of each ring buffer is the threshold value R described above. The ring buffer 610 illustrated in FIG. 5 corresponds to a cell in the aggregation table 601-j whose focus position f is “1” and distance d is “2”.

図5では、リングバッファ610中のR個の要素が、「rj,1,2,0」〜「rj,1,2,R−1」という記号で表されている。また、リングバッファ610のポインタ611は、図5では要素rj,1,2,kを指している(0≦k≦R−1)。 In FIG. 5, R elements in the ring buffer 610 are represented by symbols “r j, 1,2,0 ” to “r j, 1,2, R−1 ”. Further, the pointer 611 of the ring buffer 610 points to the element r j, 1,2, k in FIG. 5 (0 ≦ k ≦ R−1).

ここで、説明の便宜上、「撮像装置310にフォーカス位置fとして“1”が設定されていて、かつ、温度検出装置320が検出した温度が24.5度以上25.5℃未満」という条件を、「条件B」という。撮像装置310からの距離dが“2”の位置において次に何らかの特定文字パターンが条件Bのもとで撮像装置310により撮像されると、当該特定文字パターンの写った特定領域から算出される指標値は、ポインタ611の指す場所に記憶される。そして、ポインタ611はインクリメントされる。   Here, for convenience of explanation, the condition that “1” is set as the focus position f in the imaging device 310 and the temperature detected by the temperature detection device 320 is 24.5 ° C. or higher and lower than 25.5 ° C. is satisfied. "Condition B". When a certain character pattern is next imaged by the imaging device 310 under the condition B at a position where the distance d from the imaging device 310 is “2”, an index calculated from the specific region in which the specific character pattern is captured The value is stored at the location indicated by the pointer 611. The pointer 611 is incremented.

さて、図5にはさらにフォーカス位置テーブル620が例示されている。フォーカス位置テーブル620は、温度tと、温度tのときに撮像装置310に設定するフォーカス位置(以下、「設定フォーカス位置」ともいい、記号「fs」により表す)とを対応づける。   Now, FIG. 5 further illustrates a focus position table 620. The focus position table 620 associates the temperature t with a focus position (hereinafter, also referred to as “set focus position”, represented by the symbol “fs”) set in the imaging device 310 at the temperature t.

集計テーブル群600がN枚の集計テーブル601−1〜601−Nを含むのに対応して、フォーカス位置テーブル620は、N個のエントリを含む。各エントリに記憶される温度は、各集計テーブルに対応する温度である。例えば、上記のとおり本実施形態では、集計テーブル601−1に対応する温度tは−50℃であり、集計テーブル601−Nに対応する温度tは50℃である。よって、フォーカス位置テーブル620には、−50℃から50℃までの各温度t(1≦j≦N)に対応するエントリがある。 Corresponding to the aggregation table group 600 including N aggregation tables 601-1 to 601-N, the focus position table 620 includes N entries. The temperature stored in each entry is a temperature corresponding to each aggregation table. For example, as described above, in the present embodiment, the temperature t 1 corresponding to the aggregation table 601-1 is −50 ° C., and the temperature t N corresponding to the aggregation table 601 -N is 50 ° C. Therefore, the focus position table 620 has an entry corresponding to each temperature t j (1 ≦ j ≦ N) from −50 ° C. to 50 ° C.

フォーカス位置テーブル620の各エントリには、設定フォーカス位置fsのデフォルト値が予め記憶されるものとする。デフォルト値は、予備実験から適宜定められてもよいし、撮像装置310のレンズの材質などから算出されてもよい。   In each entry of the focus position table 620, a default value of the set focus position fs is stored in advance. The default value may be appropriately determined from a preliminary experiment, or may be calculated from the material of the lens of the imaging device 310 or the like.

各温度tに対応する設定フォーカス位置fsのデフォルト値は、温度tのときに撮像装置310の撮像視野のすべて(あるいは、なるべく広い範囲)が被写界深度の範囲内に収まるように決められることが好ましい。つまり、被写界深度に収まる範囲が図2の範囲208のようになるように、予備実験などから適宜のデフォルト値が定められることが好ましい。   The default value of the set focus position fs corresponding to each temperature t is determined so that all of the imaging field of view of the imaging apparatus 310 (or as wide a range as possible) is within the depth of field at the temperature t. Is preferred. That is, it is preferable that an appropriate default value is determined from a preliminary experiment or the like so that the range within the depth of field becomes the range 208 in FIG.

ただし、製造ばらつきなどの影響によって、同じモデルの複数の撮像装置310の間でも、適切な設定フォーカス位置が異なる可能性がある。例えば、たとえ2台の撮像装置310のポテンショメータの出力が同じ値を示していたとしても、ポテンショメータの抵抗値のばらつきの影響により、レンズの位置が2台の撮像装置310間では異なる。その結果、実際の合焦位置も2台の撮像装置310間では異なる。また、レンズ自体の製造ばらつきの影響もある。よって、ある撮像装置310にとって最適な設定フォーカス位置が、他の撮像装置310にとっても最適であるとは限らない。   However, an appropriate set focus position may be different among a plurality of imaging devices 310 of the same model due to the influence of manufacturing variations and the like. For example, even if the output of the potentiometers of the two image pickup devices 310 shows the same value, the lens position differs between the two image pickup devices 310 due to the influence of variations in the resistance values of the potentiometers. As a result, the actual in-focus position also differs between the two imaging devices 310. There is also the influence of manufacturing variations of the lens itself. Therefore, the set focus position that is optimal for a certain imaging device 310 is not necessarily optimal for other imaging devices 310.

また、1つの撮像装置310に関しても、撮像装置310の部品(例えばレンズ、ポテンショメータ、ギア、モータなど)が経時変化する可能性がある。よって、ある時点においては撮像装置310にとって最適な設定フォーカス位置も、別の時点においては最適でない。   Further, with respect to one imaging device 310, parts of the imaging device 310 (for example, a lens, a potentiometer, a gear, a motor, etc.) may change over time. Therefore, the set focus position that is optimal for the imaging apparatus 310 at one time is not optimal at another time.

したがって、フォーカス位置テーブル620の各エントリにおける設定フォーカス位置fsは、書き換え可能である。ある温度tの設定フォーカス位置fsとして、デフォルト値よりも適切な設定フォーカス位置fsが見つかった場合は、フォーカス位置テーブル620の設定フォーカス位置fsは書き換えられる。設定フォーカス位置fsの書き換えの詳細は、図9〜14とともに後述する。   Therefore, the set focus position fs in each entry of the focus position table 620 can be rewritten. When a set focus position fs more appropriate than the default value is found as the set focus position fs at a certain temperature t, the set focus position fs in the focus position table 620 is rewritten. Details of the rewriting of the set focus position fs will be described later with reference to FIGS.

図5にはさらに、前回温度データ630とチェック時刻データ640も例示されている。前回温度データ630は、焦点距離調整システム300が焦点距離の調整を前回試みたときの温度を示す。また、チェック時刻データ640は、焦点距離調整システム300が焦点距離の調整を前回試みたときの日時を示す。   FIG. 5 further illustrates previous temperature data 630 and check time data 640. The previous temperature data 630 indicates the temperature when the focal length adjustment system 300 last attempted adjustment of the focal length. Also, the check time data 640 indicates the date and time when the focal length adjustment system 300 tried to adjust the focal length last time.

なお、焦点距離調整システム300は、焦点距離の調整を試みた結果、撮像装置310に設定する設定フォーカス位置fsの値を変更することによって、実際に撮像装置310の焦点距離を調整することもある。あるいは、焦点距離調整システム300は、焦点距離の調整を試みた結果、調整不要と判断して、設定フォーカス位置fsを変更しないこともある。   The focal length adjustment system 300 may actually adjust the focal length of the imaging device 310 by changing the value of the set focus position fs set in the imaging device 310 as a result of attempting to adjust the focal length. . Alternatively, the focal distance adjustment system 300 may determine that adjustment is unnecessary as a result of trying to adjust the focal distance, and may not change the set focus position fs.

以下では説明の便宜上、前回温度データ630が示す温度を単に「前回の温度」ということがあり、前回の温度を記号「tp」で表すことがある。また、チェック時刻データ640が示す日時を単に「前回のチェック時刻」ということがあり、前回のチェック時刻を記号「ct」で表すことがある。   Hereinafter, for convenience of explanation, the temperature indicated by the previous temperature data 630 may be simply referred to as “previous temperature”, and the previous temperature may be represented by a symbol “tp”. In addition, the date and time indicated by the check time data 640 may be simply referred to as “previous check time”, and the previous check time may be represented by a symbol “ct”.

なお、焦点距離調整システム300の運用開始の際に、温度検出装置320の検出する温度が、前回の温度tpの初期値として記憶されるものとする。同様に、焦点距離調整システム300の運用開始の際の日時が、前回のチェック時刻ctの初期値として記憶されるものとする。   Note that when the operation of the focal length adjustment system 300 is started, the temperature detected by the temperature detection device 320 is stored as the initial value of the previous temperature tp. Similarly, it is assumed that the date and time when the operation of the focal length adjustment system 300 is started is stored as the initial value of the previous check time ct.

続いて、指標値算出部301による指標値の算出の具体例について、図6を参照して説明する。図1に関して説明したとおり、本実施形態の指標値は、以下の(7a)〜(7b)に基づく。   Subsequently, a specific example of calculation of an index value by the index value calculation unit 301 will be described with reference to FIG. As described with reference to FIG. 1, the index value of the present embodiment is based on the following (7a) to (7b).

(7a)サイズ変更前の元の特定領域画像(つまり、撮像装置310によって撮像された元の画像の特定領域を抽出することで得られる画像)における、エッジ強度。
(7b)基準サイズに拡大または縮小された特定領域画像から算出される、文字類似判定度。
(7a) Edge strength in the original specific area image before the size change (that is, an image obtained by extracting the specific area of the original image captured by the imaging device 310).
(7b) The character similarity determination degree calculated from the specific area image enlarged or reduced to the reference size.

以下では、図6に示したサイズ変更前の元の特定領域画像700と710を参照して、(7a)のエッジ強度の算出について説明する。また、サイズ変更後の特定領域画像720を参照して、(7b)の文字類似判定度の算出について説明する。そして、エッジ強度と文字類似判定度に基づく指標値の算出について説明する。   Hereinafter, with reference to the original specific area images 700 and 710 before the size change illustrated in FIG. 6, the calculation of the edge strength in (7a) will be described. Further, the calculation of the character similarity determination degree in (7b) will be described with reference to the specific area image 720 after the size change. Then, calculation of the index value based on the edge strength and the character similarity determination degree will be described.

特定文字パターンは、上記のとおり、複数の文字が所定の規則にしたがって配置されたパターンである。また、特定文字パターンは、複数の部分パターンを含んでもよい。各部分パターンは、特定文字パターン内の所定の位置に配置された、1文字以上の文字のパターンである。以下では説明の便宜上、特定領域画像において、各部分パターンが写っている領域のことを「文字領域」ともいう。   As described above, the specific character pattern is a pattern in which a plurality of characters are arranged according to a predetermined rule. The specific character pattern may include a plurality of partial patterns. Each partial pattern is a pattern of one or more characters arranged at a predetermined position in the specific character pattern. Hereinafter, for convenience of explanation, a region in which each partial pattern is reflected in the specific region image is also referred to as a “character region”.

例えば、図6の特定領域画像700は、4つの部分パターンに対応する4つの文字領域701〜704を含む。同様に、特定領域画像710は、4つの部分パターンに対応する4つの文字領域711〜714を含む。   For example, the specific area image 700 in FIG. 6 includes four character areas 701 to 704 corresponding to four partial patterns. Similarly, the specific area image 710 includes four character areas 711 to 714 corresponding to four partial patterns.

文字領域701と711は、特定文字パターンの左上の領域の部分パターンに対応する。文字領域702と712は、特定文字パターンの右上の領域の部分パターンに対応する。文字領域703と713は、特定文字パターンの左下の領域の部分パターンに対応する。文字領域704と714は、特定文字パターンの右下の領域の部分パターンに対応する。   Character areas 701 and 711 correspond to partial patterns in the upper left area of the specific character pattern. Character areas 702 and 712 correspond to the partial pattern in the upper right area of the specific character pattern. Character areas 703 and 713 correspond to partial patterns in the lower left area of the specific character pattern. Character areas 704 and 714 correspond to partial patterns in the lower right area of the specific character pattern.

本実施形態では、指標値算出部301が、各文字領域について当該文字領域内のエッジ強度を算出する。例えば、指標値算出部301は、式(1)にしたがってエッジ強度を算出してもよい。
In the present embodiment, the index value calculation unit 301 calculates the edge strength in the character area for each character area. For example, the index value calculation unit 301 may calculate the edge strength according to Expression (1).

式(1)における記号「A」は、エッジ強度を算出する対象の文字領域を表し、関数「edge(A)」は、文字領域A内のエッジ強度を表す。また、式(1)における記号「bpp」は、1画素あたりのビット数(bits per pixel)、すなわちビット深度を示す。値bppは、撮像装置310の仕様により決まる定数である。式(1)における記号「Const」は適宜の定数である。例えば、Const=2bpp・100の場合、ビット深度によらず100点満点に正規化されたエッジ強度が得られる。もちろん、実施形態によっては、定数Constが使われなくてもよいし、2bppによる除算が行われなくてもよい。   The symbol “A” in the expression (1) represents a character region whose edge strength is to be calculated, and the function “edge (A)” represents the edge strength in the character region A. In addition, the symbol “bpp” in Equation (1) indicates the number of bits per pixel (bits per pixel), that is, the bit depth. The value bpp is a constant determined by the specification of the imaging device 310. The symbol “Const” in Equation (1) is an appropriate constant. For example, in the case of Const = 2bpp · 100, the edge strength normalized to 100 points is obtained regardless of the bit depth. Of course, depending on the embodiment, the constant Const may not be used, and the division by 2 bpp may not be performed.

式(1)における関数「diff(A)」は、式(2)のように定義される。
The function “diff (A)” in Expression (1) is defined as Expression (2).

式(2)における関数「V(A)」は、文字領域Aのv軸方向の長さを示す。また、式(2)における関数「H(A)」は、文字領域Aのh軸方向の長さを示す。式(2)における関数「p(A,h,v)」は、文字領域A内の左上隅を原点として座標(h,v)に位置する画素の値を表す。なお、本実施形態では、説明の簡単化のため、カラー画像ではなくグレースケールの輝度画像が使われるものとする。したがって、関数p(A,h,v)が表す画素値は、具体的には輝度(つまりグレイレベル)である。   The function “V (A)” in Expression (2) indicates the length of the character region A in the v-axis direction. Further, the function “H (A)” in Expression (2) indicates the length of the character region A in the h-axis direction. The function “p (A, h, v)” in Expression (2) represents the value of a pixel located at coordinates (h, v) with the upper left corner in the character area A as the origin. In this embodiment, it is assumed that a grayscale luminance image is used instead of a color image for the sake of simplicity. Therefore, the pixel value represented by the function p (A, h, v) is specifically luminance (that is, gray level).

また、式(2)における関数「g(p)」は、式(3)のように定義される関数である。
Further, the function “g 1 (p)” in Expression (2) is a function defined as Expression (3).

式(3)における記号「α」は、閾値として使われる所定の正の定数である。閾値αを利用することで、例えば、「ノイズの影響を低減する」などの効果が得られる。閾値αは、特定文字パターンにおける背景色と文字の色などに基づいて、適宜定められているものとする。   The symbol “α” in Equation (3) is a predetermined positive constant used as a threshold value. By using the threshold value α, for example, an effect such as “reducing the influence of noise” can be obtained. It is assumed that the threshold α is appropriately determined based on the background color and the character color in the specific character pattern.

以上をまとめると、式(2)は、次の(8a)〜(8c)のことを表す。   Summarizing the above, equation (2) represents the following (8a) to (8c).

(8a)指標値算出部301は、文字領域A内でh軸方向に隣接する2画素の各ペアについて、当該2画素間の画素値の絶対差を算出する。そして、指標値算出部301は、閾値α以上の絶対差を累積加算する。
(8b)指標値算出部301は、文字領域A内でv軸方向に隣接する2画素の各ペアについて、当該2画素間の画素値の絶対差を算出する。そして、指標値算出部301は、閾値α以上の絶対差を累積加算する。
(8c)指標値算出部301は、diff(A)の値として、上記(8a)の累積加算の結果と、上記(8b)の累積加算の結果の和を算出する。
(8a) The index value calculation unit 301 calculates, for each pair of two pixels adjacent in the h-axis direction in the character area A, an absolute difference in pixel value between the two pixels. Then, the index value calculation unit 301 cumulatively adds absolute differences that are equal to or greater than the threshold value α.
(8b) The index value calculation unit 301 calculates, for each pair of two pixels adjacent in the v-axis direction within the character area A, an absolute difference in pixel value between the two pixels. Then, the index value calculation unit 301 cumulatively adds absolute differences that are equal to or greater than the threshold value α.
(8c) The index value calculation unit 301 calculates the sum of the result of the cumulative addition in (8a) and the result of the cumulative addition in (8b) as the value of diff (A).

そして、式(1)における関数「num(A)」は、式(4)のように定義される。式(4)は、式(2)における関数「g(p)」を式(5)の関数「g(p)」に置き換えたものである。
The function “num (A)” in the equation (1) is defined as the equation (4). Expression (4) is obtained by replacing the function “g 1 (p)” in Expression ( 2 ) with the function “g 2 (p)” in Expression (5).

したがって、式(4)は、次の(9a)〜(9c)のことを示す。   Therefore, Formula (4) shows the following (9a)-(9c).

(9a)指標値算出部301は、文字領域A内でh軸方向に隣接する2画素間の画素値の絶対差が閾値α以上である箇所の数を数える。
(9b)指標値算出部301は、文字領域A内でv軸方向に隣接する2画素間の画素値の絶対差が閾値α以上である箇所の数も数える。
(9c)指標値算出部301は、num(A)の値として、上記(9a)で数えた結果と、上記(9b)で数えた結果の和を算出する。
(9a) The index value calculation unit 301 counts the number of locations in the character region A where the absolute difference in pixel value between two pixels adjacent in the h-axis direction is equal to or greater than the threshold value α.
(9b) The index value calculation unit 301 also counts the number of locations in the character region A where the absolute difference in pixel value between two pixels adjacent in the v-axis direction is greater than or equal to the threshold value α.
(9c) The index value calculation unit 301 calculates the sum of the result counted in (9a) above and the result counted in (9b) above as the value of num (A).

以上の式(2)〜(5)によれば、h軸方向またはv軸方向に隣接する2画素間の画素値の絶対差が閾値αである箇所における、2画素間の画素値の絶対差の算術平均は、「diff(A)/num(A)」と表すことができる。つまり、式(1)のエッジ強度(A)は、「diff(A)/num(A)」と表される上記算術平均の定数倍の値である。   According to the above formulas (2) to (5), the absolute difference in pixel value between two pixels at a location where the absolute difference in pixel value between two pixels adjacent in the h-axis direction or v-axis direction is the threshold value α. Can be expressed as “diff (A) / num (A)”. That is, the edge strength (A) in the equation (1) is a value that is a constant multiple of the arithmetic average expressed as “diff (A) / num (A)”.

図6の例では、特定領域画像700の方が特定領域画像710よりも鮮明である。よって、同じ1つの部分パターンに対応する文字領域同士を、特定領域画像700と710の間で比較すると、特定領域画像700内の文字領域におけるエッジ強度の方が、特定領域画像710内の文字領域におけるエッジ強度より強い。   In the example of FIG. 6, the specific area image 700 is clearer than the specific area image 710. Therefore, when character areas corresponding to the same one partial pattern are compared between the specific area images 700 and 710, the edge strength in the character area in the specific area image 700 is the character area in the specific area image 710. It is stronger than the edge strength.

例えば、文字領域701のエッジ強度の方が文字領域711のエッジ強度より強く、文字領域702のエッジ強度の方が文字領域712のエッジ強度より強い。同様に、文字領域703のエッジ強度の方が文字領域713のエッジ強度より強く、文字領域704のエッジ強度の方が文字領域714のエッジ強度より強い。   For example, the edge strength of the character region 701 is stronger than the edge strength of the character region 711, and the edge strength of the character region 702 is stronger than the edge strength of the character region 712. Similarly, the edge strength of the character region 703 is stronger than the edge strength of the character region 713, and the edge strength of the character region 704 is stronger than the edge strength of the character region 714.

ところで、上記のとおり、各特定領域画像は、基準サイズに拡大または縮小される。そして、サイズ変更後の特定領域画像がパターンマッチングに使われる。図6の特定領域画像720は、基準サイズに変更された特定領域画像の一例である。パターンマッチングのアルゴリズムは任意であってよいが、本実施形態では、文字領域ごとに当該文字領域内で使われ得る各文字または当該文字領域内で使われ得る各文字列のテンプレート画像が予め用意されているものとする。また、本実施形態では、文字領域ごとに文字類似判定度が算出されるものとする。   By the way, as described above, each specific area image is enlarged or reduced to the reference size. Then, the specific area image after the size change is used for pattern matching. The specific area image 720 in FIG. 6 is an example of the specific area image changed to the reference size. The pattern matching algorithm may be arbitrary, but in this embodiment, a template image of each character that can be used in the character region or each character string that can be used in the character region is prepared in advance for each character region. It shall be. In the present embodiment, the character similarity determination degree is calculated for each character area.

なお、本実施形態では、指標値算出部301がパターンマッチングによる画像認識処理も行うものとする。例えば、指標値算出部301は、画像認識処理を行う不図示の画像認識部を含んでいてもよい。   In this embodiment, it is assumed that the index value calculation unit 301 also performs image recognition processing by pattern matching. For example, the index value calculation unit 301 may include an image recognition unit (not shown) that performs image recognition processing.

実施形態によっては、指標値算出部301の外部に、画像認識処理を行う不図示の画像認識部があってもよい。その場合、画像認識部は、画像認識処理の結果(すなわち文字類似判定度)を指標値算出部301に出力する。   Depending on the embodiment, an image recognition unit (not shown) that performs image recognition processing may be provided outside the index value calculation unit 301. In that case, the image recognition unit outputs the result of the image recognition processing (that is, the character similarity determination degree) to the index value calculation unit 301.

指標値算出部301の内部または外部にある画像認識部は、例えば、図4のCPU413により実現されてもよく、CPU513により実現されてもよく、画像処理用の不図示のASIC(Application Specific Integrated Circuit)などのハードウェア回路により実現されてもよい。   The image recognition unit inside or outside the index value calculation unit 301 may be realized by, for example, the CPU 413 in FIG. 4 or may be realized by the CPU 513, and an ASIC (Application Specific Integrated Circuit) (not shown) for image processing. ) Etc. may be realized.

例えば、特定文字パターンの左上の部分パターン用に、各々が文字列全体を表す複数のテンプレート画像が予め用意されていてもよい。本実施形態では、指標値算出部301がこれらのテンプレート画像を用いて、サイズ変更後の特定領域画像720の左上の文字領域721について文字類似判定度を算出する。   For example, a plurality of template images each representing the entire character string may be prepared in advance for the upper left partial pattern of the specific character pattern. In the present embodiment, the index value calculation unit 301 uses these template images to calculate a character similarity determination degree for the upper left character region 721 of the specific region image 720 after the size change.

また、特定文字パターンの右上の部分パターン用に、各々が1文字を表す複数のテンプレート画像が予め用意されていてもよい。本実施形態では、指標値算出部301がこれらのテンプレート画像を用いて、サイズ変更後の特定領域画像720の右上の文字領域722について文字類似判定度を算出する。   A plurality of template images each representing one character may be prepared in advance for the partial pattern on the upper right of the specific character pattern. In the present embodiment, the index value calculation unit 301 uses these template images to calculate the character similarity determination degree for the character region 722 at the upper right of the specific region image 720 after the size change.

同様に、特定文字パターンの左下の部分パターン用に、各々が1文字を表す複数のテンプレート画像が予め用意されていてもよい。本実施形態では、指標値算出部301がこれらのテンプレート画像を用いて、サイズ変更後の特定領域画像720の左下の文字領域723について文字類似判定度を算出する。   Similarly, a plurality of template images each representing one character may be prepared in advance for the lower left partial pattern of the specific character pattern. In the present embodiment, the index value calculation unit 301 uses these template images to calculate the character similarity determination degree for the lower left character region 723 of the specific region image 720 after the size change.

また、特定文字パターンの右下の部分パターン用に、各々が1文字を表す複数のテンプレート画像が予め用意されていてもよい。本実施形態では、指標値算出部301がこれらのテンプレート画像を用いて、サイズ変更後の特定領域画像720の右下の文字領域724について文字類似判定度を算出する。   A plurality of template images each representing one character may be prepared in advance for the lower right partial pattern of the specific character pattern. In this embodiment, the index value calculation unit 301 uses these template images to calculate the character similarity determination degree for the character region 724 at the lower right of the specific region image 720 after the size change.

以下では、文字領域Aについて算出される文字類似判定度を「sim(A)」とも表記する。指標値算出部301は、1枚の特定領域画像内の各文字領域について算出したエッジ強度edge(A)と文字類似判定度sim(A)を用いて、当該特定領域画像についての指標値を算出する。特定領域画像についての指標値は、換言すれば、当該特定領域画像に写った特定文字パターンについての指標値であり、上記のとおり、「特定文字パターンがどの程度画像認識処理に適した状態で画像に写っているのか」という適合度を示す。   Hereinafter, the character similarity determination degree calculated for the character area A is also expressed as “sim (A)”. The index value calculation unit 301 calculates an index value for the specific area image using the edge strength edge (A) and the character similarity determination degree sim (A) calculated for each character area in one specific area image. To do. In other words, the index value for the specific area image is the index value for the specific character pattern captured in the specific area image, and as described above, “how much the specific character pattern is suitable for image recognition processing” "Is it reflected in?"

指標値算出部301は、エッジ強度に対して単調増加するとともに文字類似判定度に対しても単調増加するような適宜の関数を用いて、指標値を算出することができる。例えば、指標値は、式(6)にしたがって算出されてもよい。   The index value calculation unit 301 can calculate the index value using an appropriate function that monotonously increases with respect to the edge strength and also monotonously increases with respect to the character similarity determination degree. For example, the index value may be calculated according to Equation (6).

式(6)における記号「I」は、指標値を算出する対象の特定領域画像を表し、関数「idx(I)」は、特定領域画像Iについての指標値を表す。また、式(6)における集合「Char(I)」は、特定領域画像Iに含まれる文字領域の集合を表す。例えば、画像Iが図6の特定領域画像710である場合、集合Char(I)は、4つの文字領域711〜714を含む。   The symbol “I” in Expression (6) represents a specific area image whose index value is to be calculated, and the function “idx (I)” represents an index value for the specific area image I. In addition, the set “Char (I)” in Expression (6) represents a set of character areas included in the specific area image I. For example, when the image I is the specific area image 710 in FIG. 6, the set Char (I) includes four character areas 711 to 714.

もちろん、実施形態によっては、指標値算出部301は、式(6)とは異なる式にしたがって指標値を算出してもよい。例えば、指標値算出部301は、式(7)にしたがって指標値を算出してもよい。
Of course, depending on the embodiment, the index value calculation unit 301 may calculate the index value according to an equation different from the equation (6). For example, the index value calculation unit 301 may calculate the index value according to Equation (7).

式(7)の指標値idx(I)は、適宜の正の係数βとγを用いて定義される。式(7)の指標値idx(I)も、エッジ強度に対して単調増加するとともに、文字類似判定度に対しても単調増加する。   The index value idx (I) in Expression (7) is defined using appropriate positive coefficients β and γ. The index value idx (I) in Expression (7) also monotonously increases with respect to the edge strength and also monotonously increases with respect to the character similarity determination degree.

続いて、焦点距離調整システム300が路側機410により実現される場合を例として、図7〜14を参照しながら、焦点距離調整システム300による焦点距離の調整の詳細を説明する。なお、先に図7〜13のフローチャートについて説明し、その後、図14を参照して、これらのフローチャートにしたがって焦点距離がどのように変更されるのかについて説明する。   Next, the details of the adjustment of the focal length by the focal length adjustment system 300 will be described with reference to FIGS. 7 to 14, taking as an example the case where the focal length adjustment system 300 is realized by the roadside device 410. The flowcharts of FIGS. 7 to 13 will be described first, and then how the focal length is changed according to these flowcharts will be described with reference to FIG.

図7〜8は、動的調整処理のフローチャートである。例えば以下の(10a)〜(10c)などの予備的作業が終了した後に、路側機410が動的調整処理を開始する。   7 to 8 are flowcharts of the dynamic adjustment process. For example, after the preliminary work such as the following (10a) to (10c) is completed, the roadside device 410 starts the dynamic adjustment process.

(10a)撮像装置310の取り付け(例えば、支柱へのカメラ411の取り付け)。
(10b)図5の各種データの初期化。なお、各種データの初期値については説明したとおりである。
(10c)撮像装置310(つまりカメラ411)へのフォーカス位置の設定。
(10a) Attachment of the imaging device 310 (for example, attachment of the camera 411 to the support).
(10b) Initialization of various data in FIG. The initial values of various data are as described above.
(10c) Setting of the focus position to the imaging device 310 (that is, the camera 411).

なお、(10c)の設定は、自動的に行われてもよいし、手動または半手動で行われてもよい。例えば、温度検出装置320により検出される温度tに対応してフォーカス位置テーブル620に記憶されている設定フォーカス位置fsのデフォルト値を、焦点距離制御部303が自動的に撮像装置310に設定してもよい。   The setting of (10c) may be performed automatically, or may be performed manually or semi-manually. For example, the focal length control unit 303 automatically sets the default value of the set focus position fs stored in the focus position table 620 corresponding to the temperature t detected by the temperature detection device 320 in the imaging device 310. Also good.

あるいは、作業員が、撮像装置310により撮像される画像を見ながら、手動でフォーカス位置を撮像装置310に設定してもよい。作業員はさらに、フォーカス位置テーブル620の温度tのエントリに、撮像装置310に設定した値を書き込むための操作(例えば、路側機410が有する不図示の入力装置からの入力)を行う。もちろん、作業員によって手動で設定されたフォーカス位置を、焦点距離調整システム300が撮像装置310から読み取って、焦点距離調整システム300が自動的にフォーカス位置テーブル620を更新してもよい。   Alternatively, the worker may manually set the focus position on the imaging device 310 while viewing an image captured by the imaging device 310. The worker further performs an operation (for example, input from an input device (not shown) included in the roadside device 410) to write a value set in the imaging device 310 to the entry of the temperature t in the focus position table 620. Of course, the focal position adjustment system 300 may read the focus position manually set by the worker from the imaging device 310, and the focal distance adjustment system 300 may automatically update the focus position table 620.

概要を先に説明すると、本実施形態による図7〜8の動的調整処理は、下記(11a)と(11b)の2種類の処理を含む。   The outline will be described first. The dynamic adjustment processing of FIGS. 7 to 8 according to the present embodiment includes the following two types of processing (11a) and (11b).

(11a)特定文字パターンが検出されるたびに、フォーカス位置を撮像装置310に再設定するか否かを指標値に基づいて決定し、場合に応じて新たなフォーカス位置を撮像装置310に設定しなおす処理。具体的には、図7〜8のステップS111〜S124、S126、S127の処理。
(11b)特定文字パターンが検出されなくても、温度の変化に応じてフォーカス位置を撮像装置310に設定しなおす処理。具体的には、図7のステップS106〜S110の処理。
(11a) Each time a specific character pattern is detected, whether or not to reset the focus position to the imaging apparatus 310 is determined based on the index value, and a new focus position is set to the imaging apparatus 310 according to the case. Correction process. Specifically, the processes of steps S111 to S124, S126, and S127 of FIGS.
(11b) A process of resetting the focus position in the imaging device 310 according to a change in temperature even if the specific character pattern is not detected. Specifically, the processing of steps S106 to S110 in FIG.

以下、図7〜8の動的調整処理について詳しく説明する。
ステップS101で撮像装置310が撮像を行う。例えば、ステップS101では1枚のフレーム画像が撮像される。例えば、調整手順制御部304は、撮像のタイミングを通知するための同期信号を撮像装置310に出力してもよい。撮像された画像のデータは、例えばカメラ411からRAM414に出力されてもよい。
Hereinafter, the dynamic adjustment process of FIGS. 7 to 8 will be described in detail.
In step S101, the imaging apparatus 310 performs imaging. For example, in step S101, one frame image is captured. For example, the adjustment procedure control unit 304 may output a synchronization signal for notifying the imaging timing to the imaging device 310. Data of the captured image may be output from the camera 411 to the RAM 414, for example.

次に、ステップS102で調整手順制御部304は、温度検出装置320から現在の温度を取得する。以下では説明の便宜上、ステップS102で取得された温度を「t」とする。なお、図5に関して説明したように、例えば温度検出装置320が「24.7℃」という温度を出力する場合、24.5≦24.7<25.5なので、ステップS102で調整手順制御部304は、「25℃」という温度を取得する。   Next, in step S <b> 102, the adjustment procedure control unit 304 acquires the current temperature from the temperature detection device 320. Hereinafter, for convenience of explanation, the temperature acquired in step S102 is assumed to be “t”. As described with reference to FIG. 5, for example, when the temperature detection device 320 outputs a temperature of “24.7 ° C.”, since 24.5 ≦ 24.7 <25.5, the adjustment procedure control unit 304 in step S102. Obtains a temperature of “25 ° C.”.

さらに、ステップS103で調整手順制御部304は、撮像装置310(つまりカメラ411)に現在設定されているフォーカス位置を取得する。撮像装置310に現在設定されているフォーカス位置は、換言すれば、フォーカス位置テーブル620の温度tのエントリに記憶されている設定フォーカス位置fsである。よって、調整手順制御部304は、フォーカス位置テーブル620を参照することで、撮像装置310に現在設定されているフォーカス位置を取得してもよい。もちろん、調整手順制御部304は、撮像装置310に現在設定されているフォーカス位置を撮像装置310から読み取ってもよい。以下では説明の便宜上、ステップS103で取得されたフォーカス位置を「f」とする。   In step S103, the adjustment procedure control unit 304 acquires the focus position currently set in the imaging device 310 (that is, the camera 411). In other words, the focus position currently set in the imaging device 310 is the set focus position fs stored in the entry of temperature t in the focus position table 620. Therefore, the adjustment procedure control unit 304 may acquire the focus position currently set in the imaging device 310 by referring to the focus position table 620. Of course, the adjustment procedure control unit 304 may read the focus position currently set in the imaging device 310 from the imaging device 310. Hereinafter, for convenience of explanation, the focus position acquired in step S103 is assumed to be “f”.

ところで、上記のとおり本実施形態では指標値算出部301が画像認識部を有する。画像認識部は、パターンマッチングによる画像認識処理だけでなく、特定領域を抽出する処理など、その他の画像処理も行う。   Incidentally, as described above, in the present embodiment, the index value calculation unit 301 includes an image recognition unit. The image recognition unit performs not only image recognition processing by pattern matching but also other image processing such as processing for extracting a specific region.

よって、本実施形態では、次のステップS104において、指標値算出部301が、撮像された画像から特定領域を抽出する。より正確には、指標値算出部301は、特定領域の抽出を試みる。以下では説明の便宜上、撮像された画像から抽出された特定領域の数を「M」とする。   Therefore, in the present embodiment, in the next step S104, the index value calculation unit 301 extracts a specific region from the captured image. More precisely, the index value calculation unit 301 tries to extract a specific area. Hereinafter, for convenience of explanation, the number of specific regions extracted from the captured image is “M”.

1つ以上の特定領域の抽出に成功した場合、指標値算出部301は、撮像された画像のデータから各特定領域の部分のデータをコピーすることで、各特定領域に対応する特定領域画像のデータを生成してもよい。そして、指標値算出部301は、特定領域画像のデータをRAM414に記憶してもよい。   If the extraction of one or more specific areas is successful, the index value calculation unit 301 copies the data of the specific area portion from the captured image data, thereby obtaining the specific area image corresponding to each specific area. Data may be generated. Then, the index value calculation unit 301 may store the data of the specific area image in the RAM 414.

例えば、特定文字パターンは、特定の大きさの矩形内のパターンであってもよい。特定領域を抽出する処理は、例えばエッジ抽出処理によって、特定文字パターンの矩形の輪郭の候補を探す処理を含んでいてもよい。   For example, the specific character pattern may be a pattern in a rectangle having a specific size. The process of extracting the specific area may include a process of searching for a rectangular outline candidate of the specific character pattern, for example, by an edge extraction process.

例えば、特定文字パターンの矩形の水平方向の辺が、撮像された画像のh軸にほぼ平行になるように、撮像装置310が適切な角度で設置されていることが好ましい。この場合、特定領域を抽出する処理は、例えば、h軸にほぼ平行なエッジ(例えば、h軸との間でなす角が、−5°以上かつ5°以下であるようなエッジ)を探す処理を含んでもよい。   For example, the imaging device 310 is preferably installed at an appropriate angle so that the horizontal side of the rectangle of the specific character pattern is substantially parallel to the h-axis of the captured image. In this case, the process of extracting the specific region is, for example, a process of searching for an edge substantially parallel to the h axis (for example, an edge whose angle with the h axis is −5 ° or more and 5 ° or less). May be included.

たまたま移動物体が撮像装置310の撮像視野内に存在しないこともあるので、ステップS104で抽出される特定領域の数Mは、0のこともあり得る。もちろん、特定領域の数Mは、1の場合もあり得るし、2以上の場合もあり得る。   Since the moving object may not be present in the imaging field of view of the imaging apparatus 310, the number M of the specific areas extracted in step S104 may be zero. Of course, the number M of the specific regions may be 1 or may be 2 or more.

そこで、ステップS105で調整手順制御部304は、特定領域画像の数Mが0より大きいか否かを判断する。そして、M=0の場合、動的調整処理はステップS106へと移行し、M>0の場合、動的調整処理はステップS111へと移行する。   Therefore, in step S105, the adjustment procedure control unit 304 determines whether the number M of specific area images is greater than zero. When M = 0, the dynamic adjustment process moves to step S106, and when M> 0, the dynamic adjustment process moves to step S111.

ステップS106で調整手順制御部304は、チェック時刻データ640を参照し、前回のチェック時刻ctから現在までの経過時間が、決められた閾値以上であるか否かを判断する。当該閾値は、例えば、数秒程度であってもよいし、数分程度であってもよい。   In step S106, the adjustment procedure control unit 304 refers to the check time data 640 and determines whether or not the elapsed time from the previous check time ct to the current time is equal to or greater than a predetermined threshold. The threshold value may be, for example, about several seconds or about several minutes.

前回のチェック時刻ctからの経過時間が閾値以上の場合、動的調整処理はステップS107に移行する。逆に、前回のチェック時刻ctからの経過時間が閾値未満の場合、動的調整処理はステップS125に移行する。   If the elapsed time from the previous check time ct is greater than or equal to the threshold, the dynamic adjustment process proceeds to step S107. On the other hand, if the elapsed time from the previous check time ct is less than the threshold, the dynamic adjustment process proceeds to step S125.

ステップS107で調整手順制御部304は、前回のチェック時刻ctとして現在時刻を記憶する。つまり、調整手順制御部304は、チェック時刻データ640を現在時刻で上書きする。   In step S107, the adjustment procedure control unit 304 stores the current time as the previous check time ct. That is, the adjustment procedure control unit 304 overwrites the check time data 640 with the current time.

次に、ステップS108で調整手順制御部304は、前回温度データ630として記憶されている前回の温度tpが、ステップS102で取得した温度tと等しいか否かを判定する。2つの温度が異なる場合、動的調整処理はステップS109に移行する。逆に、2つの温度が等しい場合、動的調整処理はステップS125に移行する。   Next, in step S108, the adjustment procedure control unit 304 determines whether or not the previous temperature tp stored as the previous temperature data 630 is equal to the temperature t acquired in step S102. If the two temperatures are different, the dynamic adjustment process proceeds to step S109. Conversely, when the two temperatures are equal, the dynamic adjustment process proceeds to step S125.

ステップS109で調整手順制御部304は、前回の温度tpとして温度tを記憶する。つまり、調整手順制御部304は、前回温度データ630を、ステップS102で取得した温度tで上書きする。   In step S109, the adjustment procedure control unit 304 stores the temperature t as the previous temperature tp. That is, the adjustment procedure control unit 304 overwrites the previous temperature data 630 with the temperature t acquired in step S102.

次に、ステップS110で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを読み取る。そして、焦点距離制御部303は、読み取った設定フォーカス位置fsの値を撮像装置310に設定する。   Next, in step S110, the focal length control unit 303 reads the set focus position fs corresponding to the temperature t in the focus position table 620. Then, the focal length control unit 303 sets the read value of the set focus position fs in the imaging device 310.

具体的には、焦点距離制御部303は、読み取った設定フォーカス位置fsの値を撮像装置310に設定するための適宜のフォーマットの制御情報を生成し、生成した制御情報を撮像装置310に出力する。その結果、撮像装置310には、焦点距離制御部303が読み取った設定フォーカス位置fsが設定される。その後、動的調整処理はステップS125へと移行する。   Specifically, the focal length control unit 303 generates control information in an appropriate format for setting the read value of the set focus position fs in the imaging apparatus 310, and outputs the generated control information to the imaging apparatus 310. . As a result, the set focus position fs read by the focal length control unit 303 is set in the imaging device 310. Thereafter, the dynamic adjustment process proceeds to step S125.

さて、ステップS111で調整手順制御部304は、抽出されたM個の特定領域を順に処理するためのループ変数を0に初期化する。以下では説明の便宜上、ループ変数を「i」とする。また、説明の便宜上、i番目の特定領域から得られた特定領域画像を「i番目の特定領域画像」といい、i番目の特定領域に写っている特定文字パターンを「i番目の特定文字パターン」という。   In step S111, the adjustment procedure control unit 304 initializes a loop variable for sequentially processing the extracted M specific areas to 0. In the following, for convenience of explanation, the loop variable is “i”. For convenience of explanation, the specific area image obtained from the i-th specific area is referred to as “i-th specific area image”, and the specific character pattern reflected in the i-th specific area is referred to as “i-th specific character pattern”. "

次に、ステップS112で指標値算出部301は、ステップS101で撮像された画像内における、i番目の特定領域の位置に基づいて、i番目の特定文字パターンと撮像装置310の距離を算出する。以下では説明の便宜上、算出された距離を「d」とする。図5の集計テーブル601−jに関して説明したとおり、本実施形態では、“0”から“20”までのいずれかの番号で表される距離dが算出される。   Next, in step S112, the index value calculation unit 301 calculates the distance between the i-th specific character pattern and the imaging device 310 based on the position of the i-th specific region in the image captured in step S101. Hereinafter, for convenience of explanation, the calculated distance is assumed to be “d”. As described with reference to the aggregation table 601-j in FIG. 5, in the present embodiment, the distance d represented by any number from “0” to “20” is calculated.

また、ステップS113で指標値算出部301は、i番目の特定領域画像内の各文字領域におけるエッジ強度を算出する。指標値算出部301は、例えば、式(1)〜(5)とともに上述した方法により、エッジ強度を算出してもよい。例えば、i番目の特定領域画像が図6の特定領域画像700である場合、指標値算出部301は、文字領域701〜704それぞれのエッジ強度を算出する。   In step S113, the index value calculation unit 301 calculates the edge strength in each character area in the i-th specific area image. For example, the index value calculation unit 301 may calculate the edge strength by the method described above together with the equations (1) to (5). For example, when the i-th specific area image is the specific area image 700 of FIG. 6, the index value calculation unit 301 calculates the edge strength of each of the character areas 701 to 704.

さらに、ステップS114で指標値算出部301は、i番目の特定領域画像を拡大または縮小して基準サイズにする。
そして、次のステップS115で指標値算出部301は、サイズ変更したi番目の特定領域画像中の各文字領域における文字類似判定度を算出する。例えば、サイズ変更したi番目の特定領域画像が図6の特定領域画像720である場合、指標値算出部301は、テンプレート画像を用いたパターンマッチングにより、文字領域721〜724それぞれの文字類似判定度を算出する。
Further, in step S114, the index value calculation unit 301 enlarges or reduces the i-th specific area image to obtain a reference size.
In the next step S115, the index value calculation unit 301 calculates the character similarity determination degree in each character region in the i-th specific region image whose size has been changed. For example, when the i-th specific area image whose size has been changed is the specific area image 720 in FIG. 6, the index value calculation unit 301 performs the character similarity determination degree of each of the character areas 721 to 724 by pattern matching using the template image. Is calculated.

なお、監視目的などの何らかの目的のために、指標値算出部301は、パターンマッチングの結果認識された複数の文字を含む文字列を、例えばサーバ530などの所定の装置に通知してもよい。   For some purpose such as monitoring, the index value calculation unit 301 may notify a predetermined device such as the server 530 of a character string including a plurality of characters recognized as a result of pattern matching.

続いて、ステップS116で指標値算出部301は、各文字領域についてのエッジ強度と文字類似判定度の積の総和を、指標値として算出する。つまり、指標値算出部301は、式(6)にしたがって、i番目の特定領域画像についての指標値を算出する。以下では説明の便宜上、算出された指標値を「r」とする。実施形態によっては、指標値算出部301は、例えば式(7)などの他の式にしたがって指標値を算出してもよい。   Subsequently, in step S116, the index value calculation unit 301 calculates the sum of the products of the edge strength and the character similarity determination degree for each character area as an index value. That is, the index value calculation unit 301 calculates the index value for the i-th specific region image according to the equation (6). Hereinafter, for convenience of explanation, the calculated index value is “r”. Depending on the embodiment, the index value calculation unit 301 may calculate the index value according to another expression such as Expression (7), for example.

次に、図8のステップS117で指標値算出部301は、温度t、フォーカス位置f、および距離dの組み合わせに対応するリングバッファ(例えば、t=25℃、f=1、d=2の場合は、図5のリングバッファ610)に、算出した指標値rを記憶する。具体的には、指標値算出部301は、当該リングバッファにおいてポインタにより指し示されている要素を、算出した指標値rで上書きする。そして、指標値算出部301は、リングバッファのポインタをインクリメントする。   Next, in step S117 of FIG. 8, the index value calculation unit 301 causes the ring buffer corresponding to the combination of the temperature t, the focus position f, and the distance d (for example, when t = 25 ° C., f = 1, d = 2). Stores the calculated index value r in the ring buffer 610) of FIG. Specifically, the index value calculation unit 301 overwrites the element indicated by the pointer in the ring buffer with the calculated index value r. Then, the index value calculation unit 301 increments the pointer of the ring buffer.

また、ステップS118で代表値算出部302は、温度t、フォーカス位置f、および距離dの組み合わせに対応する、集計テーブル内のカウンタをインクリメントする。例えば、集計テーブル群600内でj番目の集計テーブル601−jが温度tに対応する場合、代表値算出部302は、集計テーブル601−jにおけるフォーカス位置fの行の距離dの列のセルにおけるカウンタcj,f,dをインクリメントする。 In step S118, the representative value calculation unit 302 increments the counter in the aggregation table corresponding to the combination of the temperature t, the focus position f, and the distance d. For example, when the j-th total table 601-j in the total table group 600 corresponds to the temperature t, the representative value calculation unit 302 uses the cell in the column of the distance d in the row at the focus position f in the total table 601-j. The counter c j, f, d is incremented.

そして、ステップS119で代表値算出部302は、ステップS118でインクリメントした後のカウンタ値が、リングバッファのサイズR以上であるか否かを判断する。カウンタ値がサイズR以上の場合、動的調整処理はステップS120に移行する。逆に、カウンタ値がサイズR未満の場合、動的調整処理はステップS121に移行する。   In step S119, the representative value calculation unit 302 determines whether the counter value after the increment in step S118 is equal to or larger than the size R of the ring buffer. If the counter value is greater than or equal to the size R, the dynamic adjustment process proceeds to step S120. Conversely, if the counter value is less than the size R, the dynamic adjustment process proceeds to step S121.

ステップS120で代表値算出部302は、温度t、フォーカス位置f、および距離dの組み合わせに対応するリングバッファに記憶されたR個の指標値の算出平均を算出する。そして、代表値算出部302は、温度t、フォーカス位置f、および距離dの組み合わせに対応する、集計テーブル内のセルに、算出した値を記憶する。例えば、集計テーブル群600内でj番目の集計テーブル601−jが温度tに対応する場合、代表値算出部302は、集計テーブル601−jにおけるフォーカス位置fの行の距離dの列のセルにおける値aj,f,dを、算出した算術平均で上書きする。そして、動的調整処理はステップS121に移行する。 In step S120, the representative value calculation unit 302 calculates the calculated average of the R index values stored in the ring buffer corresponding to the combination of the temperature t, the focus position f, and the distance d. Then, the representative value calculation unit 302 stores the calculated value in a cell in the tabulation table corresponding to the combination of the temperature t, the focus position f, and the distance d. For example, when the j-th total table 601-j in the total table group 600 corresponds to the temperature t, the representative value calculation unit 302 uses the cell in the column of the distance d in the row at the focus position f in the total table 601-j. Overwrite the values a j, f, d with the calculated arithmetic mean. Then, the dynamic adjustment process proceeds to step S121.

ステップS121で調整手順制御部304は、M個の特定領域画像のすべてについてステップS112〜S120の処理を終えたか否かを判断する。具体的には、i<M−1の場合、未処理の特定領域画像が残っているので、動的調整処理はステップS122に移行する。逆に、i≧M−1の場合(より具体的にはi=M−1の場合)、M個の特定領域画像のすべてについてステップS112〜S120の処理が完了しているので、動的調整処理はステップS123に移行する。   In step S121, the adjustment procedure control unit 304 determines whether or not the processing in steps S112 to S120 has been completed for all of the M specific area images. Specifically, when i <M−1, there is an unprocessed specific area image, so the dynamic adjustment process proceeds to step S122. On the contrary, when i ≧ M−1 (more specifically, when i = M−1), since the processing of steps S112 to S120 is completed for all of the M specific area images, dynamic adjustment is performed. The process proceeds to step S123.

ステップS122で調整手順制御部304は、ループ変数iをインクリメントする。そして、動的調整処理は、図7のステップS112に戻る。
また、ステップS123で調整手順制御部304は、前回温度データ630として記憶されている前回の温度tpが、ステップS102で取得した温度tと等しいか否かを判定する。2つの温度が等しい場合、動的調整処理はステップS124に移行する。逆に、2つの温度が異なる場合、動的調整処理はステップS126に移行する。
In step S122, the adjustment procedure control unit 304 increments the loop variable i. Then, the dynamic adjustment process returns to step S112 in FIG.
In step S123, the adjustment procedure control unit 304 determines whether or not the previous temperature tp stored as the previous temperature data 630 is equal to the temperature t acquired in step S102. If the two temperatures are equal, the dynamic adjustment process proceeds to step S124. Conversely, if the two temperatures are different, the dynamic adjustment process proceeds to step S126.

ステップS124では、図9〜13に示すフォーカス位置更新処理が行われる。フォーカス位置更新処理の詳細は後述するが、ステップS102で取得された温度tと、ステップS103で取得された(または後述のステップS127で更新された)フォーカス位置fにしたがって、フォーカス位置更新処理が呼び出される。   In step S124, the focus position update process shown in FIGS. Although details of the focus position update process will be described later, the focus position update process is called according to the temperature t acquired in step S102 and the focus position f acquired in step S103 (or updated in step S127 described later). It is.

そして、続くステップS125で調整手順制御部304は、次の撮像のタイミングまで待つ。例えば、撮像装置310は、30fpsなどの決められたフレームレートで繰り返し撮像を行ってもよく、この場合、撮像は1/30秒ごとに行われる。次の撮像タイミングまで時間が経過すると、動的調整処理は図7のステップS101に戻る。   In step S125, the adjustment procedure control unit 304 waits until the next imaging timing. For example, the imaging device 310 may repeatedly perform imaging at a determined frame rate such as 30 fps. In this case, imaging is performed every 1/30 seconds. When time elapses until the next imaging timing, the dynamic adjustment processing returns to step S101 in FIG.

さて、ステップS126で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsの値を読み取る。そして、焦点距離制御部303は、読み取った設定フォーカス位置fsの値を、ステップS110と同様にして撮像装置310に設定する。   In step S126, the focal length control unit 303 reads the value of the set focus position fs corresponding to the temperature t in the focus position table 620. Then, the focal length control unit 303 sets the read value of the set focus position fs in the imaging device 310 in the same manner as in step S110.

次に、ステップS127で調整手順制御部304は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsの値を読み取る。そして、調整手順制御部304は、現在撮像装置310に設定されているフォーカス位置fとして、読み取った設定フォーカス位置fsの値を記憶する。   Next, in step S127, the adjustment procedure control unit 304 reads the value of the set focus position fs corresponding to the temperature t from the focus position table 620. Then, the adjustment procedure control unit 304 stores the read value of the set focus position fs as the focus position f currently set in the imaging device 310.

ステップS127の後、動的調整処理は上記のステップS124に移行する。以上のように、温度変化があるとフォーカス位置更新処理の前にステップS126〜S127が実行される理由は、以下のとおりである。   After step S127, the dynamic adjustment process proceeds to step S124 described above. As described above, the reason why steps S126 to S127 are executed before the focus position update process when there is a temperature change is as follows.

ステップS117〜S120では、現在の温度tに対応する集計テーブルやリングバッファが更新される。そして、集計テーブルの更新の結果、温度tにとって適切と推定されるフォーカス位置が変化した可能性がある。そこで、ステップS124のフォーカス位置更新処理において、「撮像装置310に設定するフォーカス位置を変更するか否か」が判断される。   In steps S117 to S120, the tabulation table and the ring buffer corresponding to the current temperature t are updated. As a result of updating the aggregation table, the focus position estimated to be appropriate for the temperature t may have changed. Therefore, in the focus position update process in step S124, it is determined whether or not to change the focus position set in the imaging device 310.

しかし、温度変化があった場合、ステップS103で取得されたフォーカス位置fは、現在の温度tとは異なる温度のときに設定されたものである。よって、「(現在のフォーカス位置fではなく)フォーカス位置テーブル620に現在の温度tと対応づけられて現在記憶されている設定フォーカス位置fsが現在の温度tに対して適切なのか」を判断してこそ、フォーカス位置テーブル620の整合性が保たれる。   However, when there is a temperature change, the focus position f acquired in step S103 is set at a temperature different from the current temperature t. Therefore, it is determined whether “the set focus position fs stored in association with the current temperature t in the focus position table 620 (not the current focus position f) is appropriate for the current temperature t”. Only then, the consistency of the focus position table 620 is maintained.

そこで、本実施形態では、温度変化があった場合は、先にステップS126で焦点距離制御部303が暫定的に撮像装置310にフォーカス位置を設定しなおし、その後、ステップS124でフォーカス位置更新処理が行われる。そのため、フォーカス位置テーブル620の整合性は保たれる。なお、フォーカス位置更新処理においては、フォーカス位置テーブル620に現在の温度tと対応づけられて現在記憶されている設定フォーカス位置fsが、判断の結果に応じて、変更されることもあるし、変更されないこともある。   Therefore, in the present embodiment, when there is a temperature change, the focal length control unit 303 tentatively resets the focus position in the imaging device 310 in step S126, and then the focus position update process is performed in step S124. Done. Therefore, the consistency of the focus position table 620 is maintained. In the focus position update process, the set focus position fs that is currently stored in the focus position table 620 in association with the current temperature t may be changed or changed depending on the determination result. Sometimes not.

図9〜13は、図8のステップS124に対応するフォーカス位置更新処理のフローチャートである。上記のとおり、フォーカス位置更新処理では、現在の温度tと、撮像装置310に現在設定されているフォーカス位置fが参照される。なお、説明の便宜上、以下の図9〜13の説明においては、集計テーブル群600の中で温度tに対応するテーブルが集計テーブル601−jであるものとする。   9 to 13 are flowcharts of the focus position update process corresponding to step S124 in FIG. As described above, in the focus position update process, the current temperature t and the focus position f currently set in the imaging device 310 are referred to. For convenience of description, in the following description of FIGS. 9 to 13, it is assumed that the table corresponding to the temperature t in the total table group 600 is the total table 601-j.

ステップS201で調整手順制御部304は、温度tとフォーカス位置fの組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されているか否かを判断する。ここで「十分な量のデータ」の定義は実施形態に応じて任意である。   In step S201, the adjustment procedure control unit 304 determines whether a sufficient amount of data corresponding to the combination of the temperature t and the focus position f is accumulated in the aggregation table 601-j. Here, the definition of “sufficient amount of data” is arbitrary depending on the embodiment.

例えば、以下の(12a)〜(12d)に例示する条件のいずれかがステップS201の判断に使われてもよい。条件が成立するとき、調整手順制御部304は、「温度tとフォーカス位置fの組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されている」と判断する。もちろん、実施形態に応じて、(12a)〜(12d)の条件とは別の条件が採用されてもよい。   For example, any of the conditions exemplified in the following (12a) to (12d) may be used for the determination in step S201. When the condition is satisfied, the adjustment procedure control unit 304 determines that “a sufficient amount of data corresponding to the combination of the temperature t and the focus position f is accumulated in the aggregation table 601-j”. Of course, depending on the embodiment, different conditions from the conditions (12a) to (12d) may be adopted.

(12a)「温度tに対応する集計テーブル601−jのフォーカス位置fの行に記憶されているカウンタ値cj,f,0〜cj,f,20が、いずれも第1の閾値以上である」という条件。第1の閾値は、例えばリングバッファ610のサイズRでもよいし、それより大きな値でもよい。
(12b)「カウンタ値cj,f,0〜cj,f,20の中に、第2の閾値以上のものが少なくとも1つあり、かつ、カウンタ値cj,f,0〜cj,f,20の総和が、第3の閾値以上である」という条件。第2の閾値は、例えばリングバッファ610のサイズRでもよいし、それより大きな値でもよい。第3の閾値は、例えばRの10倍程度でもよいし、それより大きくても、小さくてもよい。
(12c)「カウンタ値cj,f,0〜cj,f,20の中で、第4の閾値以上のものの個数が、第5の閾値以上である」という条件。第4の閾値は、例えばリングバッファ610のサイズRでもよいし、それより大きな値でもよい。第5の閾値は、例えば、10程度でもよいし、それより大きくても、小さくてもよい。
(12d)「カウンタ値cj,f,0〜cj,f,20の中で、所定範囲内のいくつかの距離に対応するものが、いずれも、第6の閾値以上である」という条件。例えば、「所定範囲内のいくつかの距離」は、距離“8”〜“12”という5個の距離でもよい。また、第6の閾値は、例えばリングバッファ610のサイズRでもよいし、それより大きな値でもよい。
(12a) “Counter values c j, f, 0 to c j, f, 20 stored in the row of the focus position f of the aggregation table 601-j corresponding to the temperature t are all equal to or greater than the first threshold value. The condition that there is. The first threshold may be, for example, the size R of the ring buffer 610 or a larger value.
(12b) “There is at least one counter value c j, f, 0 to c j, f, 20 that is greater than or equal to the second threshold, and the counter value c j, f, 0 to c j, The condition that the sum of f and 20 is equal to or greater than the third threshold value. The second threshold value may be, for example, the size R of the ring buffer 610 or a larger value. The third threshold value may be about 10 times R, for example, or may be larger or smaller.
(12c) A condition that “the number of counter values c j, f, 0 to c j, f, 20 that are greater than or equal to the fourth threshold is greater than or equal to the fifth threshold”. The fourth threshold value may be, for example, the size R of the ring buffer 610 or a larger value. The fifth threshold value may be, for example, about 10, or may be larger or smaller.
(12d) A condition that “the counter values c j, f, 0 to c j, f, 20 corresponding to some distances within a predetermined range are all equal to or greater than the sixth threshold value”. . For example, “several distances within a predetermined range” may be five distances “8” to “12”. Further, the sixth threshold value may be, for example, the size R of the ring buffer 610 or a larger value.

なお、後のいくつかのステップにおいてもステップS201と同様に、十分な量のデータが集計テーブル601−jに蓄積されているか否かを調整手順制御部304が判断する。このような判断には、例えば、次の(13a)〜(13b)のような効果がある。   Note that the adjustment procedure control unit 304 determines whether or not a sufficient amount of data is accumulated in the aggregation table 601-j in some subsequent steps as in step S201. Such a determination has the following effects (13a) to (13b), for example.

(13a)ノイズの影響で不必要にフォーカス位置が変更されてしまうことを防ぐ効果。
(13b)過度に頻繁にフォーカス位置が変更されてしまう(つまり、フォーカス位置が不安定に変化する)ことを防ぐ効果。
(13a) An effect of preventing the focus position from being changed unnecessarily due to the influence of noise.
(13b) An effect of preventing the focus position from being changed excessively frequently (that is, the focus position changes in an unstable manner).

以上説明したようなステップS201の判断の結果に応じて、フォーカス位置更新処理はステップS202またはS205へと移行する。具体的には、温度tとフォーカス位置fの組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されていなければ、フォーカス位置を変更せずにデータの蓄積を続けるために、フォーカス位置更新処理はステップS202へと移行する。逆に、十分な量のデータが集計テーブル601−jに蓄積されていれば、フォーカス位置の変更を検討するために、フォーカス位置更新処理はステップS205へと移行する。   Depending on the determination result of step S201 as described above, the focus position update process proceeds to step S202 or S205. Specifically, if a sufficient amount of data corresponding to the combination of the temperature t and the focus position f is not accumulated in the aggregation table 601-j, the focus is not changed and the focus accumulation is continued. The position update process proceeds to step S202. On the other hand, if a sufficient amount of data is accumulated in the tabulation table 601-j, the focus position update process proceeds to step S205 in order to consider changing the focus position.

ステップS202で調整手順制御部304は、前回のチェック時刻ctとして現在時刻を記憶する。つまり、調整手順制御部304は、チェック時刻データ640を現在時刻で上書きする。   In step S202, the adjustment procedure control unit 304 stores the current time as the previous check time ct. That is, the adjustment procedure control unit 304 overwrites the check time data 640 with the current time.

次に、ステップS203で調整手順制御部304は、前回の温度tpとして温度tを記憶する。つまり、調整手順制御部304は、前回温度データ630を現在の温度tで上書きする。   Next, in step S203, the adjustment procedure control unit 304 stores the temperature t as the previous temperature tp. That is, the adjustment procedure control unit 304 overwrites the previous temperature data 630 with the current temperature t.

そして、ステップS204で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsの値を読み取る。なお、ステップS204で読み取られる設定フォーカス位置fsの値は、後述のステップS210、S212、S216、S218、S222、S227、S229、S233、S234、S238、またはS239で更新された値であってもよい。もちろん、場合によっては、ステップS204で読み取られる設定フォーカス位置fsの値は、フォーカス位置更新処理の開始時点から変わっていなくてもよい。   In step S <b> 204, the focal length control unit 303 reads the value of the set focus position fs corresponding to the temperature t in the focus position table 620. Note that the value of the set focus position fs read in step S204 may be the value updated in steps S210, S212, S216, S218, S222, S227, S229, S233, S234, S238, or S239, which will be described later. . Of course, depending on the case, the value of the set focus position fs read in step S204 may not be changed from the start time of the focus position update process.

いずれにせよ、焦点距離制御部303は、読み取った設定フォーカス位置fsの値を撮像装置310に設定する。具体的には、焦点距離制御部303は、読み取った設定フォーカス位置fsの値を撮像装置310に設定するための適宜のフォーマットの制御情報を生成し、生成した制御情報を撮像装置310に出力する。   In any case, the focal length control unit 303 sets the read value of the set focus position fs in the imaging device 310. Specifically, the focal length control unit 303 generates control information in an appropriate format for setting the read value of the set focus position fs in the imaging apparatus 310, and outputs the generated control information to the imaging apparatus 310. .

その結果、撮像装置310には、焦点距離制御部303が読み取った設定フォーカス位置fsが設定される。また、ステップS204の処理が終わると、フォーカス位置更新処理も終了する。   As a result, the set focus position fs read by the focal length control unit 303 is set in the imaging device 310. When the process of step S204 is finished, the focus position update process is also finished.

さて、ステップS205で調整手順制御部304は、フォーカス位置fが“0”であるか否かを判断する。以下に詳しく述べるように、本実施形態では、フォーカス位置の変更量は+1または−1である。   In step S205, the adjustment procedure control unit 304 determines whether or not the focus position f is “0”. As will be described in detail below, in the present embodiment, the change amount of the focus position is +1 or -1.

フォーカス位置fが“0”のとき、可能な変更はフォーカス位置の値を1増やす変更のみなので、フォーカス位置更新処理は図10のステップS211へと移行する。フォーカス位置fが“0”ではないとき、フォーカス位置更新処理はステップS206へと移行する。   When the focus position f is “0”, the only possible change is to change the value of the focus position by 1. Therefore, the focus position update process proceeds to step S211 in FIG. When the focus position f is not “0”, the focus position update process proceeds to step S206.

そして、ステップS206で調整手順制御部304は、フォーカス位置fが“255”であるか否かを判断する。
フォーカス位置fが“255”のとき、可能な変更はフォーカス位置の値を1減らす変更のみである。よって、フォーカス位置更新処理は、図11のステップS217へと移行する。
In step S206, the adjustment procedure control unit 304 determines whether or not the focus position f is “255”.
When the focus position f is “255”, the only possible change is to change the focus position value by one. Therefore, the focus position update process proceeds to step S217 in FIG.

逆に、フォーカス位置fが“255”ではないとき(すなわち、フォーカス位置fが“1”から“254”のいずれかであるとき)、フォーカス位置の値を1増やす変更も、フォーカス位置の値を1減らす変更も可能である。よって、フォーカス位置更新処理はステップS207へと移行する。   Conversely, when the focus position f is not “255” (that is, when the focus position f is any one of “1” to “254”), a change to increase the focus position value by 1 also changes the focus position value. It is possible to change by one. Therefore, the focus position update process proceeds to step S207.

ステップS207で調整手順制御部304は、温度tとフォーカス位置(f−1)の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されているか否かを判断する。   In step S207, the adjustment procedure control unit 304 determines whether or not a sufficient amount of data corresponding to the combination of the temperature t and the focus position (f-1) is accumulated in the aggregation table 601-j.

例えば、ステップS201で上記(12a)の条件が使われる場合、ステップS207では、(12a)の条件と同様に定義された以下の(14a)の条件が使われる。同様に、ステップS201で(12b)、(12c)、(12d)の条件が使われる場合は、それぞれ、以下の(14b)、(14c)、(14d)の条件が使われる。   For example, when the condition (12a) is used in step S201, the following condition (14a) defined in the same manner as the condition (12a) is used in step S207. Similarly, when the conditions (12b), (12c), and (12d) are used in step S201, the following conditions (14b), (14c), and (14d) are used, respectively.

(14a)「カウンタ値cj,f−1,0〜cj,f−1,20が、いずれも第1の閾値以上である」という条件。
(14b)「カウンタ値cj,f−1,0〜cj,f−1,20の中に、第2の閾値以上のものが少なくとも1つあり、かつ、カウンタ値cj,f−1,0〜cj,f−1,20の総和が、第3の閾値以上である」という条件。
(14c)「カウンタ値cj,f−1,0〜cj,f−1,20の中で、第4の閾値以上のものの個数が、第5の閾値以上である」という条件。
(14d)「カウンタ値cj,f−1,0〜cj,f−1,20の中で、所定範囲内のいくつかの距離に対応するものが、いずれも、第6の閾値以上である」という条件。
(14a) A condition that “the counter values c j, f−1,0 to c j, f−1,20 are all equal to or greater than the first threshold value”.
(14b) “There is at least one counter value c j, f−1,0 to c j, f−1,20 that is greater than or equal to the second threshold, and the counter value c j, f−1. , 0 to c j, f−1,20 is equal to or greater than the third threshold value ”.
(14c) A condition that “the number of counter values c j, f−1,0 to c j, f−1,20 equal to or greater than the fourth threshold is equal to or greater than the fifth threshold”.
(14d) “Counter values c j, f−1,0 to c j, f−1,20 that correspond to several distances within a predetermined range are all equal to or greater than the sixth threshold value. The condition that there is.

もし、温度tとフォーカス位置(f−1)の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されていれば、フォーカス位置更新処理はステップS208へと移行する。逆に、温度tとフォーカス位置(f−1)の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されていなければ、フォーカス位置更新処理はステップS209へと移行する。   If a sufficient amount of data corresponding to the combination of the temperature t and the focus position (f-1) is accumulated in the aggregation table 601-j, the focus position update process proceeds to step S208. On the other hand, if a sufficient amount of data corresponding to the combination of the temperature t and the focus position (f-1) is not accumulated in the tabulation table 601-j, the focus position update process proceeds to step S209.

ステップS208で調整手順制御部304は、温度tとフォーカス位置(f+1)の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されているか否かを判断する。   In step S208, the adjustment procedure control unit 304 determines whether or not a sufficient amount of data corresponding to the combination of the temperature t and the focus position (f + 1) is accumulated in the aggregation table 601-j.

例えば、ステップS201で上記(12a)の条件が使われる場合、ステップS208では、(12a)の条件と同様に定義された以下の(15a)の条件が使われる。同様に、ステップS201で(12b)、(12c)、(12d)の条件が使われる場合は、それぞれ、以下の(15b)、(15c)、(15d)の条件が使われる。   For example, when the condition (12a) is used in step S201, the following condition (15a) defined in the same manner as the condition (12a) is used in step S208. Similarly, when the conditions (12b), (12c), and (12d) are used in step S201, the following conditions (15b), (15c), and (15d) are used, respectively.

(15a)「カウンタ値cj,f+1,0〜cj,f+1,20が、いずれも第1の閾値以上である」という条件。
(15b)「カウンタ値cj,f+1,0〜cj,f+1,20の中に、第2の閾値以上のものが少なくとも1つあり、かつ、カウンタ値cj,f+1,0〜cj,f+1,20の総和が、第3の閾値以上である」という条件。
(15c)「カウンタ値cj,f+1,0〜cj,f+1,20の中で、第4の閾値以上のものの個数が、第5の閾値以上である」という条件。
(15d)「カウンタ値cj,f+1,0〜cj,f+1,20の中で、所定範囲内のいくつかの距離に対応するものが、いずれも、第6の閾値以上である」という条件。
(15a) A condition that “the counter values c j, f + 1,0 to c j, f + 1,20 are all equal to or greater than the first threshold value”.
(15b) "counter value c j, f + 1,0 ~c j , in the f + 1, 20, more than the second threshold value has at least one, and the counter value c j, f + 1,0 ~c j , The condition that the sum of f + 1 and 20 is greater than or equal to the third threshold value.
(15c) A condition that “the number of counter values c j, f + 1,0 to c j, f + 1,20 that are greater than or equal to the fourth threshold is greater than or equal to the fifth threshold”.
(15d) A condition that “the counter values c j, f + 1,0 to c j, f + 1,20 corresponding to some distances within a predetermined range are all equal to or greater than the sixth threshold value”. .

もし、温度tとフォーカス位置(f+1)の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されていれば、フォーカス位置更新処理は図12のステップS223に移行する。逆に、温度tとフォーカス位置(f+1)の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されていなければ、フォーカス位置更新処理は図13のステップS230に移行する。   If a sufficient amount of data corresponding to the combination of the temperature t and the focus position (f + 1) is accumulated in the aggregation table 601-j, the focus position update process proceeds to step S223 in FIG. Conversely, if a sufficient amount of data corresponding to the combination of the temperature t and the focus position (f + 1) has not been accumulated in the aggregation table 601-j, the focus position update process proceeds to step S230 in FIG.

さて、ステップS209で調整手順制御部304は、温度tとフォーカス位置(f+1)の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されているか否かを判断する。ステップS209の判断はステップS208の判断と同様である。   In step S209, the adjustment procedure control unit 304 determines whether a sufficient amount of data corresponding to the combination of the temperature t and the focus position (f + 1) is accumulated in the aggregation table 601-j. The determination in step S209 is the same as the determination in step S208.

もし、温度tとフォーカス位置(f+1)の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されていれば、フォーカス位置更新処理は図13のステップS235に移行する。逆に、温度tとフォーカス位置(f+1)の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されていなければ、フォーカス位置更新処理はステップS210へ移行する。   If a sufficient amount of data corresponding to the combination of the temperature t and the focus position (f + 1) is accumulated in the aggregation table 601-j, the focus position update process proceeds to step S235 in FIG. On the other hand, if a sufficient amount of data corresponding to the combination of the temperature t and the focus position (f + 1) is not accumulated in the tabulation table 601-j, the focus position update process proceeds to step S210.

ところで、ある程度長い時間のスパンで見ると、本実施形態には、「焦点距離調整システム300が、試行錯誤的に設定フォーカス位置を変更することで、より良い設定フォーカス位置を見つける」という側面がある。具体的には、試行錯誤の過程においては、指標値の代表値に基づいて、「設定フォーカス位置を正の方向と負の方向のどちらに変更すれば、当該変更が指標値の向上に寄与するか」ということが推測される。そして、推測結果にしたがって、設定フォーカス位置が変更される。   By the way, when viewed in a span of a relatively long time, the present embodiment has an aspect that “the focal length adjustment system 300 finds a better set focus position by changing the set focus position by trial and error”. . Specifically, in the process of trial and error, based on the representative value of the index value, “if the set focus position is changed to either the positive direction or the negative direction, the change contributes to the improvement of the index value. It is speculated that. Then, the set focus position is changed according to the estimation result.

ところが、ステップS210が実行される場合には、指標値の向上に寄与する変更方向を推測する手がかりが少ない。なぜなら、ステップS210が実行される場合とは、温度tに対応する集計テーブル601−jにおいて、フォーカス位置(f−1)の行にもフォーカス位置(f+1)の行にも十分な量のデータがない場合だからである。   However, when step S210 is executed, there are few clues for estimating the change direction that contributes to the improvement of the index value. This is because step S210 is executed when there is a sufficient amount of data in both the focus position (f-1) and the focus position (f + 1) in the aggregation table 601-j corresponding to the temperature t. That's because there isn't.

そこで、ステップS210で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、試しにフォーカス位置(f−1)に更新してもよいし、試しにフォーカス位置(f+1)に更新してもよい。ステップS210における焦点距離制御部303の動作は、実施形態に応じて、以下に例示する(16a)〜(16d)のいずれのポリシにしたがっていてもよい。   Therefore, in step S210, the focal length control unit 303 may update the set focus position fs corresponding to the temperature t in the focus position table 620 to the focus position (f-1) as a trial, or to the focus position (f-1 as a trial). It may be updated to f + 1). The operation of the focal length control unit 303 in step S210 may follow any of the policies (16a) to (16d) exemplified below according to the embodiment.

(16a)「フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、フォーカス位置(f−1)に更新する」というポリシ。
(16b)「フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、フォーカス位置(f+1)に更新する」というポリシ。
(16c)「フォーカス位置(f−1)と(f+1)の一方をランダムに選んで、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、選んだ方のフォーカス位置に更新する」というポリシ。
(16d)「温度tに対応する集計テーブル601−jのフォーカス位置fの行には、十分な量のデータが蓄積されているので、この行のデータを用いて、指標値の向上に寄与する変更方向を推測する」というポリシ。
(16a) A policy that “the set focus position fs corresponding to the temperature t in the focus position table 620 is updated to the focus position (f−1)”.
(16b) A policy that “the set focus position fs corresponding to the temperature t in the focus position table 620 is updated to the focus position (f + 1)”.
(16c) “One of the focus positions (f−1) and (f + 1) is selected at random, and the set focus position fs corresponding to the temperature t in the focus position table 620 is updated to the selected focus position”. policy.
(16d) “Since a sufficient amount of data is accumulated in the row of the focus position f of the aggregation table 601-j corresponding to the temperature t, the data in this row is used to contribute to the improvement of the index value. Policy to guess the direction of change.

なお、(16a)〜(16c)のポリシは単純だが(16d)のポリシはやや複雑なので、以下に説明する。
焦点距離制御部303は、温度tに対応する集計テーブル601−jのフォーカス位置fの行を参照する。当該行の各セルについて、焦点距離制御部303は、以下の(17a)〜(17c)のようにして距離dに対応する評価尺度を求める。
Although the policies (16a) to (16c) are simple, the policy (16d) is somewhat complicated and will be described below.
The focal length control unit 303 refers to the row of the focus position f in the aggregation table 601-j corresponding to the temperature t. For each cell in the row, the focal length control unit 303 obtains an evaluation scale corresponding to the distance d as in the following (17a) to (17c).

(17a)当該セルのカウンタ値cj,f,dが閾値R以上の場合には、代表値算出部302により算出された上述の算術平均aj,f,dが、当該セルに記憶されている。そこで、焦点距離制御部303は、当該セルに記憶されている算術平均aj,f,dを、距離dに対応する評価尺度として用いる。
(17b)カウンタ値cj,f,dが0以上閾値R未満の場合は、値aj,f,dは初期値(つまり0)のままであり、無効である。そこで、焦点距離制御部303は、当該セルに対応するリングバッファの0番目から(cj,f,d−1)番目までの要素の算術平均を算出し、算出した値を、距離dに対応する評価尺度として用いる。
(17c)カウンタ値cj,f,dが0の場合は、焦点距離制御部303は、距離dに対応する評価尺度として0を用いる。
(17a) When the counter value c j, f, d of the cell is greater than or equal to the threshold value R, the above-described arithmetic average a j, f, d calculated by the representative value calculation unit 302 is stored in the cell. Yes. Therefore, the focal length control unit 303 uses the arithmetic mean aj, f, d stored in the cell as an evaluation scale corresponding to the distance d.
(17b) When the counter value c j, f, d is 0 or more and less than the threshold value R, the value a j, f, d remains at the initial value (that is, 0) and is invalid. Therefore, the focal length control unit 303 calculates the arithmetic average of the elements from the 0th to (c j, f, d −1) th of the ring buffer corresponding to the cell, and corresponds the calculated value to the distance d. Used as an evaluation scale.
(17c) When the counter values c j, f, d are 0, the focal length control unit 303 uses 0 as the evaluation scale corresponding to the distance d.

そして、焦点距離制御部303は、距離“0”から“20”に対応する21個の評価尺度の値を比較し、評価尺度の値が距離dに応じてどのように変化するかをチェックする。
または、焦点距離制御部303は、距離“0”から“20”のうちの一部(例えば、距離“8”から“12”までの範囲)に対応する評価尺度の値のみを求めてもよい。そして焦点距離制御部303は、求めた値を使って、評価尺度の値が距離dに応じてどのように変化するかをチェックしてもよい。
Then, the focal length control unit 303 compares the values of the 21 evaluation scales corresponding to the distances “0” to “20”, and checks how the evaluation scale values change according to the distance d. .
Alternatively, the focal length control unit 303 may obtain only the value of the evaluation scale corresponding to a part of the distances “0” to “20” (for example, a range from the distance “8” to “12”). . Then, the focal length control unit 303 may check how the value of the evaluation scale changes according to the distance d using the obtained value.

焦点距離制御部303は、距離dに応じた評価尺度の値の変化の傾向から、「フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsの値を増やすか、それとも減らすか」ということを決定する。   From the tendency of the change in the value of the evaluation scale according to the distance d, the focal length control unit 303 indicates that “whether the value of the set focus position fs corresponding to the temperature t is increased or decreased in the focus position table 620”. decide.

ここで、説明の便宜上、撮像装置310により撮像される画像の中心付近に写る位置と、撮像装置310との間の距離を「所望距離」ということにすると、焦点距離制御部303は、例えば以下のようにして、新たなフォーカス位置を決めてもよい。   Here, for convenience of explanation, if the distance between the position captured near the center of the image captured by the imaging device 310 and the imaging device 310 is referred to as a “desired distance”, the focal length control unit 303, for example, In this way, a new focus position may be determined.

もし、所望距離よりも長い距離に対応する評価尺度の値の方が、所望距離に対応する評価尺度の値よりも大きければ、「実際の合焦位置が所望の合焦位置よりも遠くにある」と推測される。よって、この場合は、合焦位置を撮像装置に近づけることが好ましい。そこで、焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、フォーカス位置(f−1)に更新する。   If the value of the evaluation scale corresponding to the distance longer than the desired distance is larger than the value of the evaluation scale corresponding to the desired distance, “the actual focus position is farther than the desired focus position. Is presumed. Therefore, in this case, it is preferable to bring the in-focus position closer to the imaging device. Therefore, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to the focus position (f−1).

逆に、所望距離よりも短い距離に対応する評価尺度の値の方が、所望距離に対応する評価尺度の値よりも大きければ、「実際の合焦位置が所望の合焦位置よりも近くにある」と推測される。よって、この場合は、合焦位置を撮像装置から遠ざけることが好ましい。そこで、焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、フォーカス位置(f+1)に更新する。   Conversely, if the value of the evaluation scale corresponding to the distance shorter than the desired distance is larger than the value of the evaluation scale corresponding to the desired distance, “the actual focus position is closer to the desired focus position. It is presumed. Therefore, in this case, it is preferable to keep the in-focus position away from the imaging device. Therefore, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to the focus position (f + 1).

ステップS210に関していずれのポリシが採用されるにせよ、ステップS210でのフォーカス位置テーブル620の更新の後、フォーカス位置更新処理は、ステップS202へと移行する。その結果、チェック時刻データ640と前回温度データ630が更新され、撮像装置310には新たなフォーカス位置が設定される。   Regardless of which policy is adopted with respect to step S210, after the focus position table 620 is updated in step S210, the focus position update process proceeds to step S202. As a result, the check time data 640 and the previous temperature data 630 are updated, and a new focus position is set in the imaging device 310.

さて、図10のステップS211は、温度tに対応する集計テーブル601−jのフォーカス位置f(=0)の行に十分な量のデータが蓄積されているときに実行される。ステップS211で調整手順制御部304は、ステップS208やS209と同様の判断を行う。ステップS211では、「フォーカス位置(f+1)」は「フォーカス位置“1”」を意味する。   Step S211 in FIG. 10 is executed when a sufficient amount of data is accumulated in the row of the focus position f (= 0) of the aggregation table 601-j corresponding to the temperature t. In step S211, the adjustment procedure control unit 304 performs the same determination as in steps S208 and S209. In step S211, “focus position (f + 1)” means “focus position“ 1 ””.

もし、温度tとフォーカス位置“1”の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されていなければ、「温度tのときはフォーカス位置“0”よりフォーカス位置“1”の方が適切である」という可能性が残っている。よって、試行錯誤的にフォーカス位置を調整するために、フォーカス位置更新処理はステップS212へと移行する。   If a sufficient amount of data corresponding to the combination of the temperature t and the focus position “1” is not accumulated in the tabulation table 601-j, “the focus position“ 1 ”from the focus position“ 0 ”at the temperature t”. There is a possibility that “is more appropriate”. Therefore, in order to adjust the focus position by trial and error, the focus position update process proceeds to step S212.

逆に、温度tとフォーカス位置“1”の組み合わせに対応する十分な量のデータが集計テーブル601−jに蓄積されていれば、実際に蓄積されたデータに基づく推測が可能である。そして、実際に蓄積されたデータに基づく推測は、試行錯誤よりも信頼性が高い。よって、フォーカス位置更新処理はステップS213へと移行する。   On the other hand, if a sufficient amount of data corresponding to the combination of the temperature t and the focus position “1” is accumulated in the tabulation table 601-j, it is possible to make a guess based on the actually accumulated data. And the estimation based on the actually accumulated data is more reliable than trial and error. Therefore, the focus position update process proceeds to step S213.

ステップS212で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、“1”に更新する。そして、フォーカス位置更新処理は図9のステップS202へと移行する。   In step S212, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to “1”. Then, the focus position update process proceeds to step S202 in FIG.

他方、ステップS213では、代表値算出部302が、現在の温度tと現在のフォーカス位置の組み合わせに対応する代表値(以下、説明の便宜上「Qcur」とする)を算出する。具体的には、代表値算出部302は、温度tとフォーカス位置“0”の組み合わせに対応して集計テーブル601−jに記憶されている有効な平均値aj,0,dの算術平均を、代表値Qcurとして算出する。 On the other hand, in step S213, the representative value calculation unit 302 calculates a representative value (hereinafter referred to as “Qcur” for convenience of explanation) corresponding to the combination of the current temperature t and the current focus position. Specifically, the representative value calculation unit 302 calculates the arithmetic average of the effective average values a j, 0, d stored in the aggregation table 601-j corresponding to the combination of the temperature t and the focus position “0”. , Calculated as a representative value Qcur.

なお、「有効な平均値aj,0,d」とは、初期値(すなわち0)ではない値の平均値aj,0,dのこととする。上記(12a)〜(12d)のいずれかの条件を用いた「十分な量のデータ」の定義によれば、少なくとも1つは有効な平均値aj,0,dが存在するので、代表値算出部302は代表値Qcurを算出することができる。 Note that the "effective average a j, 0, d ', and that the average value a j, 0, d initial value (i.e. 0) not a value. According to the definition of “sufficient amount of data” using any one of the above conditions (12a) to (12d), since at least one of the effective average values a j, 0, d exists, the representative value The calculation unit 302 can calculate the representative value Qcur.

下記の式(8)を用いれば、ステップS213における代表値Qcurは、「Qcur=Qj,0」と表される。なお、式(8)における関数g(j,f,d)は式(9)のように定義される。
If the following equation (8) is used, the representative value Qcur in step S213 is expressed as “Qcur = Q j, 0 ”. Note that the function g 3 (j, f, d) in equation (8) is defined as in equation (9).

次に、ステップS214では、代表値算出部302が、現在の温度tと、現在のフォーカス位置よりも1段階だけファー(far)側のフォーカス位置との組み合わせに対応する代表値(以下、説明の便宜上「Qfar」とする)を算出する。具体的には、代表値算出部302は、温度tとフォーカス位置“1”の組み合わせに対応して集計テーブル601−jに記憶されている有効な平均値aj,1,dの算術平均を、代表値Qfarとして算出する。式(8)によれば、ステップS214における代表値Qfarは、「Qfar=Qj,1」と表される。 Next, in step S214, the representative value calculation unit 302 uses a representative value corresponding to a combination of the current temperature t and the focus position far from the current focus position by one level (hereinafter, described). For convenience, “Qfar” is calculated. Specifically, the representative value calculation unit 302 calculates the arithmetic average of the effective average values a j, 1, d stored in the aggregation table 601-j corresponding to the combination of the temperature t and the focus position “1”. , Calculated as a representative value Qfar. According to Expression (8), the representative value Qfar in step S214 is expressed as “Qfar = Q j, 1 ”.

そして、ステップS215では、焦点距離制御部303が、2つの代表値QcurとQfarを比較する。
もし、代表値Qfarの方が代表値Qcurよりも大きければ、「温度tには、フォーカス位置“0”よりもフォーカス位置“1”の方が適している」と推測される。そこで、フォーカス位置更新処理はステップS216に移行する。
In step S215, the focal length control unit 303 compares the two representative values Qcur and Qfar.
If the representative value Qfar is larger than the representative value Qcur, it is estimated that “the focus position“ 1 ”is more suitable for the temperature t than the focus position“ 0 ””. Therefore, the focus position update process proceeds to step S216.

逆に、代表値Qcurが代表値Qfar以上であれば、温度tの設定フォーカス位置fsを変更する必要はない。そこで、フォーカス位置更新処理は図9のステップS202に移行する。   Conversely, if the representative value Qcur is equal to or greater than the representative value Qfar, there is no need to change the set focus position fs of the temperature t. Therefore, the focus position update process proceeds to step S202 in FIG.

ステップS216で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、“1”に更新する。そして、フォーカス位置更新処理は図9のステップS202へと移行する。   In step S216, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to “1”. Then, the focus position update process proceeds to step S202 in FIG.

さて、図11のステップS217は、温度tに対応する集計テーブル601−jのフォーカス位置f(=255)の行に十分な量のデータが蓄積されているときに実行される。ステップS217で調整手順制御部304は、ステップS207と同様の判断を行う。ステップS217では「フォーカス位置(f−1)」は「フォーカス位置“254”」を意味する。   Step S217 in FIG. 11 is executed when a sufficient amount of data is accumulated in the row of the focus position f (= 255) of the aggregation table 601-j corresponding to the temperature t. In step S217, the adjustment procedure control unit 304 performs the same determination as in step S207. In step S217, “focus position (f−1)” means “focus position“ 254 ””.

もし、温度tとフォーカス位置“254”の組み合わせに対応する十分な量のデータが集計テーブルに蓄積されていなければ、「温度tのときはフォーカス位置“255”よりフォーカス位置“254”の方が適切である」という可能性が残っている。よって、試行錯誤的にフォーカス位置を調整するために、フォーカス位置更新処理はステップS218に移行する。   If a sufficient amount of data corresponding to the combination of the temperature t and the focus position “254” is not accumulated in the tabulation table, “the focus position“ 254 ”is higher than the focus position“ 255 ”at the temperature t”. There remains the possibility that it is “appropriate”. Therefore, in order to adjust the focus position by trial and error, the focus position update process proceeds to step S218.

逆に、温度tとフォーカス位置“254”の組み合わせに対応する十分な量のデータが集計テーブルに蓄積されていれば、実際に蓄積されたデータに基づく推測が可能である。そして、実際に蓄積されたデータに基づく推測は、試行錯誤よりも信頼性が高い。よって、フォーカス位置更新処理はステップS219へと移行する。   Conversely, if a sufficient amount of data corresponding to the combination of the temperature t and the focus position “254” is accumulated in the tabulation table, it is possible to make a guess based on the actually accumulated data. And the estimation based on the actually accumulated data is more reliable than trial and error. Therefore, the focus position update process proceeds to step S219.

ステップS218で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、“254”に更新する。そして、フォーカス位置更新処理は図9のステップS202へと移行する。   In step S218, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to “254”. Then, the focus position update process proceeds to step S202 in FIG.

他方、ステップS219では、代表値算出部302が、現在の温度tと現在のフォーカス位置の組み合わせに対応する代表値Qcurを算出する。具体的には、代表値算出部302は、温度tとフォーカス位置“255”の組み合わせに対応して集計テーブル601−jに記憶されている有効な平均値aj,255,dの算術平均を、代表値Qcurとして算出する。式(8)によれば、ステップS219における代表値Qcurは、「Qcur=Qj,255」と表される。 On the other hand, in step S219, the representative value calculation unit 302 calculates a representative value Qcur corresponding to the combination of the current temperature t and the current focus position. Specifically, the representative value calculation unit 302 calculates the arithmetic average of the effective average values a j, 255 and d stored in the aggregation table 601-j corresponding to the combination of the temperature t and the focus position “255”. , Calculated as a representative value Qcur. According to Expression (8), the representative value Qcur in step S219 is expressed as “Qcur = Q j, 255 ”.

次に、ステップS220では、代表値算出部302が、現在の温度tと、現在のフォーカス位置よりも1段階だけニア(near)側のフォーカス位置との組み合わせに対応する代表値(以下、説明の便宜上「Qnear」とする)を算出する。具体的には、代表値算出部302は、温度tとフォーカス位置“254”の組み合わせに対応して集計テーブル601−jに記憶されている有効な平均値aj,254,dの算術平均を、代表値Qnearとして算出する。式(8)によれば、ステップS220における代表値Qnearは、「Qnear=Qj,254」と表される。 Next, in step S220, the representative value calculation unit 302 determines a representative value corresponding to a combination of the current temperature t and a focus position that is nearer than the current focus position by one step (hereinafter described). For convenience, “Qnear” is calculated. Specifically, the representative value calculation unit 302 calculates the arithmetic average of the effective average values a j, 254, d stored in the aggregation table 601-j corresponding to the combination of the temperature t and the focus position “254”. , The representative value Qnear is calculated. According to Expression (8), the representative value Qnear in step S220 is expressed as “Qnear = Q j, 254 ”.

そして、ステップS221では、焦点距離制御部303が、2つの代表値QcurとQnearを比較する。
もし、代表値Qnearの方が代表値Qcurよりも大きければ、「温度tには、フォーカス位置“255”よりもフォーカス位置“254”の方が適している」と推測される。そこで、フォーカス位置更新処理はステップS222に移行する。
In step S221, the focal length control unit 303 compares the two representative values Qcur and Qnear.
If the representative value Qnear is larger than the representative value Qcur, it is estimated that “the focus position“ 254 ”is more suitable for the temperature t than the focus position“ 255 ”” ”. Therefore, the focus position update process proceeds to step S222.

逆に、代表値Qcurが代表値Qnear以上であれば、温度tの設定フォーカス位置fsを変更する必要はない。そこで、フォーカス位置更新処理は図9のステップS202に移行する。   Conversely, if the representative value Qcur is equal to or greater than the representative value Qnear, it is not necessary to change the set focus position fs of the temperature t. Therefore, the focus position update process proceeds to step S202 in FIG.

ステップS222で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、“254”に更新する。そして、フォーカス位置更新処理は図9のステップS202へと移行する。   In step S222, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to “254”. Then, the focus position update process proceeds to step S202 in FIG.

さて、図12のステップS223〜S229は、温度tに対応する集計テーブル601−jにおいて、フォーカス位置(f−1)とfと(f+1)の3つの行のそれぞれに十分な量のデータが蓄積されているときに実行される。   In steps S223 to S229 in FIG. 12, a sufficient amount of data is accumulated in each of the three rows of the focus positions (f-1), f, and (f + 1) in the aggregation table 601-j corresponding to the temperature t. It is executed when it is.

ステップS223で代表値算出部302は、現在の温度tと、現在のフォーカス位置fよりも1段階だけニア側のフォーカス位置(f−1)との組み合わせに対応する代表値Qnearを算出する。具体的には、代表値算出部302は、温度tとフォーカス位置(f−1)の組み合わせに対応して集計テーブル601−jに記憶されている有効な平均値aj,f−1,dの算術平均を、代表値Qnearとして算出する。式(8)によれば、ステップS220における代表値Qnearは、「Qnear=Qj,f−1」と表される。 In step S223, the representative value calculation unit 302 calculates a representative value Qnear corresponding to the combination of the current temperature t and the focus position (f-1) on the near side by one step from the current focus position f. Specifically, the representative value calculation unit 302 corresponds to the effective average values a j, f−1, d stored in the aggregation table 601-j corresponding to the combination of the temperature t and the focus position (f−1). Is calculated as a representative value Qnearar. According to Equation (8), the representative value Qnear in step S220 is expressed as “Qnear = Q j, f−1 ”.

また、ステップS224で代表値算出部302は、現在の温度tと現在のフォーカス位置fの組み合わせに対応する代表値Qcurを算出する。具体的には、代表値算出部302は、温度tとフォーカス位置fの組み合わせに対応して集計テーブル601−jに記憶されている有効な平均値aj,f,dの算術平均を、代表値Qcurとして算出する。式(8)によれば、ステップS224における代表値Qcurは、「Qcur=Qj,f」と表される。 In step S224, the representative value calculation unit 302 calculates a representative value Qcur corresponding to the combination of the current temperature t and the current focus position f. Specifically, the representative value calculation unit 302 represents the arithmetic average of the effective average values a j, f, d stored in the tabulation table 601-j corresponding to the combination of the temperature t and the focus position f as a representative. Calculated as the value Qcur. According to Expression (8), the representative value Qcur in step S224 is expressed as “Qcur = Q j, f ”.

さらに、ステップS225で代表値算出部302は、現在の温度tと、現在のフォーカス位置fよりも1段階だけファー側のフォーカス位置(f+1)との組み合わせに対応する代表値Qfarを算出する。具体的には、代表値算出部302は、温度tとフォーカス位置(f+1)の組み合わせに対応して集計テーブル601−jに記憶されている有効な平均値aj,f+1,dの算術平均を、代表値Qfarとして算出する。式(8)によれば、ステップS225における代表値Qfarは、「Qfar=Qj,f+1」と表される。 Further, in step S225, the representative value calculation unit 302 calculates a representative value Qfar corresponding to a combination of the current temperature t and the far-side focus position (f + 1) by one step from the current focus position f. Specifically, the representative value calculation unit 302 calculates the arithmetic average of the effective average values a j, f + 1, d stored in the aggregation table 601-j corresponding to the combination of the temperature t and the focus position (f + 1). , Calculated as a representative value Qfar. According to equation (8), the representative value Qfar in step S225 is represented as “Qfar = Q j, f + 1 ”.

そして、ステップS226では、焦点距離制御部303が、3つの代表値QnearとQcurとQfarの最大値が代表値Qnearであるか否かを判断する。もし、代表値Qnearが3つの代表値の中で最大ならば、「温度tには、フォーカス位置fやフォーカス位置(f+1)よりも、フォーカス位置(f−1)の方が適している」と推測される。そこで、フォーカス位置更新処理はステップS227に移行する。   In step S226, the focal length control unit 303 determines whether the maximum value of the three representative values Qnear, Qcur, and Qfar is the representative value Qnear. If the representative value Qnear is the maximum among the three representative values, “the focus position (f−1) is more suitable for the temperature t than the focus position f or the focus position (f + 1)”. Guessed. Therefore, the focus position update process proceeds to step S227.

逆に、代表値Qnearが3つの代表値の中で最大ではない場合は、フォーカス位置更新処理はステップS228に移行する。   Conversely, if the representative value Qnear is not the maximum among the three representative values, the focus position update process proceeds to step S228.

ステップS227で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、フォーカス位置(f−1)に更新する。そして、フォーカス位置更新処理は図9のステップS202へと移行する。   In step S227, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to the focus position (f-1). Then, the focus position update process proceeds to step S202 in FIG.

さて、ステップS228では、焦点距離制御部303が、3つの代表値QnearとQcurとQfarの最大値が代表値Qfarであるか否かを判断する。もし、代表値Qfarが3つの代表値の中で最大ならば、「温度tには、フォーカス位置fやフォーカス位置(f−1)よりも、フォーカス位置(f+1)の方が適している」と推測される。そこで、フォーカス位置更新処理はステップS229に移行する。   In step S228, the focal length control unit 303 determines whether the maximum value of the three representative values Qnear, Qcur, and Qfar is the representative value Qfar. If the representative value Qfar is the maximum among the three representative values, “the focus position (f + 1) is more suitable for the temperature t than the focus position f or the focus position (f−1)”. Guessed. Therefore, the focus position update process proceeds to step S229.

逆に、ステップS228で代表値Qfarが3つの代表値の中で最大ではないと判断される場合、現在のフォーカス位置fに対応する代表値Qcurが3つの代表値の中で最大である。この場合、温度tの設定フォーカス位置fsを変更する必要はない。そこで、フォーカス位置更新処理は図9のステップS202に移行する。   Conversely, if it is determined in step S228 that the representative value Qfar is not the maximum among the three representative values, the representative value Qcur corresponding to the current focus position f is the maximum among the three representative values. In this case, it is not necessary to change the set focus position fs of the temperature t. Therefore, the focus position update process proceeds to step S202 in FIG.

ステップS229で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、フォーカス位置(f+1)に更新する。そして、フォーカス位置更新処理は図9のステップS202へと移行する。   In step S229, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to the focus position (f + 1). Then, the focus position update process proceeds to step S202 in FIG.

さて、図13のステップS230〜S234は、以下の(18a)の場合かつ(18b)の場合に実行される。   Steps S230 to S234 in FIG. 13 are executed in the following cases (18a) and (18b).

(18a)温度tに対応する集計テーブル601−jにおいて、フォーカス位置fと(f−1)の行のそれぞれに十分な量のデータが蓄積されている。よって、「フォーカス位置fと(f−1)のどちらが温度tにより適しているか」ということ(換言すれば「設定フォーカス位置fsの値を減らすことが好ましいか否か」ということ)を、実際に蓄積された十分な量のデータに基づいて推測することが可能である。
(18b)しかし、温度tに対応する集計テーブル601−jにおいて、フォーカス位置(f+1)の行には十分な量のデータが蓄積されていない。よって、「フォーカス位置fと(f+1)のどちらが温度tにより適しているか」ということを、実際に蓄積された十分な量のデータに基づいて推測することはできない。しかしながら、「温度tのときはフォーカス位置fよりフォーカス位置(f+1)の方が適切である」という可能性は残っている。
(18a) In the aggregation table 601-j corresponding to the temperature t, a sufficient amount of data is accumulated in each of the rows of the focus position f and (f-1). Therefore, “whether the focus position f or (f−1) is more suitable for the temperature t” (in other words, “whether it is preferable to reduce the value of the set focus position fs”) is actually determined. Inferences can be made based on a sufficient amount of accumulated data.
(18b) However, in the aggregation table 601-j corresponding to the temperature t, a sufficient amount of data is not accumulated in the row of the focus position (f + 1). Therefore, it cannot be inferred based on a sufficient amount of data that is actually accumulated which one of the focus position f and (f + 1) is more suitable for the temperature t. However, the possibility that “the focus position (f + 1) is more appropriate than the focus position f at the temperature t” remains.

ステップS230で代表値算出部302は、ステップS224と同様にして、現在の温度tと現在のフォーカス位置fの組み合わせに対応する代表値Qcurを算出する。
また、ステップS231で代表値算出部302は、ステップS223と同様にして、現在の温度tと、現在のフォーカス位置fよりも1段階だけニア側のフォーカス位置(f−1)との組み合わせに対応する代表値Qnearを算出する。
In step S230, the representative value calculation unit 302 calculates the representative value Qcur corresponding to the combination of the current temperature t and the current focus position f in the same manner as in step S224.
In step S231, the representative value calculation unit 302 corresponds to the combination of the current temperature t and the focus position (f-1) on the near side by one step from the current focus position f in the same manner as in step S223. The representative value Qnear to be calculated is calculated.

そして、ステップS232では、焦点距離制御部303が、2つの代表値QcurとQnearを比較する。
もし、代表値Qnearの方が代表値Qcurよりも大きければ、「温度tには、フォーカス位置fよりもフォーカス位置(f−1)の方が適している」と推測される。この推測は、上記(18a)に述べたように、実際に蓄積されたデータに基づく推測である。よって、上記(18b)に述べた可能性を検証するために試行錯誤的に設定フォーカス位置fsの値を増やすよりも、この推測にしたがって設定フォーカス位置fsの値を減らす方が好ましい。そこで、フォーカス位置更新処理はステップS233に移行する。
In step S232, the focal length control unit 303 compares the two representative values Qcur and Qnear.
If the representative value Qnear is larger than the representative value Qcur, it is estimated that “the focus position (f−1) is more suitable for the temperature t than the focus position f”. As described in the above (18a), this estimation is based on the actually accumulated data. Therefore, it is preferable to decrease the value of the set focus position fs according to this estimation rather than increasing the value of the set focus position fs by trial and error in order to verify the possibility described in (18b) above. Therefore, the focus position update process proceeds to step S233.

逆に、代表値Qcurが代表値Qnear以上のとき、「温度tには、フォーカス位置(f−1)とfが同程度に適しているか、または、温度tには、フォーカス位置(f−1)よりもフォーカス位置fの方が適している」と推測される。この推測は、上記(18a)に述べたように、実際に蓄積されたデータに基づく推測である。よって、この推測に逆らって設定フォーカス位置fsの値を減らすことは好ましくない。一方で、この推測は、上記(18b)に述べた可能性を否定するものではないから、当該可能性は依然として残っている。そこで、試行錯誤的に設定フォーカス位置fsの値を増やすことで当該可能性を検証する余地がある。よって、フォーカス位置更新処理はステップS234に移行する。   Conversely, when the representative value Qcur is equal to or greater than the representative value Qnear, “the focus position (f−1) and f are suitable for the temperature t, or the focus position (f−1) is suitable for the temperature t. It is presumed that the focus position f is more suitable than As described in the above (18a), this estimation is based on the actually accumulated data. Therefore, it is not preferable to reduce the value of the set focus position fs against this assumption. On the other hand, since this assumption does not deny the possibility described in (18b) above, the possibility still remains. Therefore, there is room for verifying the possibility by increasing the value of the set focus position fs by trial and error. Therefore, the focus position update process proceeds to step S234.

ステップS233で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、フォーカス位置(f−1)に更新する。そして、フォーカス位置更新処理は図9のステップS202へと移行する。   In step S233, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to the focus position (f-1). Then, the focus position update process proceeds to step S202 in FIG.

ステップS234で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、フォーカス位置(f+1)に更新する。そして、フォーカス位置更新処理は図9のステップS202へと移行する。   In step S234, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to the focus position (f + 1). Then, the focus position update process proceeds to step S202 in FIG.

さて、図13のステップS235〜S239は、以下の(19a)の場合かつ(19b)の場合に実行される。   Steps S235 to S239 in FIG. 13 are executed in the following cases (19a) and (19b).

(19a)温度tに対応する集計テーブル601−jにおいて、フォーカス位置fと(f+1)の行のそれぞれに十分な量のデータが蓄積されている。よって、「フォーカス位置fと(f+1)のどちらが温度tにより適しているか」ということ(換言すれば「設定フォーカス位置fsの値を増やすことが好ましいか否か」ということ)を、実際に蓄積された十分な量のデータに基づいて推測することが可能である。
(19b)しかし、温度tに対応する集計テーブル601−jにおいて、フォーカス位置(f−1)の行には十分な量のデータが蓄積されていない。よって、「フォーカス位置fと(f−1)のどちらが温度tにより適しているか」ということを、実際に蓄積された十分な量のデータに基づいて推測することはできない。しかしながら、「温度tのときはフォーカス位置fよりフォーカス位置(f−1)の方が適切である」という可能性は残っている。
(19a) In the aggregation table 601-j corresponding to the temperature t, a sufficient amount of data is accumulated in each of the rows of the focus position f and (f + 1). Therefore, “which of the focus position f and (f + 1) is more suitable for the temperature t” (in other words, “whether it is preferable to increase the value of the set focus position fs”) is actually accumulated. It is possible to make a guess based on a sufficient amount of data.
(19b) However, in the aggregation table 601-j corresponding to the temperature t, a sufficient amount of data is not accumulated in the row of the focus position (f-1). Therefore, it cannot be estimated based on a sufficient amount of data that is actually accumulated that “which of the focus position f and (f−1) is more suitable for the temperature t”. However, there remains a possibility that the focus position (f-1) is more appropriate than the focus position f at the temperature t.

ステップS235で代表値算出部302は、ステップS224と同様にして、現在の温度tと現在のフォーカス位置fの組み合わせに対応する代表値Qcurを算出する。
また、ステップS236で代表値算出部302は、ステップS225と同様にして、現在の温度tと、現在のフォーカス位置fよりも1段階だけファー側のフォーカス位置(f+1)との組み合わせに対応する代表値Qfarを算出する。
In step S235, the representative value calculation unit 302 calculates the representative value Qcur corresponding to the combination of the current temperature t and the current focus position f in the same manner as in step S224.
In step S236, the representative value calculation unit 302 similarly to step S225, the representative corresponding to the combination of the current temperature t and the far-side focus position (f + 1) by one step from the current focus position f. The value Qfar is calculated.

そして、ステップS237では、焦点距離制御部303が、2つの代表値QcurとQfarを比較する。
もし、代表値Qfarの方が代表値Qcurよりも大きければ、「温度tには、フォーカス位置fよりもフォーカス位置(f+1)の方が適している」と推測される。この推測は、上記(19a)に述べたように、実際に蓄積されたデータに基づく推測である。よって、上記(19b)に述べた可能性を検証するために試行錯誤的に設定フォーカス位置fsの値を減らすよりも、この推測にしたがって設定フォーカス位置fsの値を増やす方が好ましい。そこで、フォーカス位置更新処理はステップS238に移行する。
In step S237, the focal length control unit 303 compares the two representative values Qcur and Qfar.
If the representative value Qfar is larger than the representative value Qcur, it is estimated that “the focus position (f + 1) is more suitable for the temperature t than the focus position f”. As described in the above (19a), this guess is a guess based on the actually accumulated data. Therefore, it is preferable to increase the value of the set focus position fs according to this estimation, rather than reducing the value of the set focus position fs by trial and error in order to verify the possibility described in (19b). Therefore, the focus position update process proceeds to step S238.

逆に、代表値Qcurが代表値Qfar以上のとき、「温度tには、フォーカス位置(f+1)とfが同程度に適しているか、または、温度tには、フォーカス位置(f+1)よりもフォーカス位置fの方が適している」と推測される。この推測は、上記(19a)に述べたように、実際に蓄積されたデータに基づく推測である。よって、この推測に逆らって設定フォーカス位置fsの値を増やすことは好ましくない。一方で、この推測は、上記(19b)に述べた可能性を否定するものではないから、当該可能性は依然として残っている。そこで、試行錯誤的に設定フォーカス位置fsの値を減らすことで当該可能性を検証する余地がある。よって、フォーカス位置更新処理はステップS239に移行する。   Conversely, when the representative value Qcur is equal to or greater than the representative value Qfar, “the focus position (f + 1) and f are suitable for the temperature t, or the temperature t is more focused than the focus position (f + 1). It is presumed that the position f is more suitable. As described in the above (19a), this guess is a guess based on the actually accumulated data. Therefore, it is not preferable to increase the value of the set focus position fs against this assumption. On the other hand, since this assumption does not deny the possibility described in the above (19b), the possibility still remains. Therefore, there is room for verifying the possibility by reducing the value of the set focus position fs through trial and error. Therefore, the focus position update process proceeds to step S239.

ステップS238で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、フォーカス位置(f+1)に更新する。そして、フォーカス位置更新処理は図9のステップS202へと移行する。   In step S238, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to the focus position (f + 1). Then, the focus position update process proceeds to step S202 in FIG.

ステップS239で焦点距離制御部303は、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsを、フォーカス位置(f−1)に更新する。そして、フォーカス位置更新処理は図9のステップS202へと移行する。   In step S239, the focal length control unit 303 updates the set focus position fs corresponding to the temperature t in the focus position table 620 to the focus position (f-1). Then, the focus position update process proceeds to step S202 in FIG.

次に、以上説明した図7〜13のフローチャートにしたがって焦点距離がどのように変更されるのかという、具体的ないくつかの動作例について、図14を参照して説明する。
上記のとおり、(10a)〜(10c)のような予備的作業が行われ、その後、図7〜8の動的調整処理が開始される。動的調整処理の開始時点で温度検出装置320が検出する温度が、例えば、24℃であったとし、フォーカス位置テーブル620において、24℃という温度に対応して記憶されているフォーカス位置fsが、例えば、“52”であったとする。
Next, some specific operation examples of how the focal length is changed according to the flowcharts of FIGS. 7 to 13 described above will be described with reference to FIG.
As described above, preliminary operations such as (10a) to (10c) are performed, and then the dynamic adjustment processing of FIGS. 7 to 8 is started. Assuming that the temperature detected by the temperature detection device 320 at the start of the dynamic adjustment processing is, for example, 24 ° C., the focus position fs stored in the focus position table 620 corresponding to the temperature of 24 ° C. is For example, assume that it is “52”.

この場合、撮像装置310にフォーカス位置“52”が設定される。図14の状態F1は、設定フォーカス位置fsが“52”の状態を示す。
説明の簡単化のため、図14のどの動作例でも温度は変化しないものとすると、特定文字パターンの写った画像が撮像されるたびに図8のステップS124でフォーカス位置更新処理が行われる。しかし、24℃と“52”の組み合わせに対応する十分な量のデータが蓄積されるまでは、フォーカス位置更新処理は、実行のたびに、図9のステップS201からステップS202へと進む。よって、設定フォーカス位置fsは変わらない。
In this case, the focus position “52” is set in the imaging device 310. A state F1 in FIG. 14 indicates a state where the set focus position fs is “52”.
For simplicity of explanation, assuming that the temperature does not change in any of the operation examples in FIG. 14, the focus position update process is performed in step S124 in FIG. 8 each time an image with a specific character pattern is captured. However, until a sufficient amount of data corresponding to the combination of 24 ° C. and “52” is accumulated, the focus position update process proceeds from step S201 in FIG. 9 to step S202 each time it is executed. Therefore, the set focus position fs does not change.

その後、24℃と“52”の組み合わせに対応する十分な量のデータが蓄積された後に、フォーカス位置更新処理が実行されると、今度はステップS210で24℃に対応する設定フォーカス位置が“51”または“53”に変更される。   Thereafter, when a sufficient amount of data corresponding to the combination of 24 ° C. and “52” is accumulated and then the focus position update process is executed, the set focus position corresponding to 24 ° C. is now set to “51” in step S210. "Or" 53 ".

説明の便宜上、変更後の設定フォーカス位置が“53”だとする。図14の状態F2は、こうして設定フォーカス位置fsが“53”に変更された状態を示す。なお、図14における状態F1から状態F2への太い矢印は、データが蓄積されるが設定フォーカス位置fsが変更されない期間を表す。他の太い矢印も同様である。   For convenience of explanation, it is assumed that the set focus position after the change is “53”. A state F2 in FIG. 14 shows a state in which the set focus position fs is changed to “53”. Note that a thick arrow from the state F1 to the state F2 in FIG. 14 represents a period in which data is accumulated but the set focus position fs is not changed. The same applies to the other thick arrows.

24℃と“53”の組み合わせに対応する十分な量のデータが蓄積されるまでは、フォーカス位置更新処理は、実行のたびに、ステップS201からステップS202へと進む。よって、設定フォーカス位置fsは変わらない。   Until a sufficient amount of data corresponding to the combination of 24 ° C. and “53” is accumulated, the focus position update process proceeds from step S201 to step S202 each time it is executed. Therefore, the set focus position fs does not change.

その後、24℃と“53”の組み合わせに対応する十分な量のデータが蓄積された後に、フォーカス位置更新処理が実行されると、今度は、図13のステップS230〜S232が実行される。なぜなら、24℃と“53”の組み合わせと、24℃と“52”の組み合わせの各々に対応する十分な量のデータは既に蓄積されているが、24℃と“54”の組み合わせに対応するデータは未蓄積だからである。   Thereafter, when a sufficient amount of data corresponding to the combination of 24 ° C. and “53” is accumulated and then the focus position update process is executed, steps S230 to S232 in FIG. 13 are executed. This is because a sufficient amount of data corresponding to the combination of 24 ° C. and “53” and the combination of 24 ° C. and “52” has already been accumulated, but the data corresponding to the combination of 24 ° C. and “54”. This is because is not accumulated.

この場合、ステップS230で算出される代表値Qcurは、24℃と“53”の組み合わせに対応する。また、ステップS231で算出される代表値Qnearは、24℃と“52”の組み合わせに対応する。   In this case, the representative value Qcur calculated in step S230 corresponds to a combination of 24 ° C. and “53”. The representative value Qnear calculated in step S231 corresponds to a combination of 24 ° C. and “52”.

ステップS232において、もしQnear≦Qcurであれば、設定フォーカス位置fsはステップS234で“54”に変更される。図14の状態F3は、こうして設定フォーカス位置fsが“54”に変更された状態を示す。   In step S232, if Qnear ≦ Qcur, the set focus position fs is changed to “54” in step S234. A state F3 in FIG. 14 shows a state in which the set focus position fs is changed to “54”.

24℃と“54”の組み合わせに対応する十分な量のデータが蓄積されるまでは、フォーカス位置更新処理は、実行のたびに、ステップS201からステップS202へと進む。よって、設定フォーカス位置fsは変わらない。   Until a sufficient amount of data corresponding to the combination of 24 ° C. and “54” is accumulated, the focus position update process proceeds from step S201 to step S202 each time it is executed. Therefore, the set focus position fs does not change.

その後、24℃と“54”の組み合わせに対応する十分な量のデータが蓄積された後に、フォーカス位置更新処理が実行されると、今度は、図13のステップS230〜S232が実行される。なぜなら、24℃と“54”の組み合わせと、24℃と“53”の組み合わせの各々に対応する十分な量のデータは既に蓄積されているが、24℃と“55”の組み合わせに対応するデータは未蓄積だからである。   Thereafter, after a sufficient amount of data corresponding to the combination of 24 ° C. and “54” is accumulated, when the focus position update process is executed, steps S230 to S232 in FIG. 13 are executed. This is because a sufficient amount of data corresponding to the combination of 24 ° C. and “54” and the combination of 24 ° C. and “53” has already been accumulated, but the data corresponding to the combination of 24 ° C. and “55”. This is because is not accumulated.

この場合、ステップS230で算出される代表値Qcurは、24℃と“54”の組み合わせに対応する。また、ステップS231で算出される代表値Qnearは、24℃と“53”の組み合わせに対応する。   In this case, the representative value Qcur calculated in step S230 corresponds to a combination of 24 ° C. and “54”. The representative value Qnear calculated in step S231 corresponds to a combination of 24 ° C. and “53”.

ステップS232において、もしQnear≦Qcurであれば、設定フォーカス位置fsはステップS234で“55”に変更される。図14の状態F4は、こうして設定フォーカス位置fsが“55”に変更された状態を示す。   In step S232, if Qnear ≦ Qcur, the set focus position fs is changed to “55” in step S234. A state F4 in FIG. 14 shows a state in which the set focus position fs is changed to “55”.

24℃と“55”の組み合わせに対応する十分な量のデータが蓄積されるまでは、フォーカス位置更新処理は、実行のたびに、ステップS201からステップS202へと進む。よって、設定フォーカス位置fsは変わらない。   Until a sufficient amount of data corresponding to the combination of 24 ° C. and “55” is accumulated, the focus position update process proceeds from step S201 to step S202 each time it is executed. Therefore, the set focus position fs does not change.

その後、24℃と“55”の組み合わせに対応する十分な量のデータが蓄積された後に、フォーカス位置更新処理が実行されると、今度は、図13のステップS230〜S232が実行される。なぜなら、24℃と“55”の組み合わせと、24℃と“54”の組み合わせの各々に対応する十分な量のデータは既に蓄積されているが、24℃と“56”の組み合わせに対応するデータは未蓄積だからである。   After that, when a sufficient amount of data corresponding to the combination of 24 ° C. and “55” is accumulated and then the focus position update process is executed, steps S230 to S232 in FIG. 13 are executed. This is because a sufficient amount of data corresponding to the combination of 24 ° C. and “55” and the combination of 24 ° C. and “54” has already been accumulated, but the data corresponding to the combination of 24 ° C. and “56”. This is because is not accumulated.

この場合、ステップS230で算出される代表値Qcurは、24℃と“55”の組み合わせに対応する。また、ステップS231で算出される代表値Qnearは、24℃と“54”の組み合わせに対応する。   In this case, the representative value Qcur calculated in step S230 corresponds to a combination of 24 ° C. and “55”. The representative value Qnear calculated in step S231 corresponds to a combination of 24 ° C. and “54”.

ステップS232において、もしQnear>Qcurであれば、設定フォーカス位置fsは、ステップS233で“54”に変更される。図14の状態F5は、こうして設定フォーカス位置fsが“54”に戻された状態を示す。   In step S232, if Qnear> Qcur, the set focus position fs is changed to “54” in step S233. A state F5 in FIG. 14 shows a state in which the set focus position fs has been returned to “54”.

そして、次にフォーカス位置更新処理が実行されると、図12のステップS223〜S225が実行される。なぜなら、24℃と“54”の組み合わせと、24℃と“53”の組み合わせと、24℃と“55”の組み合わせの各々に対応する十分な量のデータが既に蓄積されているからである。   Then, when the focus position update process is executed next, steps S223 to S225 in FIG. 12 are executed. This is because a sufficient amount of data corresponding to each of the combination of 24 ° C. and “54”, the combination of 24 ° C. and “53”, and the combination of 24 ° C. and “55” has already been accumulated.

この場合、ステップS223で算出される代表値Qnearは、24℃と“53”の組み合わせに対応する。また、ステップS224で算出される代表値Qcurは、24℃と“54”の組み合わせに対応する。そして、ステップS225で算出される代表値Qfarは、24℃と“55”の組み合わせに対応する。   In this case, the representative value Qnear calculated in step S223 corresponds to a combination of 24 ° C. and “53”. The representative value Qcur calculated in step S224 corresponds to a combination of 24 ° C. and “54”. The representative value Qfar calculated in step S225 corresponds to a combination of 24 ° C. and “55”.

ところで、以上の処理の流れから分かるとおり、設定フォーカス位置fsが“55”から“54”に戻されてから、特定文字パターンの写った画像は、まだ1枚しか撮像されていない。そのため、24℃に対応する集計テーブルのデータ(具体的にはフォーカス位置“54”の行のデータ)も、それほど変化していない。   By the way, as can be seen from the above processing flow, after the set focus position fs is returned from “55” to “54”, only one image of the specific character pattern has been captured. For this reason, the data in the aggregation table corresponding to 24 ° C. (specifically, the data in the row at the focus position “54”) has not changed much.

よって、多くの場合は、ステップS223〜S225で算出された3つの代表値のうちで代表値Qcurが最大であると考えられる。したがって、多くの場合において、フォーカス位置更新処理は図12のステップS228から図9のステップS202へと進み、設定フォーカス位置fs自体は“54”のまま変わらない。図14の状態F6は、こうして設定フォーカス位置fsが「変更不要」と判断された状態を示す。   Therefore, in many cases, it is considered that the representative value Qcur is the maximum among the three representative values calculated in steps S223 to S225. Therefore, in many cases, the focus position update process proceeds from step S228 in FIG. 12 to step S202 in FIG. 9, and the set focus position fs itself remains “54”. A state F6 in FIG. 14 shows a state in which the set focus position fs is thus determined to be “change unnecessary”.

以上例示したような状態F1から状態F6までの変遷は、次の(20a)〜(20c)のことを意味する。   The transition from the state F1 to the state F6 as exemplified above means the following (20a) to (20c).

(20a)設定フォーカス位置fsを“52”から増やすにつれて、代表値が改善するが、代表値がピークに達するのは、設定フォーカス位置fsが“54”のときである。設定フォーカス位置fsを“54”から“55”に変更すると、代表値は悪化する。
(20b)試行錯誤の過程で、一旦は代表値が悪化する方向に設定フォーカス位置fsが変更されるが、その後、設定フォーカス位置fsは、より適切な“54”に戻される。状態F6の後は、仮に温度変化が起きないものとし、撮像装置310の経時変化も無視することができる程度だとすると、設定フォーカス位置fsは“54”で安定する。
(20c)すなわち、焦点距離調整システム300は、指標値を利用したフィードバックにより、適切な設定フォーカス位置fsを自動的に見つけ出すことができる。
(20a) The representative value improves as the set focus position fs is increased from “52”, but the representative value reaches the peak when the set focus position fs is “54”. When the set focus position fs is changed from “54” to “55”, the representative value deteriorates.
(20b) In the process of trial and error, the set focus position fs is once changed in the direction in which the representative value deteriorates, but then the set focus position fs is returned to a more appropriate “54”. If the temperature change does not occur after the state F6 and the change over time of the imaging device 310 is negligible, the set focus position fs is stabilized at “54”.
(20c) That is, the focal length adjustment system 300 can automatically find an appropriate set focus position fs by feedback using the index value.

もちろん、状態F6の後、温度が変化することもあり得る。例えば、温度が24℃から23℃になった場合は、今度は、23℃に対応する集計テーブル(すなわち、すべてのセルが初期状態のままの集計テーブル)が参照される。そして、データの蓄積と試行錯誤の過程を経て、23℃という温度により適した設定フォーカス位置fsが見出される。   Of course, the temperature may change after the state F6. For example, when the temperature is changed from 24 ° C. to 23 ° C., a totaling table corresponding to 23 ° C. (that is, a totaling table in which all cells are in the initial state) is referred to. Then, through a process of data accumulation and trial and error, a set focus position fs more suitable for a temperature of 23 ° C. is found.

また、その後さらに温度が23℃から24℃に戻る場合もある。その場合は、温度が24℃に戻ってからすぐに、“54”という設定フォーカス位置fsが撮像装置310に設定される。   Further, the temperature may further return from 23 ° C. to 24 ° C. thereafter. In that case, immediately after the temperature returns to 24 ° C., the set focus position fs of “54” is set in the imaging device 310.

ところで、状態F4の後に、24℃と“55”の組み合わせに対応する十分な量のデータが蓄積され、上記のように図13のステップS230〜S232が実行されたとき、ステップS232において、Qnear≦Qcurと判断される場合もあり得る。この場合、設定フォーカス位置fsは、ステップS234で“56”に変更される。   Incidentally, after the state F4, a sufficient amount of data corresponding to the combination of 24 ° C. and “55” is accumulated, and when steps S230 to S232 of FIG. 13 are executed as described above, in step S232, Qnear ≦ It may be determined as Qcur. In this case, the set focus position fs is changed to “56” in step S234.

図14の状態F7は、こうして設定フォーカス位置fsが“56”に変更された状態を示す。状態F7の後は、24℃と“56”の組み合わせに対応する十分な量のデータが蓄積されるまで、設定フォーカス位置fsは変わらない。   A state F7 in FIG. 14 shows a state in which the set focus position fs is changed to “56”. After the state F7, the set focus position fs does not change until a sufficient amount of data corresponding to the combination of 24 ° C. and “56” is accumulated.

また、状態F3の後に、24℃と“54”の組み合わせに対応する十分な量のデータが蓄積され、上記のように図13のステップS230〜S232が実行されたとき、ステップS232において、Qnear>Qcurと判断される場合もあり得る。この場合、設定フォーカス位置fsは、ステップS233で“53”に戻される。   Further, after the state F3, a sufficient amount of data corresponding to the combination of 24 ° C. and “54” is accumulated, and when steps S230 to S232 of FIG. 13 are executed as described above, in step S232, Qnear> It may be determined as Qcur. In this case, the set focus position fs is returned to “53” in step S233.

図14の状態F8は、こうして設定フォーカス位置fsが“53”に戻された状態を示す。状態F1から状態F2へ、状態F2から状態F3へ、状態F3から状態F8へ、という変遷により表される動作例は、設定フォーカス位置fsが“53”のときに代表値がピークに達する場合に該当する。   A state F8 in FIG. 14 shows a state where the set focus position fs has been returned to “53”. The operation example represented by the transition from the state F1 to the state F2, from the state F2 to the state F3, and from the state F3 to the state F8 is when the representative value reaches the peak when the set focus position fs is “53”. Applicable.

さて、状態F2の後に、24℃と“53”の組み合わせに対応する十分な量のデータが蓄積され、上記のように図13のステップS230〜S232が実行されたとき、ステップS232において、Qnear>Qcurと判断される場合もあり得る。この場合、設定フォーカス位置fsは、ステップS233で“52”に戻される。   Now, after the state F2, when a sufficient amount of data corresponding to the combination of 24 ° C. and “53” is accumulated and steps S230 to S232 of FIG. 13 are executed as described above, in step S232, Qnea> It may be determined as Qcur. In this case, the set focus position fs is returned to “52” in step S233.

図14の状態F9は、こうして設定フォーカス位置fsが“52”に戻された状態を示す。そして、次にフォーカス位置更新処理が実行されると、図13のステップS235〜S237が実行される。なぜなら、24℃と“52”の組み合わせと、24℃と“53”の組み合わせの各々に対応する十分な量のデータは既に蓄積されているが、24℃と“51”の組み合わせに対応するデータは未蓄積だからである。   A state F9 in FIG. 14 shows a state where the set focus position fs has been returned to “52”. Then, when the focus position update process is executed next, steps S235 to S237 in FIG. 13 are executed. This is because a sufficient amount of data corresponding to the combination of 24 ° C. and “52” and the combination of 24 ° C. and “53” has already been accumulated, but the data corresponding to the combination of 24 ° C. and “51”. This is because is not accumulated.

この場合、代表値Qcurは、24℃と“52”の組み合わせに対応し、代表値Qfarは、24℃と“53”の組み合わせに対応する。
ところで、設定フォーカス位置fsが“53”から“52”に戻されてから、特定文字パターンの写った画像は、まだ1枚しか撮像されていない。そのため、24℃に対応する集計テーブルのデータ(具体的にはフォーカス位置“52”の行のデータ)も、それほど変化していない。
In this case, the representative value Qcur corresponds to a combination of 24 ° C. and “52”, and the representative value Qfar corresponds to a combination of 24 ° C. and “53”.
By the way, after the set focus position fs is returned from “53” to “52”, only one image of the specific character pattern has been captured. For this reason, the data in the aggregation table corresponding to 24 ° C. (specifically, the data in the row at the focus position “52”) has not changed much.

よって、多くの場合は、Qfar≦Qcurであると考えられる。したがって、多くの場合において、フォーカス位置更新処理は図13のステップS237からステップS239へと進み、ステップS239で設定フォーカス位置fsが“51”に変更される。   Therefore, in many cases, it is considered that Qfar ≦ Qcur. Accordingly, in many cases, the focus position update process proceeds from step S237 of FIG. 13 to step S239, and the set focus position fs is changed to “51” in step S239.

図14の状態F10は、こうして設定フォーカス位置fsが“51”に変更された状態を示す。状態F10の後は、24℃と“51”の組み合わせに対応する十分な量のデータが蓄積されるまで、設定フォーカス位置fsは変わらない。   A state F10 in FIG. 14 shows a state in which the set focus position fs is changed to “51”. After the state F10, the set focus position fs does not change until a sufficient amount of data corresponding to the combination of 24 ° C. and “51” is accumulated.

状態F1から状態F2へ、状態F2から状態F9へ、状態F9から状態F10へ、という変遷は、次の(21a)〜(21c)のことを意味する。   The transition from the state F1 to the state F2, from the state F2 to the state F9, and from the state F9 to the state F10 means the following (21a) to (21c).

(21a)状態F1の後のステップS210における新たな設定フォーカス位置fsの選択が不適切だったということが、状態F2の後のステップS232で判明した。
(21b)そこで、不適切と判明した方向(つまり“52”から“53”へという正の方向)とは逆の方向に設定フォーカス位置fsを変化させることで、焦点距離調整システム300は、より適切な設定フォーカス位置fsを探す。
(21c)つまり、試行錯誤の過程で一時的に代表値が悪化する方向に設定フォーカス位置fsが変更されるとしても、設定フォーカス位置fsは、フィードバックにより、徐々により適切な値へと変更されていく。例えば状態F1〜F6の変遷と類似の過程をたどって、設定フォーカス位置fsはいずれ適切な値で安定する。
(21a) It was found in step S232 after state F2 that the selection of the new set focus position fs in step S210 after state F1 was inappropriate.
(21b) Therefore, by changing the set focus position fs in the direction opposite to the direction determined to be inappropriate (that is, the positive direction from “52” to “53”), the focal length adjustment system 300 is An appropriate set focus position fs is searched.
(21c) That is, even if the set focus position fs is changed in a direction in which the representative value temporarily deteriorates in the process of trial and error, the set focus position fs is gradually changed to a more appropriate value by feedback. Go. For example, following a process similar to the transition of the states F1 to F6, the set focus position fs is stabilized at an appropriate value.

以上説明したように、本実施形態によれば、温度変化や撮像装置310の経時変化に応じて、適切な設定フォーカス位置fsが探され、撮像装置310に設定される。   As described above, according to the present embodiment, an appropriate set focus position fs is searched for and set in the imaging device 310 in accordance with a change in temperature or a change with time of the imaging device 310.

また、図5の例では、各集計テーブル601−jは、21通りの距離dに対応する21本の列を含むが、列の数は実施形態に応じて適宜定められるものとする。具体的には、特定文字パターンを有する移動物体が撮像装置310の撮像視野に入る頻度と、フレームレートに応じて、集計テーブル601−jの列の数が適切に定められているものとする。   In the example of FIG. 5, each aggregation table 601-j includes 21 columns corresponding to 21 different distances d, but the number of columns is appropriately determined according to the embodiment. Specifically, it is assumed that the number of columns in the aggregation table 601-j is appropriately determined according to the frequency with which a moving object having a specific character pattern enters the imaging field of view of the imaging apparatus 310 and the frame rate.

例えば、1日に数千を超える移動物体が撮像装置310の撮像視野内を通過していくような場所に、撮像装置310が設置されることもある。また、ある程度高いフレームレート(例えば30fpsなど)で撮像が行われる場合、1つの特定文字パターンが、複数の連続したフレーム画像に、異なる位置で写ることがある。したがって、多くの移動物体が通過する場所に撮像装置310が設置されている場合や、フレームレートがある程度高い場合には、集計テーブル601−jの列の数がある程度多くても、データスパースネス(data sparseness)問題が生じる可能性は低い。   For example, the imaging device 310 may be installed in a place where several thousand moving objects per day pass through the imaging field of the imaging device 310. In addition, when imaging is performed at a somewhat high frame rate (for example, 30 fps), one specific character pattern may appear in different positions on a plurality of continuous frame images. Therefore, when the imaging device 310 is installed in a place where many moving objects pass, or when the frame rate is high to some extent, the data sparseness ( data sparseness) problems are unlikely.

また、図7〜14とともに説明したように、本実施形態では、設定フォーカス位置fsが、デフォルト値から徐々に調整される。一方で、たとえ撮像装置310に製造ばらつきなどの個体差があるといっても、同じモデルの撮像装置310同士の間に極端に大きな差があるわけではない。よって、予備実験などによって、ある程度適切と思われるデフォルト値を調査して、調査結果に応じてフォーカス位置テーブル620にある程度適切なデフォルト値が設定されていれば、実用上は何の問題もない。つまり、明らかに不適切な極端なデフォルト値ではなく、ある程度適切なデフォルト値が使われていれば、運用開始から比較的短時間で、個々の撮像装置310の特性と撮像装置310の置かれた環境に応じた適切な設定フォーカス位置fsの値が得られる。   As described with reference to FIGS. 7 to 14, in the present embodiment, the set focus position fs is gradually adjusted from the default value. On the other hand, even if there are individual differences such as manufacturing variations in the imaging devices 310, there is not an extremely large difference between the imaging devices 310 of the same model. Therefore, if a default value that seems to be appropriate to some extent is investigated by a preliminary experiment or the like, and if a default value that is appropriate to some extent is set in the focus position table 620 according to the investigation result, there is no practical problem. In other words, if an appropriate default value is used rather than an apparently inappropriate extreme default value, the characteristics of the individual image pickup devices 310 and the image pickup devices 310 are placed in a relatively short time from the start of operation. A value of the set focus position fs appropriate for the environment can be obtained.

なお、図5のフォーカス位置テーブル620には、−50℃といった非常な低温や、50℃といった非常な高温も定義されているが、温度の定義域が広くても、データスパースネス問題が生じる可能性は、無視することができる。また、フォーカス位置の定義域が広くても、データスパースネス問題が生じる可能性は、無視することができる。理由は以下のとおりである。   Note that the focus position table 620 in FIG. 5 defines a very low temperature such as −50 ° C. and a very high temperature such as 50 ° C., but a data sparseness problem may occur even if the temperature definition range is wide. Sex can be ignored. Even if the definition area of the focus position is wide, the possibility of the data sparseness problem occurring can be ignored. The reason is as follows.

例えば、滅多に−5℃以下にならない地域に撮像装置310が設置されている場合、−5℃以下の温度に対応する集計テーブルには、データが蓄積されることはほとんどないだろうが、それでも問題ない。なぜなら、設定フォーカス位置fsの調整に使われるのは、実際の温度に対応する集計テーブルだからである。   For example, if the imaging device 310 is installed in an area that rarely falls below −5 ° C., data will hardly be accumulated in the aggregation table corresponding to temperatures below −5 ° C. no problem. This is because what is used for adjusting the set focus position fs is a total table corresponding to the actual temperature.

また、図14に例示したように、設定フォーカス位置fsのデフォルト値がある程度適切に定められていれば、比較的狭い範囲の探索だけで、適切な設定フォーカス位置fsが見つかる。例えば、図14の状態F1〜F6の変遷の場合は、“52”〜“55”という比較的狭い範囲で設定フォーカス位置fsを調整するだけで、“54”という、適切な設定フォーカス位置fsの値が得られる。つまり、例えば「“0”〜“255”の全範囲」あるいは「“50”〜“200”の範囲」といった広い範囲の探索は不要である。   Further, as illustrated in FIG. 14, if the default value of the set focus position fs is appropriately determined to some extent, the appropriate set focus position fs can be found only by searching for a relatively narrow range. For example, in the case of the transition of the states F1 to F6 in FIG. 14, it is necessary to adjust the set focus position fs in a relatively narrow range of “52” to “55”, A value is obtained. That is, for example, a wide range search such as “the whole range“ 0 ”to“ 255 ”” or “the range“ 50 ”to“ 200 ”” is unnecessary.

そして、集計テーブル601−jにおいては、探索の必要がないフォーカス位置に対応する行には、別にデータが蓄積されていなくても何の問題もない。
以上のとおりなので、温度やフォーカス位置の定義域が広くても、データスパースネス問題を生じることなく、設定フォーカス位置fsが適切に調整される。そして、設定フォーカス位置fsの調整は、温度の変化や撮像装置310の経時変化を反映している。そのため、本実施形態によれば、画像内のどこに写った特定文字パターンでも、安定して高い成功率で認識することが可能となる。
In the total table 601-j, there is no problem even if data is not separately accumulated in the row corresponding to the focus position that does not need to be searched.
As described above, the set focus position fs is appropriately adjusted without causing a data sparseness problem even if the temperature and focus position definition areas are wide. The adjustment of the set focus position fs reflects a change in temperature and a change with time of the imaging device 310. Therefore, according to the present embodiment, it is possible to stably recognize a specific character pattern appearing anywhere in the image with a high success rate.

ところで、本発明は上記実施形態に限られるものではない。上記の説明においてもいくつかの変形について説明したが、上記実施形態は、例えば下記の観点から様々に変形することもできる。上記および下記の変形は、相互に矛盾しない限り、任意に組み合わせることが可能である。   By the way, the present invention is not limited to the above embodiment. Although some modifications have been described in the above description, the above embodiment can be variously modified from the following viewpoints, for example. The above and following modifications can be arbitrarily combined as long as they do not contradict each other.

上記の説明においては、説明の便宜上、撮像装置が撮像した画像から特定領域画像が抽出されるものとし、抽出された特定領域画像に対して、サイズ変更処理や画像認識処理などの処理が適用されるものとした。しかし、実施形態によっては、撮像装置が撮像した画像中の特定領域に対して、サイズ変更処理や画像認識処理などの処理が適用されてもよい。つまり、特定領域画像のデータが、元の画像(例えば画像100)のデータとは別の中間データとして、生成されたり記憶されたりしなくてもよい。   In the above description, for the sake of convenience, it is assumed that the specific area image is extracted from the image captured by the imaging device, and the extracted specific area image is subjected to processing such as size change processing and image recognition processing. It was supposed to be. However, depending on the embodiment, a process such as a size change process or an image recognition process may be applied to a specific area in an image captured by the imaging apparatus. In other words, the data of the specific area image may not be generated or stored as intermediate data different from the data of the original image (for example, the image 100).

図5には、集計テーブル601−1〜601−Nとフォーカス位置テーブル620をテーブル形式で例示した。しかし、テーブル形式以外のデータ形式が利用されてもよい。
また、上記実施形態では、図5の集計テーブル601−j(1≦j≦N)により、温度tとフォーカス位置fと距離dの組み合わせに対応する値aj,f,dとcj,f,dが管理される。しかし、実施形態によっては、距離dによる分類は省略されてもよい。距離dによる分類が行われない場合は、集計テーブル601−jの列の数が1の場合と見なせる。
FIG. 5 illustrates the tabulation tables 601-1 to 601-N and the focus position table 620 in a table format. However, a data format other than the table format may be used.
In the above embodiment, the values a j, f, d, and c j, corresponding to the combinations of the temperature t j , the focus position f, and the distance d are calculated based on the aggregation table 601-j (1 ≦ j ≦ N) in FIG. f and d are managed. However, depending on the embodiment, the classification based on the distance d may be omitted. When the classification based on the distance d is not performed, it can be considered that the number of columns in the aggregation table 601-j is 1.

距離dによる分類が行われない場合、リングバッファを距離dごとに設ける必要もないし、図7のステップS112の距離dの算出も省略可能である。また、この場合、図8のステップS117〜S120の説明における「温度t、フォーカス位置f、および距離dの組み合わせ」は、「温度tとフォーカス位置fの組み合わせ」に変更される。   When the classification based on the distance d is not performed, it is not necessary to provide a ring buffer for each distance d, and the calculation of the distance d in step S112 in FIG. 7 can be omitted. In this case, the “combination of temperature t, focus position f, and distance d” in the description of steps S117 to S120 in FIG. 8 is changed to “combination of temperature t and focus position f”.

そして、距離dによる分類が行われない場合は、フォーカス位置更新処理において代表値算出部302は、何も算術計算を行うことなく、代表値Qnear、Qcur、およびQfarを得ることができる。なぜなら、距離dによる分類が行われない場合のこれらの代表値の各々は、過去に図8のステップS120で集計テーブルに記憶された算術平均そのものだからである。つまり、代表値算出部302は、単に集計テーブルを参照するだけで、過去に代表値算出部302が算出した代表値Qnear、Qcur、およびQfarのいずれをも取得することができる。   When the classification based on the distance d is not performed, the representative value calculation unit 302 can obtain the representative values Qnear, Qcur, and Qfar without performing any arithmetic calculation in the focus position update process. This is because each of these representative values when the classification based on the distance d is not performed is the arithmetic average itself stored in the tabulation table in step S120 in FIG. 8 in the past. That is, the representative value calculation unit 302 can acquire any of the representative values Qnear, Qcur, and Qfar calculated by the representative value calculation unit 302 in the past simply by referring to the aggregation table.

あるいは、距離dによる分類が行われない場合、代表値算出部302は、リングバッファに記憶された指標値の算術平均をステップS120で算出しなくてもよい。その代わり、代表値算出部302は、フォーカス位置更新処理において、代表値Qnear、Qcur、またはQfarとして、リングバッファに記憶された指標値の算術平均を算出すればよい。   Alternatively, when the classification based on the distance d is not performed, the representative value calculation unit 302 does not have to calculate the arithmetic average of the index values stored in the ring buffer in step S120. Instead, the representative value calculation unit 302 may calculate the arithmetic average of the index values stored in the ring buffer as the representative value Qnear, Qcur, or Qfar in the focus position update process.

また、上記の説明では、いくつか具体的な数式を挙げたが、実施形態に応じて適宜別の数式が使われてもよい。例えば、代表値算出部302は、式(8)ではなく式(10)により定義される代表値を算出してもよい。
In the above description, some specific mathematical expressions are given, but other mathematical expressions may be used as appropriate according to the embodiment. For example, the representative value calculation unit 302 may calculate a representative value defined by Expression (10) instead of Expression (8).

もちろん、式(10)のように定義される代表値Qj,fの算出において、代表値算出部302は、算出済みの値aj,f,dを利用してもよい。つまり、代表値算出部302は、「カウンタ値cj,f,dがバッファサイズR以上のときは、リングバッファに格納されている直近のR個の指標値の和は、値aj,f,dのR倍である」ということを代表値Qj,fの算出において利用してもよい。 Of course, in calculating the representative value Q j, f defined as in equation (10), the representative value calculation unit 302 may use the calculated values a j, f, d . That is, the representative value calculation unit 302 determines that “when the counter value c j, f, d is equal to or larger than the buffer size R, the sum of the most recent R index values stored in the ring buffer is the value a j, f , D times R ”may be used in calculating the representative values Q j, f .

また、上記の説明で例示した数値や変数名などは、単なる説明の便宜上の例である。例えば、撮像装置に設定可能なフォーカス位置は、図5のように256段階であるとは限らない。撮像装置の仕様に応じて、撮像装置に設定可能なフォーカス位置の数は異なる。   The numerical values and variable names exemplified in the above description are merely examples for convenience of description. For example, the focus positions that can be set in the imaging apparatus are not necessarily 256 levels as shown in FIG. The number of focus positions that can be set in the imaging apparatus varies depending on the specifications of the imaging apparatus.

図7〜13に示した処理手順も、実施形態に応じて適宜変更されてよい。矛盾が生じない限り、ステップの実行順序は入れ換えられてもよいし、入れ換え可能なステップ同士は、並行に実行されてもよい。   The processing procedures shown in FIGS. 7 to 13 may be changed as appropriate according to the embodiment. As long as no contradiction occurs, the execution order of the steps may be interchanged, and the interchangeable steps may be performed in parallel.

実施形態によっては、一部のステップが省略されてもよい。例えば、図7のステップS106は省略されてもよい。ステップS106が省略されると、特定文字パターンが検出されない期間が長く続いても、当該期間中にも頻繁に温度変化がチェックされ、温度変化に素早く対応して設定フォーカス位置fsが変更される。   Depending on the embodiment, some steps may be omitted. For example, step S106 in FIG. 7 may be omitted. If step S106 is omitted, even if the period during which the specific character pattern is not detected continues for a long time, the temperature change is frequently checked during the period, and the set focus position fs is changed in response to the temperature change.

また、図9〜13のフォーカス位置更新処理では、フォーカス位置テーブル620で温度tに対応する設定フォーカス位置fsが変更されたか否かによらず、ステップS204で設定フォーカス位置fsが撮像装置310に設定しなおされる。これは、処理手順を簡素化するためである。   9 to 13, the set focus position fs is set in the imaging device 310 in step S204 regardless of whether or not the set focus position fs corresponding to the temperature t is changed in the focus position table 620. It will be reworked. This is to simplify the processing procedure.

しかし、もちろん、設定フォーカス位置fsが変更されなかった場合には、ステップS202〜S204のうち、ステップS202〜S203のみを調整手順制御部304が実行してもよい。すなわち、設定フォーカス位置fsが変更されなかった場合には、ステップS204が省略されてもよい。   However, of course, when the set focus position fs is not changed, the adjustment procedure control unit 304 may execute only steps S202 to S203 out of steps S202 to S204. That is, when the set focus position fs is not changed, step S204 may be omitted.

また、上記実施形態では、設定フォーカス位置の変更量は−1または+1である。しかし、実施形態によっては、1回の変更で設定フォーカス位置の値を2以上減らしてもよいし、2以上増やしてもよい。   In the above embodiment, the change amount of the set focus position is −1 or +1. However, depending on the embodiment, the value of the set focus position may be decreased by 2 or more by one change, or may be increased by 2 or more.

また、変更量が可変でもよい。上記実施形態では2つまたは3つの距離に対応する2つまたは3つの代表値同士が比較され、どの代表値が最大かということが判断される。しかし、実施形態によっては、4つ以上の距離に対応する4つ以上の代表値同士が比較されてもよい。4つ以上の代表値同士が比較される場合、距離に対して代表値が変化する割合または代表値の変化の傾向に応じて、変更量が可変に調整されてもよい。   Further, the change amount may be variable. In the above embodiment, two or three representative values corresponding to two or three distances are compared to determine which representative value is the maximum. However, depending on the embodiment, four or more representative values corresponding to four or more distances may be compared. When four or more representative values are compared with each other, the amount of change may be variably adjusted according to the ratio of the change in the representative value with respect to the distance or the tendency of the change in the representative value.

最後に、上記の種々の実施形態に関して、さらに下記の付記を開示する。
(付記1)
撮像を複数回行って複数の移動物体を撮像する撮像装置により撮像された各撮像画像から、前記移動物体を識別する情報を示す特定文字パターンに対応する特定領域を抽出する抽出手段と、
前記撮像装置の撮像設定の変更要否を、
複数の前記撮像画像からそれぞれ抽出された各特定領域についての、
当該特定領域に対応する特定文字パターンと前記撮像装置の被写界深度との間の位置関係を反映する第1の評価値、および
当該特定領域の大きさを反映する第2の評価値、ならびに
複数の前記撮像画像それぞれの撮像時の温度および撮像設定
に基づいて判断し、変更要と判断した場合は、変更した前記撮像設定である変更撮像設定を求め、前記変更撮像設定を前記撮像装置に適用する制御手段
を備える撮像設定制御システム。
(付記2)
前記制御手段は、
前記第1の評価値と前記第2の評価値に基づく指標値の、温度と撮像設定の複数の組み合わせにそれぞれ対応する複数の代表値のうち、
現在の温度と、前記撮像装置に現在設定されている第1の撮像設定との組み合わせに対応する第1の代表値と、
前記現在の温度と、前記第1の撮像設定とは異なる第2の撮像設定との組み合わせに対応する第2の代表値
との間の大小関係に応じて、前記撮像設定の変更要否を判断する
ことを特徴とする付記1に記載の撮像設定制御システム。
(付記3)
各特定領域についての前記指標値は、当該特定領域の認識容易性を示し、
前記第1の代表値が前記第2の代表値よりも低い認識容易性を示す場合、前記制御手段は、前記第1の撮像設定から前記第2の撮像設定への変化の方向に前記第1の撮像設定を変化させた撮像設定を、前記変更撮像設定として前記撮像装置に適用する
ことを特徴とする付記2に記載の撮像設定制御システム。
(付記4)
前記第1の代表値が前記第2の代表値よりも高い認識容易性を示す場合、前記制御手段は、
前記撮像設定の変更は不要と判断するか、または、
前記第2の撮像設定から前記第1の撮像設定への変化の方向に前記第1の撮像設定を変化させた撮像設定を、前記変更撮像設定として前記撮像装置に適用する
ことを特徴とする付記3に記載の撮像設定制御システム。
(付記5)
前記制御手段は、
前記第1の代表値が前記第2の代表値よりも高い認識容易性を示し、かつ、
前記現在の温度と、前記第1の撮像設定を間に挟んで前記第2の撮像設定とは逆側の第3の撮像設定との組み合わせに対応する第3の代表値よりも、前記第1の代表値が高い認識容易性を表す
場合に、前記撮像設定の変更は不要と判断する
ことを特徴とする付記4に記載の撮像設定制御システム。
(付記6)
前記複数の代表値を算出する代表値算出手段をさらに備え、
前記制御手段は、1つの温度と1つの撮像設定の各組み合わせに対応する代表値を前記代表値算出手段に算出させるか否かを、複数の前記指標値のうちで、当該組み合わせに関する所定の条件に当てはまる指標値の個数に応じて、決定する
ことを特徴とする付記2から5のいずれか1項に記載の撮像設定制御システム。
(付記7)
複数の前記指標値のうち、前記組み合わせに対応する指標値の個数が第1の閾値以上のとき、前記制御手段は、前記組み合わせに対応する前記代表値を前記代表値算出手段に算出させる
ことを特徴とする付記6に記載の撮像設定制御システム。
(付記8)
複数の前記指標値のうち、
前記組み合わせに対応し、かつ、
当該指標値に対応する特定領域に対応する特定文字パターンと前記撮像装置との間の、当該特定文字パターンが撮像されたときの距離が、所定の範囲に入る
指標値の個数が、第2の閾値以上のとき、前記制御手段は、前記組み合わせに対応する前記代表値を前記代表値算出手段に算出させる
ことを特徴とする付記6に記載の撮像設定制御システム。
(付記9)
前記制御手段は、
現在の温度との差が所定範囲内の温度のときに、現在前記撮像装置に設定されている撮像設定とは異なる撮像設定で撮像された撮像画像から抽出された前記特定領域の数が、所定の条件に照らして少ないか否かを判断し、
前記所定の条件に照らして前記特定領域の前記数が少ないと判断した場合、前記撮像設定を変更すると判断する
ことを特徴とする付記1から8のいずれか1項に記載の撮像設定制御システム。
(付記10)
前記撮像設定は焦点距離の設定を含み、
前記現在の温度と、前記第1の撮像設定とは異なる撮像設定との組み合わせに対応する代表値を、前記代表値算出手段が算出していない場合、
前記代表値算出手段が前記第1の代表値の算出に用いた第1の個数の前記指標値の中での、前記指標値の距離別の第2の個数の代表値を、前記指標値が算出された前記特定領域に対応する特定文字パターンと前記撮像装置との間の、当該特定文字パターンが撮像されたときの距離に基づいて、前記代表値算出手段が算出し、
前記第2の個数の代表値の中で、所定の第1の距離に対応する第4の代表値が、前記第1の距離とは異なる第2の距離に対応する第5の代表値が示す認識容易性よりも低い認識容易性を示す場合、前記制御手段は、前記第2の距離から前記第1の距離への変化の方向に前記焦点距離を変化させた撮像設定を、前記変更撮像設定として前記撮像装置に適用する
ことを特徴とする付記6から8のいずれか1項に記載の撮像設定制御システム。
(付記11)
前記第2の代表値が前記第1の代表値よりも高い認識容易性を示す場合に、前記第2の撮像設定を前記現在の温度と対応づけて記憶する記憶手段をさらに備え、
前記現在の温度が他の温度に変化した後に元に戻った場合に、前記制御手段は、前記第2の撮像設定を前記記憶手段から読み出して、前記第2の撮像設定を前記変更撮像設定として前記撮像装置に適用する
ことを特徴とする付記3から5のいずれか1項に記載の撮像設定制御システム。
(付記12)
前記撮像設定は焦点距離の設定を含むことを特徴とする付記1から9および11のいずれか1項の撮像設定制御システム。
(付記13)
前記第1の評価値は、前記特定領域における鮮鋭度であることを特徴とする付記1から12のいずれか1項の撮像設定制御システム。
(付記14)
前記第2の評価値は、前記特定領域内の1つ以上の所定の部分それぞれが所定の文字集合中のいずれかの文字の形状と一致する確度に基づく値である
ことを特徴とする付記1から13のいずれか1項の撮像設定制御システム。
(付記15)
撮像を複数回行って複数の移動物体を撮像する撮像装置の撮像設定をコンピュータが制御する撮像設定制御方法であって、
前記コンピュータが、
前記撮像装置による各撮像画像から、前記移動物体を識別する情報を示す特定文字パターンに対応する特定領域を抽出し、
前記撮像装置の撮像設定の変更要否を、
複数の前記撮像画像からそれぞれ抽出された各特定領域についての、
当該特定領域に対応する特定文字パターンと前記撮像装置の被写界深度との間の位置関係を反映する第1の評価値、および
当該特定領域の大きさを反映する第2の評価値、ならびに
複数の前記撮像画像それぞれの撮像時の温度および撮像設定
に基づいて判断し、
変更要と判断した場合は、変更した前記撮像設定である変更撮像設定を求め、前記変更撮像設定を前記撮像装置に適用する
ことを特徴とする撮像設定制御方法。
(付記16)
撮像を複数回行って複数の移動物体を撮像する撮像装置の撮像設定をコンピュータに制御させるための撮像設定制御プログラムであって、
前記コンピュータに、
前記撮像装置による各撮像画像から、前記移動物体を識別する情報を示す特定文字パターンに対応する特定領域を抽出し、
前記撮像装置の撮像設定の変更要否を、
複数の前記撮像画像からそれぞれ抽出された各特定領域についての、
当該特定領域に対応する特定文字パターンと前記撮像装置の被写界深度との間の位置関係を反映する第1の評価値、および
当該特定領域の大きさを反映する第2の評価値、ならびに
複数の前記撮像画像それぞれの撮像時の温度および撮像設定
に基づいて判断し、
変更要と判断した場合は、変更した前記撮像設定である変更撮像設定を求め、前記変更撮像設定を前記撮像装置に適用する
ことを含む処理を実行させることを特徴とする撮像設定制御プログラム。
Finally, the following additional notes are disclosed regarding the various embodiments described above.
(Appendix 1)
Extraction means for extracting a specific region corresponding to a specific character pattern indicating information for identifying the moving object from each captured image captured by an imaging device that performs imaging a plurality of times and images a plurality of moving objects;
Whether or not to change the imaging setting of the imaging device,
For each specific area extracted from each of the plurality of captured images,
A first evaluation value that reflects the positional relationship between the specific character pattern corresponding to the specific area and the depth of field of the imaging device; a second evaluation value that reflects the size of the specific area; and Judgment is made based on the temperature and imaging settings at the time of imaging of each of the plurality of captured images, and when it is determined that a change is necessary, a changed imaging setting that is the changed imaging setting is obtained, and the changed imaging setting is stored in the imaging device. An imaging setting control system comprising control means to apply.
(Appendix 2)
The control means includes
Among a plurality of representative values respectively corresponding to a plurality of combinations of temperature and imaging setting of index values based on the first evaluation value and the second evaluation value,
A first representative value corresponding to a combination of a current temperature and a first imaging setting currently set in the imaging device;
It is determined whether or not the imaging setting needs to be changed according to a magnitude relationship between the current temperature and a second representative value corresponding to a combination of a second imaging setting different from the first imaging setting. The imaging setting control system according to appendix 1, wherein:
(Appendix 3)
The index value for each specific area indicates the recognizability of the specific area,
When the first representative value is less recognizable than the second representative value, the control means is configured to change the first imaging setting in the direction from the first imaging setting to the second imaging setting. The imaging setting control system according to appendix 2, wherein imaging settings obtained by changing the imaging settings are applied to the imaging apparatus as the changed imaging settings.
(Appendix 4)
When the first representative value is more easily recognized than the second representative value, the control means
It is determined that the change of the imaging setting is unnecessary, or
The imaging setting obtained by changing the first imaging setting in the direction of change from the second imaging setting to the first imaging setting is applied to the imaging apparatus as the changed imaging setting. 4. The imaging setting control system according to 3.
(Appendix 5)
The control means includes
The first representative value is more easily recognized than the second representative value, and
More than the first representative value corresponding to a combination of the current temperature and a third imaging setting opposite to the second imaging setting with the first imaging setting in between. The imaging setting control system according to appendix 4, characterized in that it is determined that the imaging setting change is unnecessary when the representative value represents a high recognition ease.
(Appendix 6)
A representative value calculating means for calculating the plurality of representative values;
The control means determines whether or not the representative value calculation means calculates a representative value corresponding to each combination of one temperature and one imaging setting, among a plurality of the index values, a predetermined condition relating to the combination The imaging setting control system according to any one of appendices 2 to 5, wherein the imaging setting control system is determined according to the number of index values that apply to.
(Appendix 7)
When the number of index values corresponding to the combination among the plurality of index values is equal to or greater than a first threshold, the control means causes the representative value calculation means to calculate the representative value corresponding to the combination. The imaging setting control system according to appendix 6, which is characterized.
(Appendix 8)
Among the plurality of index values,
Corresponding to the combination, and
The distance between the specific character pattern corresponding to the specific area corresponding to the index value and the imaging device when the specific character pattern is imaged is the number of index values within a predetermined range. The imaging setting control system according to appendix 6, wherein the control means causes the representative value calculation means to calculate the representative value corresponding to the combination when the threshold value is greater than or equal to a threshold value.
(Appendix 9)
The control means includes
When the difference from the current temperature is a temperature within a predetermined range, the number of the specific regions extracted from the captured image captured with an imaging setting different from the imaging setting currently set in the imaging device is predetermined. Judging whether there are few according to the conditions of
9. The imaging setting control system according to any one of appendices 1 to 8, wherein when it is determined that the number of the specific areas is small in light of the predetermined condition, the imaging setting is determined to be changed.
(Appendix 10)
The imaging settings include a focal length setting,
When the representative value calculation means does not calculate a representative value corresponding to a combination of the current temperature and an imaging setting different from the first imaging setting,
Of the first number of the index values used by the representative value calculation means for calculating the first representative value, a second number of representative values by distance of the index value is represented by the index value. The representative value calculating means calculates the distance between the specific character pattern corresponding to the calculated specific area and the imaging device when the specific character pattern is imaged,
Among the second number of representative values, a fourth representative value corresponding to a predetermined first distance is indicated by a fifth representative value corresponding to a second distance different from the first distance. When the recognition means is lower than the ease of recognition, the control means changes the imaging setting in which the focal length is changed in the direction of change from the second distance to the first distance. The imaging setting control system according to any one of appendices 6 to 8, wherein the imaging setting control system is applied to the imaging apparatus.
(Appendix 11)
When the second representative value is more easily recognized than the first representative value, the storage device further includes storage means for storing the second imaging setting in association with the current temperature,
When the current temperature changes to another temperature and then returns to the original temperature, the control unit reads the second imaging setting from the storage unit, and uses the second imaging setting as the changed imaging setting. The imaging setting control system according to any one of supplementary notes 3 to 5, wherein the imaging setting control system is applied to the imaging apparatus.
(Appendix 12)
The imaging setting control system according to any one of appendices 1 to 9 and 11, wherein the imaging setting includes a focal length setting.
(Appendix 13)
The imaging setting control system according to any one of appendices 1 to 12, wherein the first evaluation value is a sharpness in the specific area.
(Appendix 14)
The second evaluation value is a value based on a probability that each of the one or more predetermined parts in the specific region matches the shape of any character in the predetermined character set. 14. The imaging setting control system according to any one of items 1 to 13.
(Appendix 15)
An imaging setting control method in which a computer controls imaging settings of an imaging device that performs imaging a plurality of times and images a plurality of moving objects,
The computer is
Extracting a specific area corresponding to a specific character pattern indicating information for identifying the moving object from each captured image by the imaging device,
Whether or not to change the imaging setting of the imaging device,
For each specific area extracted from each of the plurality of captured images,
A first evaluation value that reflects the positional relationship between the specific character pattern corresponding to the specific area and the depth of field of the imaging device; a second evaluation value that reflects the size of the specific area; and Judging based on the temperature and imaging settings at the time of imaging each of the plurality of captured images,
An imaging setting control method, wherein when it is determined that a change is necessary, a changed imaging setting that is the changed imaging setting is obtained and the changed imaging setting is applied to the imaging apparatus.
(Appendix 16)
An imaging setting control program for causing a computer to control imaging settings of an imaging apparatus that performs imaging a plurality of times and images a plurality of moving objects,
In the computer,
Extracting a specific area corresponding to a specific character pattern indicating information for identifying the moving object from each captured image by the imaging device,
Whether or not to change the imaging setting of the imaging device,
For each specific area extracted from each of the plurality of captured images,
A first evaluation value that reflects the positional relationship between the specific character pattern corresponding to the specific area and the depth of field of the imaging device; a second evaluation value that reflects the size of the specific area; and Judging based on the temperature and imaging settings at the time of imaging each of the plurality of captured images,
An imaging setting control program for executing a process including obtaining a changed imaging setting which is the changed imaging setting and applying the changed imaging setting to the imaging apparatus when it is determined that the change is necessary.

100、110、120 画像
101〜103、111、121 特定領域
131〜134、700、710 特定領域画像
141〜142 基準サイズ画像
201 路面
202a〜202d 移動物体
203a〜203d 特定文字パターン
204 支柱
205 カメラ
206 光軸
207 撮像視野
208〜210 範囲
300 焦点距離調整システム
301 指標値算出部
302 代表値算出部
303 焦点距離制御部
304 調整手順制御部
310 撮像装置
320 温度検出装置
330 記憶装置
400、500 監視システム
410、510、520 路側機
411、511 カメラ
412、512 温度センサ
413、513、531 CPU
414、514、532 RAM
415、515、533 HDD
416、517、538 バス
516、536 通信インタフェイス
530 サーバ
534 入力装置
535 出力装置
537 駆動装置
540 ネットワーク
550 記憶媒体
600 集計テーブル群
601−1〜601−N 集計テーブル
610 リングバッファ
611 ポインタ
620 フォーカス位置テーブル
630 前回温度データ
640 チェック時刻データ
701〜704、711〜714、721〜724 文字領域
720 サイズ変更後の特定領域画像
100, 110, 120 Images 101-103, 111, 121 Specific area 131-134, 700, 710 Specific area image 141-142 Reference size image 201 Road surface 202a-202d Moving object 203a-203d Specific character pattern 204 Strut 205 Camera 206 Light Axis 207 Imaging field of view 208-210 Range 300 Focal length adjustment system 301 Index value calculation unit 302 Representative value calculation unit 303 Focal length control unit 304 Adjustment procedure control unit 310 Imaging device 320 Temperature detection device 330 Storage device 400, 500 Monitoring system 410, 510, 520 Roadside machine 411, 511 Camera 412, 512 Temperature sensor 413, 513, 531 CPU
414, 514, 532 RAM
415, 515, 533 HDD
416, 517, 538 Bus 516, 536 Communication interface 530 Server 534 Input device 535 Output device 537 Drive device 540 Network 550 Storage medium 600 Total table group 601-1 to 601-N Total table 610 Ring buffer 611 Pointer 620 Focus position table 630 Previous temperature data 640 Check time data 701 to 704, 711 to 714, 721 to 724 Character area 720 Specific area image after size change

Claims (8)

撮像を複数回行って複数の移動物体を撮像する撮像装置により撮像された各撮像画像から、前記移動物体を識別する情報を示す特定文字パターンに対応する特定領域を抽出する抽出手段と、
前記撮像装置の撮像設定の変更要否を複数の前記撮像画像それぞれの撮像時の温度および撮像設定に基づいて判断し、変更要と判断した場合は、変更した前記撮像設定である変更撮像設定を求め、前記変更撮像設定を前記撮像装置に適用する制御手段であって、
現在の温度との差が所定範囲内の温度の場合に、現在前記撮像装置に設定されている撮像設定とは異なる撮像設定で撮像された撮像画像から抽出された前記特定領域の数が、所定の条件に照らして少ないか否かを判断し、
前記所定の条件に照らして前記特定領域の前記数が少ないと判断した場合、前記撮像設定を変更すると判断する
前記制御手段と、
を備える撮像設定制御システム。
Extraction means for extracting a specific region corresponding to a specific character pattern indicating information for identifying the moving object from each captured image captured by an imaging device that performs imaging a plurality of times and images a plurality of moving objects;
Whether or not the imaging setting of the imaging device needs to be changed is determined based on the temperature and the imaging setting at the time of imaging of each of the plurality of captured images, and when it is determined that the change is necessary, the changed imaging setting that is the changed imaging setting Control means for applying the changed imaging setting to the imaging apparatus ,
When the difference from the current temperature is a temperature within a predetermined range, the number of the specific regions extracted from the captured image captured with an imaging setting different from the imaging setting currently set in the imaging device is a predetermined value. Judging whether there are few according to the conditions of
When it is determined that the number of the specific areas is small in light of the predetermined condition, it is determined that the imaging setting is to be changed.
The control means;
An imaging setting control system comprising:
撮像を複数回行って複数の移動物体を撮像する撮像装置により撮像された各撮像画像から、前記移動物体を識別する情報を示す特定文字パターンに対応する特定領域を抽出する抽出手段と、
前記撮像装置の撮像設定の変更要否を、
複数の前記撮像画像からそれぞれ抽出された各特定領域についての、
当該特定領域に対応する特定文字パターンと前記撮像装置の被写界深度との間の位置関係を反映する第1の評価値、および
当該特定領域の大きさを反映する第2の評価値、ならびに
複数の前記撮像画像それぞれの撮像時の温度および撮像設定
に基づいて判断し、変更要と判断した場合は、変更した前記撮像設定である変更撮像設定を求め、前記変更撮像設定を前記撮像装置に適用する制御手段であって、
前記第1の評価値と前記第2の評価値に基づく指標値の、温度と撮像設定の複数の組み合わせにそれぞれ対応する複数の代表値のうち、
現在の温度と、前記撮像装置に現在設定されている第1の撮像設定との組み合わせに対応する第1の代表値と、
前記現在の温度と、前記第1の撮像設定とは異なる第2の撮像設定との組み合わせに対応する第2の代表値
との間の大小関係に応じて、前記撮像設定の変更要否を判断する
前記制御手段と、
を備える撮像設定制御システム。
Extraction means for extracting a specific region corresponding to a specific character pattern indicating information for identifying the moving object from each captured image captured by an imaging device that performs imaging a plurality of times and images a plurality of moving objects;
Whether or not to change the imaging setting of the imaging device,
For each specific area extracted from each of the plurality of captured images,
A first evaluation value that reflects a positional relationship between a specific character pattern corresponding to the specific region and the depth of field of the imaging device; and
A second evaluation value reflecting the size of the specific area, and
Temperature and imaging settings for each of the plurality of captured images
A control means for obtaining a changed imaging setting that is the changed imaging setting, and applying the changed imaging setting to the imaging apparatus,
Among a plurality of representative values respectively corresponding to a plurality of combinations of temperature and imaging setting of index values based on the first evaluation value and the second evaluation value,
A first representative value corresponding to a combination of a current temperature and a first imaging setting currently set in the imaging device;
It is determined whether or not the imaging setting needs to be changed according to a magnitude relationship between the current temperature and a second representative value corresponding to a combination of a second imaging setting different from the first imaging setting. Do
The control means;
An imaging setting control system comprising:
各特定領域についての前記指標値は、当該特定領域の認識容易性を示し、
前記第1の代表値が前記第2の代表値よりも低い認識容易性を示す場合、前記制御手段は、前記第1の撮像設定から前記第2の撮像設定への変化の方向に前記第1の撮像設定を変化させた撮像設定を、前記変更撮像設定として前記撮像装置に適用する
ことを特徴とする請求項2に記載の撮像設定制御システム。
The index value for each specific area indicates the recognizability of the specific area,
When the first representative value is less recognizable than the second representative value, the control means is configured to change the first imaging setting in the direction from the first imaging setting to the second imaging setting. The imaging setting control system according to claim 2, wherein the imaging setting obtained by changing the imaging setting is applied to the imaging apparatus as the changed imaging setting.
前記第1の代表値が前記第2の代表値よりも高い認識容易性を示す場合、前記制御手段は、
前記撮像設定の変更は不要と判断するか、または、
前記第2の撮像設定から前記第1の撮像設定への変化の方向に前記第1の撮像設定を変化させた撮像設定を、前記変更撮像設定として前記撮像装置に適用する
ことを特徴とする請求項3に記載の撮像設定制御システム。
When the first representative value is more easily recognized than the second representative value, the control means
It is determined that the change of the imaging setting is unnecessary, or
The imaging setting obtained by changing the first imaging setting in the direction of change from the second imaging setting to the first imaging setting is applied to the imaging apparatus as the changed imaging setting. Item 4. The imaging setting control system according to Item 3.
前記複数の代表値を算出する代表値算出手段をさらに備え、
前記制御手段は、1つの温度と1つの撮像設定の各組み合わせに対応する代表値を前記代表値算出手段に算出させるか否かを、複数の前記指標値のうちで、当該組み合わせに関する所定の条件に当てはまる指標値の個数に応じて、決定する
ことを特徴とする請求項2から4のいずれか1項に記載の撮像設定制御システム。
A representative value calculating means for calculating the plurality of representative values;
The control means determines whether or not the representative value calculation means calculates a representative value corresponding to each combination of one temperature and one imaging setting, among a plurality of the index values, a predetermined condition relating to the combination The imaging setting control system according to any one of claims 2 to 4, wherein the imaging setting control system is determined in accordance with the number of index values that apply to.
前記第2の代表値が前記第1の代表値よりも高い認識容易性を示す場合に、前記第2の撮像設定を前記現在の温度と対応づけて記憶する記憶手段をさらに備え、
前記現在の温度が他の温度に変化した後に元に戻った場合に、前記制御手段は、前記第2の撮像設定を前記記憶手段から読み出して、前記第2の撮像設定を前記変更撮像設定として前記撮像装置に適用する
ことを特徴とする請求項3または4に記載の撮像設定制御システム。
When the second representative value is more easily recognized than the first representative value, the storage device further includes storage means for storing the second imaging setting in association with the current temperature,
When the current temperature changes to another temperature and then returns to the original temperature, the control unit reads the second imaging setting from the storage unit, and uses the second imaging setting as the changed imaging setting. The imaging setting control system according to claim 3, wherein the imaging setting control system is applied to the imaging device.
撮像を複数回行って複数の移動物体を撮像する撮像装置の撮像設定をコンピュータが制御する撮像設定制御方法であって、
前記コンピュータが、
前記撮像装置による各撮像画像から、前記移動物体を識別する情報を示す特定文字パターンに対応する特定領域を抽出し、
前記撮像装置の撮像設定の変更要否を複数の前記撮像画像それぞれの撮像時の温度および撮像設定に基づいて判断し、
変更要と判断した場合は、変更した前記撮像設定である変更撮像設定を求め、前記変更撮像設定を前記撮像装置に適用し、
前記撮像装置の撮像設定の変更要否の判断では、
現在の温度との差が所定範囲内の温度の場合に、現在前記撮像装置に設定されている撮像設定とは異なる撮像設定で撮像された撮像画像から抽出された前記特定領域の数が、所定の条件に照らして少ないか否かを判断し、
前記所定の条件に照らして前記特定領域の前記数が少ないと判断した場合、前記撮像設定を変更すると判断する
ことを特徴とする撮像設定制御方法。
An imaging setting control method in which a computer controls imaging settings of an imaging device that performs imaging a plurality of times and images a plurality of moving objects,
The computer is
Extracting a specific area corresponding to a specific character pattern indicating information for identifying the moving object from each captured image by the imaging device,
Changing necessity of imaging setting of the imaging device, it is determined based on a plurality of the captured images temperature and imaging settings at each imaging,
If it is determined that the change is necessary, the changed imaging setting that is the changed imaging setting is obtained, and the changed imaging setting is applied to the imaging device .
In determining whether or not to change the imaging setting of the imaging device,
When the difference from the current temperature is a temperature within a predetermined range, the number of the specific regions extracted from the captured image captured with an imaging setting different from the imaging setting currently set in the imaging device is a predetermined value. Judging whether there are few according to the conditions of
An imaging setting control method , wherein when it is determined that the number of the specific regions is small in light of the predetermined condition, the imaging setting is determined to be changed .
撮像を複数回行って複数の移動物体を撮像する撮像装置の撮像設定をコンピュータが制御する撮像設定制御方法であって、An imaging setting control method in which a computer controls imaging settings of an imaging device that performs imaging a plurality of times and images a plurality of moving objects,
前記コンピュータが、The computer is
前記撮像装置による各撮像画像から、前記移動物体を識別する情報を示す特定文字パターンに対応する特定領域を抽出し、Extracting a specific area corresponding to a specific character pattern indicating information for identifying the moving object from each captured image by the imaging device,
前記撮像装置の撮像設定の変更要否を、Whether or not to change the imaging setting of the imaging device,
複数の前記撮像画像からそれぞれ抽出された各特定領域についての、For each specific area extracted from each of the plurality of captured images,
当該特定領域に対応する特定文字パターンと前記撮像装置の被写界深度との間の位置関係を反映する第1の評価値、およびA first evaluation value that reflects a positional relationship between a specific character pattern corresponding to the specific region and the depth of field of the imaging device; and
当該特定領域の大きさを反映する第2の評価値、ならびにA second evaluation value reflecting the size of the specific area, and
複数の前記撮像画像それぞれの撮像時の温度および撮像設定Temperature and imaging settings for each of the plurality of captured images
に基づいて判断し、Based on
変更要と判断した場合は、変更した前記撮像設定である変更撮像設定を求め、前記変更撮像設定を前記撮像装置に適用し、If it is determined that the change is necessary, the changed imaging setting that is the changed imaging setting is obtained, and the changed imaging setting is applied to the imaging device.
前記撮像装置の撮像設定の変更要否の判断では、前記第1の評価値と前記第2の評価値に基づく指標値の、温度と撮像設定の複数の組み合わせにそれぞれ対応する複数の代表値のうち、In determining whether or not the imaging setting of the imaging device needs to be changed, a plurality of representative values respectively corresponding to a plurality of combinations of temperature and imaging settings of index values based on the first evaluation value and the second evaluation value are determined. home,
現在の温度と、前記撮像装置に現在設定されている第1の撮像設定との組み合わせに対応する第1の代表値と、A first representative value corresponding to a combination of a current temperature and a first imaging setting currently set in the imaging device;
前記現在の温度と、前記第1の撮像設定とは異なる第2の撮像設定との組み合わせに対応する第2の代表値A second representative value corresponding to a combination of the current temperature and a second imaging setting different from the first imaging setting
との間の大小関係に応じて、前記撮像設定の変更要否を判断するThe necessity of changing the imaging setting is determined according to the magnitude relationship between
ことを特徴とする撮像設定制御方法。The imaging setting control method characterized by the above-mentioned.
JP2012083363A 2012-03-31 2012-03-31 Imaging setting control system and imaging setting control method Active JP5910252B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012083363A JP5910252B2 (en) 2012-03-31 2012-03-31 Imaging setting control system and imaging setting control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012083363A JP5910252B2 (en) 2012-03-31 2012-03-31 Imaging setting control system and imaging setting control method

Publications (2)

Publication Number Publication Date
JP2013214839A JP2013214839A (en) 2013-10-17
JP5910252B2 true JP5910252B2 (en) 2016-04-27

Family

ID=49587885

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012083363A Active JP5910252B2 (en) 2012-03-31 2012-03-31 Imaging setting control system and imaging setting control method

Country Status (1)

Country Link
JP (1) JP5910252B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9602728B2 (en) * 2014-06-09 2017-03-21 Qualcomm Incorporated Image capturing parameter adjustment in preview mode

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002135765A (en) * 1998-07-31 2002-05-10 Matsushita Electric Ind Co Ltd Camera calibration instruction device and camera calibration device
JP2006154524A (en) * 2004-11-30 2006-06-15 Fuji Photo Film Co Ltd Imaging apparatus and focusing position searching method
JP4279790B2 (en) * 2005-02-24 2009-06-17 株式会社日立製作所 Car number recognition device

Also Published As

Publication number Publication date
JP2013214839A (en) 2013-10-17

Similar Documents

Publication Publication Date Title
CN108496350B (en) Focusing processing method and device
WO2021052487A1 (en) Method and apparatus for obtaining extended depth of field image, and electronic device
US20190141232A1 (en) Systems, methods, and media for providing interactive refocusing in images
RU2399937C2 (en) Image forming apparatus, method of controlling image forming apparatus
CN105472250B (en) Auto focusing method and device
JP6271990B2 (en) Image processing apparatus and image processing method
CN110381261B (en) Focusing method, focusing device, computer-readable storage medium and electronic equipment
KR20190104216A (en) Focus method, terminal and computer readable storage media
US10474935B2 (en) Method and device for target detection
CN107659770B (en) Method and device for rapid focusing and mobile equipment
TWI471677B (en) Auto focus method and auto focus apparatus
CN113837079B (en) Automatic focusing method, device, computer equipment and storage medium of microscope
JP6447840B2 (en) Image device, method for automatic focusing in an image device, and corresponding computer program
US10491804B2 (en) Focus window determining method, apparatus, and device
US20140132822A1 (en) Multi-resolution depth-from-defocus-based autofocus
US8433187B2 (en) Distance estimation systems and method based on a two-state auto-focus lens
JP6286567B2 (en) Robust autofocus algorithm for multispectral imaging system
CN106154688B (en) Automatic focusing method and device
CN113103957B (en) Blind area monitoring method and device, electronic equipment and storage medium
JP6485116B2 (en) Focus position detection device, focus position detection method, and computer program for focus position detection
JP5910252B2 (en) Imaging setting control system and imaging setting control method
EP3809692B1 (en) Imaging device provided with event-based camera
US10962860B2 (en) System and method for optimizing focus of optical system passively
CN110933304B (en) Method and device for determining to-be-blurred region, storage medium and terminal equipment
CN116866715B (en) Automatic focusing method of endoscope, electronic device and readable storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150106

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151005

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151020

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151218

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: 20160301

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160314

R150 Certificate of patent or registration of utility model

Ref document number: 5910252

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150