JP6482589B2 - Camera calibration device - Google Patents

Camera calibration device Download PDF

Info

Publication number
JP6482589B2
JP6482589B2 JP2017063790A JP2017063790A JP6482589B2 JP 6482589 B2 JP6482589 B2 JP 6482589B2 JP 2017063790 A JP2017063790 A JP 2017063790A JP 2017063790 A JP2017063790 A JP 2017063790A JP 6482589 B2 JP6482589 B2 JP 6482589B2
Authority
JP
Japan
Prior art keywords
circle
optical axis
coordinates
center
luminance value
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
JP2017063790A
Other languages
Japanese (ja)
Other versions
JP2018166308A (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.)
Secom Co Ltd
Original Assignee
Secom Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Secom Co Ltd filed Critical Secom Co Ltd
Priority to JP2017063790A priority Critical patent/JP6482589B2/en
Publication of JP2018166308A publication Critical patent/JP2018166308A/en
Application granted granted Critical
Publication of JP6482589B2 publication Critical patent/JP6482589B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Measurement Of Optical Distance (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Studio Devices (AREA)

Description

本発明は、カメラにより撮像した画像における当該カメラの光軸中心座標を算出するカメラ校正装置に関する。   The present invention relates to a camera calibration apparatus that calculates an optical axis center coordinate of an image captured by a camera.

従来から、監視カメラで撮像した画像を用いて人物の三次元位置や高さ、幅を算出する等、物体の計測を行う技術が知られている(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, a technique for measuring an object such as calculating a three-dimensional position, height, and width of a person using an image captured by a surveillance camera is known (see, for example, Patent Document 1).

監視カメラで人物を撮像し、撮像した画像から人物の三次元位置や高さ、幅等を正確に計測するには、少なくとも撮像した画像における光軸中心の座標が正確に分かっている必要がある。多くの場合、画像の中心を光軸中心とみなして計測に利用する。   To capture a person with a surveillance camera and accurately measure the 3D position, height, width, etc. of the person from the captured image, at least the coordinates of the center of the optical axis in the captured image must be known accurately. . In many cases, the center of the image is regarded as the center of the optical axis and used for measurement.

特開2012−212248号公報JP 2012-212248 A

監視カメラの中には、撮像素子の中心と光軸中心のアライメントがずれている個体があり、画像の中心と光軸中心が一致しない場合がある。このような場合、画像の中心を光軸中心とみなしていると、物体を正確に計測できない問題があった。   In some surveillance cameras, there is an individual in which the center of the image sensor is not aligned with the center of the optical axis, and the center of the image does not match the center of the optical axis. In such a case, if the center of the image is regarded as the center of the optical axis, there is a problem that the object cannot be measured accurately.

また、魚眼レンズを搭載した監視カメラ(魚眼カメラ)では、矩形の画像中にレンズを通した円形の像が現れ、円形の像の外側には鏡筒の黒色の像(ケラレ)が現れる。これを利用して、魚眼カメラで撮像した画像からエッジ画像を生成してケラレによる円を検出し、検出した円の中心座標を光軸中心座標とする方法も考えられる。しかし、ケラレによる円にはボケが生じる場合があり、また魚眼カメラの中には撮像素子の中心と鏡筒の中心のアライメントがずれている個体があり、ケラレの像のボケや鏡筒のアライメントずれが光軸中心座標の精度を低下させる原因となる。さらに、この方法は、鏡筒によるケラレが得られない監視カメラ(魚眼カメラ以外)に適用することができない。   Further, in a surveillance camera (fisheye camera) equipped with a fisheye lens, a circular image through the lens appears in a rectangular image, and a black image (vignetting) of the lens barrel appears outside the circular image. Using this, it is also conceivable to generate an edge image from an image captured by a fisheye camera, detect a vignetting circle, and use the center coordinates of the detected circle as the optical axis center coordinates. However, the vignetting circle may be blurred, and in some fisheye cameras, the center of the image sensor and the center of the lens barrel are misaligned. The misalignment causes a decrease in the accuracy of the optical axis center coordinates. Furthermore, this method cannot be applied to surveillance cameras (other than fish-eye cameras) where vignetting by the lens barrel cannot be obtained.

そこで、本発明の目的は、撮像素子の中心と光軸中心のアライメントずれ、ケラレの像のボケ、または鏡筒のアライメントずれがあっても、撮像した画像における光軸中心座標を正確に算出することができるカメラ校正装置を提供することである。   Accordingly, an object of the present invention is to accurately calculate the optical axis center coordinates in a captured image even if there is misalignment between the center of the image sensor and the center of the optical axis, blurring of the vignetting image, or misalignment of the lens barrel. It is to provide a camera calibration device capable of performing the above.

本発明のカメラ校正装置は、カメラにより撮像した画像における当該カメラの光軸中心座標を算出するカメラ校正装置であって、前記カメラにより略均一な入射光を撮像した撮像画像を取得する画像取得手段と、前記撮像画像に含まれる複数の注目輝度値ごとに、前記撮像画像から前記注目輝度値を有する画素を抽出する等輝度画素抽出手段と、前記注目輝度値ごとに、前記等輝度画素抽出手段が抽出した画素の重心座標を算出する重心算出手段と、前記注目輝度値に対する前記重心座標の変動量を算出する変動量算出手段と、前記重心座標のうち前記変動量が所定値以下である重心座標から前記光軸中心座標を決定する光軸中心決定手段と、を備える、ことを特徴とする。   The camera calibration device of the present invention is a camera calibration device that calculates the optical axis center coordinates of the camera in an image captured by the camera, and that obtains a captured image obtained by capturing substantially uniform incident light by the camera. And, for each of a plurality of target brightness values included in the captured image, isoluminance pixel extraction means for extracting a pixel having the target brightness value from the captured image, and for each target brightness value, the isoluminance pixel extraction means Centroid calculation means for calculating the centroid coordinates of the pixels extracted from the centroid, variability calculation means for calculating the variability of the centroid coordinates with respect to the target luminance value, and the centroid where the variability of the centroid coordinates is a predetermined value or less. Optical axis center determining means for determining the optical axis center coordinates from the coordinates.

本発明のカメラ校正装置において、前記重心算出手段は、前記注目輝度値ごとに、前記等輝度画素抽出手段が抽出した画素の位置を円で近似し、当該円の円中心座標を前記重心座標として算出する円中心算出手段である、としても好適である。   In the camera calibration apparatus of the present invention, the center-of-gravity calculation unit approximates the position of the pixel extracted by the equi-luminance pixel extraction unit for each target luminance value with a circle, and uses the circle center coordinate of the circle as the center-of-gravity coordinate. It is also suitable as a circle center calculation means for calculating.

本発明のカメラ校正装置において、前記光軸中心決定手段は、前記注目輝度値に対する前記変動量が所定値以下である重心座標のうち、注目輝度値が所定の輝度値の幅にある重心座標から前記光軸中心座標を決定する、としても好適である。   In the camera calibration apparatus according to the present invention, the optical axis center determining means may determine from the barycentric coordinates where the luminance value is within a predetermined luminance value among the barycentric coordinates where the variation amount with respect to the luminance value of interest is equal to or less than a predetermined value. It is also preferable to determine the optical axis center coordinates.

本発明のカメラ校正装置において、前記光軸中心決定手段は、前記注目輝度値に対する前記変動量が所定値以下である重心座標のうち、より大きい注目輝度値の重心座標を優先して用いて前記光軸中心座標を決定する、としても好適である。   In the camera calibration apparatus of the present invention, the optical axis center determining means preferentially uses a centroid coordinate of a larger attention luminance value among centroid coordinates whose variation amount with respect to the attention luminance value is a predetermined value or less. It is also preferable to determine the optical axis center coordinates.

また、本発明のカメラ校正装置は、カメラにより撮像した画像における当該カメラの光軸中心座標を算出するカメラ校正装置であって、前記カメラにより略均一な入射光を撮像した撮像画像を取得する画像取得手段と、前記撮像画像に含まれる複数の注目輝度値ごとに、前記撮像画像から前記注目輝度値を有する画素を抽出する等輝度画素抽出手段と、前記注目輝度値ごとに前記等輝度画素抽出手段が抽出した画素の位置を円近似して当該円の大きさと円中心座標とを算出する円中心算出手段と、前記円の大きさに対する前記円中心座標の変動量を算出する変動量算出手段と、前記円中心座標のうち前記変動量が所定値以下である円の大きさにおける円中心座標から前記光軸中心座標を決定する光軸中心決定手段と、を備える、ことを特徴とする。   The camera calibration device of the present invention is a camera calibration device that calculates the optical axis center coordinates of the camera in an image captured by the camera, and is an image that acquires a captured image obtained by capturing substantially uniform incident light by the camera. Acquisition means; isoluminance pixel extraction means for extracting pixels having the target brightness value from the captured image for each of a plurality of target brightness values included in the captured image; and the isoluminance pixel extraction for each target brightness value A circle center calculating means for calculating a circle size and a circle center coordinate by approximating the position of the pixel extracted by the means, and a fluctuation amount calculating means for calculating a fluctuation amount of the circle center coordinate with respect to the size of the circle. And an optical axis center determining means for determining the optical axis center coordinates from the circle center coordinates in the size of the circle having the variation amount equal to or less than a predetermined value among the circle center coordinates, That.

本発明のカメラ校正装置において、前記光軸中心決定手段は、前記変動量が所定値以下である注目輝度値における重心座標、又は、前記変動量が所定値以下である円の大きさにおける円中心座標の平均値を前記光軸中心座標に決定する、としても好適である。   In the camera calibration apparatus according to the present invention, the optical axis center determining means may be a center-of-gravity coordinate at a target luminance value in which the variation amount is a predetermined value or less, or a circle center in a circle size in which the variation amount is a predetermined value or less. It is also preferable that an average value of coordinates is determined as the optical axis center coordinates.

本発明によれば、撮像素子の中心と光軸中心のアライメントずれ、ケラレの像のボケ、または鏡筒のアライメントずれがあっても、撮像した画像における光軸中心座標を正確に算出することができる。   According to the present invention, even if there is misalignment between the center of the image sensor and the center of the optical axis, blurring of the vignetting image, or misalignment of the lens barrel, it is possible to accurately calculate the optical axis center coordinates in the captured image. it can.

本発明の実施形態におけるカメラ校正システムの概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the camera calibration system in embodiment of this invention. 撮像画像の一例を模式的に表した図である。It is the figure which represented typically an example of the captured image. 本発明の実施形態におけるデータの流れを示すブロック図である。It is a block diagram which shows the flow of the data in embodiment of this invention. 本発明の実施形態における円中心座標を算出する処理の様子を示す模式図である。It is a schematic diagram which shows the mode of the process which calculates the circle center coordinate in embodiment of this invention. 本発明の実施形態における輝度値に対する円中心座標の変動量(距離の和)の一例を示す図である。It is a figure which shows an example of the fluctuation | variation amount (sum of distance) of the circle center coordinate with respect to the luminance value in embodiment of this invention. 本発明の実施形態におけるカメラ校正装置が実行する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process which the camera calibration apparatus in embodiment of this invention performs. 本発明の実施形態におけるカメラ校正装置が実行する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process which the camera calibration apparatus in embodiment of this invention performs.

以下、図面を参照しながら本発明の実施形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本実施形態のカメラ校正システム1の概略構成を示すブロック図である。本実施形態のカメラ校正システム1は、レンズ36(魚眼レンズ)を有するカメラ14により撮像された撮像画像から、カメラ14の光軸中心座標を算出するものである。カメラ校正システム1は、照明部12と、校正対象のカメラ14と、通信部16と、画像処理部18と、記憶部20と、出力部22とを備えている。このうち、校正対象のカメラ14を除いた構成が、カメラ校正装置10の構成である。   FIG. 1 is a block diagram showing a schematic configuration of a camera calibration system 1 of the present embodiment. The camera calibration system 1 of the present embodiment calculates the optical axis center coordinates of the camera 14 from a captured image captured by the camera 14 having a lens 36 (fisheye lens). The camera calibration system 1 includes an illumination unit 12, a camera 14 to be calibrated, a communication unit 16, an image processing unit 18, a storage unit 20, and an output unit 22. Among these, the configuration excluding the camera 14 to be calibrated is the configuration of the camera calibration device 10.

照明部12は、積分球30と光源32とを有している。本実施形態では、照明部12は、2つの光源32を有している。積分球30は、内部に球面が形成された空洞体であり、内部の球面に高反射率かつ高拡散性の塗料が塗布されている。2つの光源32は、例えば白色のLED(Light Emitting Diode)や白熱電球である。2つの光源32は、積分球30の内部の球面に配置されている。2つの光源32が発光した際には、積分球30の内部の空間が、2つの光源32の配向特性に依存することなく略均一な照明強度分布となる。照明部12は、均一標準光源として機能し、略均一な照明環境の空間を生成する。   The illumination unit 12 includes an integrating sphere 30 and a light source 32. In the present embodiment, the illumination unit 12 has two light sources 32. The integrating sphere 30 is a hollow body in which a spherical surface is formed, and a highly reflective and highly diffusible paint is applied to the inner spherical surface. The two light sources 32 are, for example, white LEDs (Light Emitting Diodes) or incandescent bulbs. The two light sources 32 are arranged on the spherical surface inside the integrating sphere 30. When the two light sources 32 emit light, the space inside the integrating sphere 30 has a substantially uniform illumination intensity distribution without depending on the orientation characteristics of the two light sources 32. The illumination unit 12 functions as a uniform standard light source, and generates a substantially uniform illumination environment space.

校正対象のカメラ14は、入射光を撮像素子へ集光するレンズ36と、光を電圧に変換する撮像素子38と、撮像素子38のアナログ電圧をデジタル信号に変換するA/D変換部40と、デジタル信号を画像化して撮像画像を生成する信号処理部42とを備えている。本実施形態のカメラ14は、監視カメラである。また、本実施形態のレンズ36は、魚眼レンズである。レンズ36は、鏡筒34に収容されている。撮像素子38は、CCD(Charge Coupled Device)やCMOS(Complementary MetalOxideSemiconductor)素子等である。カメラ14は、所定の通信線により外部の通信部16に接続されている。 The camera 14 to be calibrated includes a lens 36 that condenses incident light onto the image sensor, an image sensor 38 that converts light into voltage, and an A / D converter 40 that converts an analog voltage of the image sensor 38 into a digital signal. And a signal processing unit 42 that images the digital signal to generate a captured image. The camera 14 of this embodiment is a surveillance camera. Further, the lens 36 of the present embodiment is a fisheye lens. The lens 36 is accommodated in the lens barrel 34. The image sensor 38 is a CCD (Charge Coupled Device), a CMOS (Complementary Metal - Oxide - Semiconductor) element, or the like. The camera 14 is connected to an external communication unit 16 by a predetermined communication line.

カメラ14は、照明部12の2つの光源32が発光した状態での積分球30を撮像することにより略均一な入射光を撮像して撮像画像を生成する。本実施形態では、撮像画像はカラー画像である。しかし、撮像画像はモノクロ画像であってもよい。撮像画像は、信号処理部42から通信部16へ出力される。   The camera 14 captures substantially uniform incident light by capturing the integrating sphere 30 in a state where the two light sources 32 of the illumination unit 12 emit light, and generates a captured image. In the present embodiment, the captured image is a color image. However, the captured image may be a monochrome image. The captured image is output from the signal processing unit 42 to the communication unit 16.

通信部16は、カメラ14と画像処理部18と出力部22との間でデータをやりとりする為の通信回路を含んでいる。通信部16は、カメラ14と、画像処理部18と、出力部22とに接続されている。通信部16は、カメラ14から撮像画像を取得する画像取得手段50として機能する。通信部16が取得した撮像画像は、画像処理部18へ出力される。また、通信部16は、画像処理部18からカメラ14の校正情報を受け取り、校正情報を出力部22へ出力する校正情報出力手段52として機能する。校正情報は、画像処理部18が生成する情報であり、カメラ14の光軸中心座標が含まれた情報である。   The communication unit 16 includes a communication circuit for exchanging data among the camera 14, the image processing unit 18, and the output unit 22. The communication unit 16 is connected to the camera 14, the image processing unit 18, and the output unit 22. The communication unit 16 functions as an image acquisition unit 50 that acquires a captured image from the camera 14. The captured image acquired by the communication unit 16 is output to the image processing unit 18. The communication unit 16 functions as a calibration information output unit 52 that receives the calibration information of the camera 14 from the image processing unit 18 and outputs the calibration information to the output unit 22. The calibration information is information generated by the image processing unit 18 and is information including the optical axis center coordinates of the camera 14.

画像処理部18は、CPU(Central Processing Unit)、DSP(Digital Signal Processor)、MCU(Micro Control Unit)等の演算装置を含んで構成されている。画像処理部18は、記憶部20からプログラムを読み出して実行することにより、各種処理手段・制御手段として動作し、必要に応じて、各種データを記憶部20から読み出し、生成したデータを記憶部20に記憶(記録)する。記憶部20は、ROM(Read Only Memory)、RAM(Random Access Memory)、ハードディスク等であり、画像処理部18が実行するプログラムや、各種データを記憶する。   The image processing unit 18 includes an arithmetic device such as a CPU (Central Processing Unit), a DSP (Digital Signal Processor), or an MCU (Micro Control Unit). The image processing unit 18 operates as various processing units / control units by reading and executing a program from the storage unit 20, reads various data from the storage unit 20 as necessary, and stores the generated data in the storage unit 20. (Record). The storage unit 20 is a ROM (Read Only Memory), a RAM (Random Access Memory), a hard disk, or the like, and stores programs executed by the image processing unit 18 and various data.

画像処理部18は、通信部16経由でカメラ14から取得した撮像画像を用いて、カメラ14の光軸中心座標を算出する。画像処理部18は、光軸中心座標を算出するために、後述する、等輝度画像生成手段60(等輝度画素抽出手段)と、円中心算出手段62(重心算出手段)と、変動量算出手段64と、光軸中心決定手段66として機能する。画像処理部18は、算出した光軸中心座標を含めた校正情報を、通信部16に出力する。   The image processing unit 18 uses the captured image acquired from the camera 14 via the communication unit 16 to calculate the optical axis center coordinates of the camera 14. In order to calculate the optical axis center coordinates, the image processing unit 18, which will be described later, is an equiluminance image generation means 60 (isoluminance pixel extraction means), a circle center calculation means 62 (centroid calculation means), and a variation amount calculation means. 64 and the optical axis center determining means 66. The image processing unit 18 outputs calibration information including the calculated optical axis center coordinates to the communication unit 16.

出力部22は、液晶ディスプレイ又はCRT(Cathode Ray Tube)ディスプレイ等のディスプレイ装置である。出力部22は、通信部16経由で画像処理部18から入力された校正情報(光軸中心座標を含む)を表示する。   The output unit 22 is a display device such as a liquid crystal display or a CRT (Cathode Ray Tube) display. The output unit 22 displays calibration information (including the optical axis center coordinates) input from the image processing unit 18 via the communication unit 16.

次に、本実施形態における光軸中心座標の算出方法について説明する。   Next, a method for calculating the optical axis center coordinates in the present embodiment will be described.

図2は、撮像画像の一例を模式的に表した図である。撮像画像100には、鏡筒34の像である黒色の像(ケラレ)(図2の斜線部分)と積分球30の像(図2の白抜き部分)とが含まれている。図2の撮影画像100には、光軸中心座標101と、鏡筒中心座標102と、等輝度線103,104とが示されている。等輝度線103は、ケラレからも鏡筒中心座標102からも離れた領域に現れる輝度が同一の画素群を結んだ線である。等輝度線104は、ケラレ付近に現れる輝度が同一の画素群を結んだ線である。図2の下部には、横軸に画素位置をとり、縦軸に輝度値をとったグラフ110が示されている。グラフ110は、図2の上部に示した線分AB上の各画素の輝度値をプロットしたものである。   FIG. 2 is a diagram schematically illustrating an example of a captured image. The captured image 100 includes a black image (vignetting) that is an image of the lens barrel 34 (shaded portion in FIG. 2) and an image of the integrating sphere 30 (outlined portion in FIG. 2). The photographed image 100 in FIG. 2 shows an optical axis center coordinate 101, a lens barrel center coordinate 102, and isoluminance lines 103 and 104. The isoluminance line 103 is a line connecting pixel groups having the same luminance appearing in an area away from the vignetting and from the lens barrel center coordinate 102. The isoluminance line 104 is a line connecting pixels having the same luminance appearing near the vignetting. In the lower part of FIG. 2, a graph 110 is shown in which the horizontal axis represents the pixel position and the vertical axis represents the luminance value. The graph 110 is a plot of the luminance value of each pixel on the line segment AB shown in the upper part of FIG.

ケラレから離れた領域にある等輝度線103は、レンズ36の周辺光量比の変化による影響を強く受ける。周辺光量比の変化は光軸中心座標101を中心に起こることから、等輝度線103は、ほぼ円を形成し、その円の中心は光軸中心座標101とほぼ一致する。すなわち、等輝度線103が存在する画素位置(領域112a及び112b)の各画素は、ケラレによる減光の影響が小さく、レンズ30の周辺光量比の変化の影響が支配的なため、光軸中心座標101の算出に適している。   The isoluminance line 103 in the area away from the vignetting is strongly influenced by the change in the peripheral light amount ratio of the lens 36. Since the change in the peripheral light amount ratio occurs around the optical axis center coordinate 101, the isoluminance line 103 forms a substantially circle, and the center of the circle substantially coincides with the optical axis center coordinate 101. In other words, each pixel at the pixel position (regions 112a and 112b) where the isoluminance line 103 exists is less affected by dimming due to vignetting, and the influence of the change in the peripheral light amount ratio of the lens 30 is dominant. Suitable for calculation of the coordinate 101.

一方、ケラレ付近に現れる等輝度線104は、周辺光量比よりもケラレによる減光の影響を強く受けており、等輝度線104が形成する円の中心は、鏡筒中心座標102とほぼ一致する。すなわち、等輝度線104が存在する画素位置(領域111a及び111b)の各画素は、ケラレによる減光の影響を強く受けるため、この領域の各画素を用いて光軸中心座標101を算出することは適切でない。   On the other hand, the isoluminance line 104 that appears near the vignetting is more strongly affected by the vignetting than the peripheral light amount ratio, and the center of the circle formed by the isoluminance line 104 substantially coincides with the lens barrel center coordinate 102. . In other words, each pixel at the pixel position (regions 111a and 111b) where the isoluminance line 104 exists is strongly affected by dimming due to vignetting. Therefore, the optical axis center coordinate 101 is calculated using each pixel in this region. Is not appropriate.

また、撮像画像の中心付近の画素位置(領域113)の各画素は、領域112a,112bよりもさらにレンズ36の周辺光量比の変化の影響が支配的であるものの、周辺光量比の変化量が小さく、ノイズ等の影響を受けやすい。そのため、この領域の各画素を用いて光軸中心座標101を算出することは適切でない。   In addition, each pixel at the pixel position (region 113) near the center of the captured image is more influenced by the change in the peripheral light amount ratio of the lens 36 than the regions 112a and 112b, but the amount of change in the peripheral light amount ratio is small. Small and susceptible to noise. For this reason, it is not appropriate to calculate the optical axis center coordinate 101 using each pixel in this region.

そこで、本実施形態では、ケラレ付近の画素位置(領域111a及び111b)の画素と、ノイズ等の影響を受けやすい撮像画像の中心付近の画素位置(領域113)の画素ではなく、それらの間の画素位置(領域112a及び112b)の画素を用いて光軸中心座標101を算出する。換言すれば、ケラレ付近に現れる等輝度線104と、撮像画像の中心付近のノイズ等の影響を受けやすい領域の画素ではなく、それらの間に位置する等輝度線103から光軸中心座標101を算出する。   Therefore, in the present embodiment, not the pixel at the pixel position (areas 111a and 111b) near the vignetting and the pixel position (area 113) near the center of the captured image that is easily affected by noise or the like, but between them. The optical axis center coordinate 101 is calculated using the pixel at the pixel position (regions 112a and 112b). In other words, the optical axis center coordinate 101 is not the pixel of the isoluminance line 104 appearing near the vignetting and the pixel in the region susceptible to noise or the like near the center of the captured image, but from the isoluminance line 103 positioned between them. calculate.

図3は、本実施形態における光軸中心座標を算出するための各手段と、それらによって生成されたデータの流れを示すブロック図である。まず、通信部16の画像取得手段50が、撮像手段であるカメラ14から撮像画像を取得する。撮像画像は、カメラ14により照明部12の積分球30を撮像した画像、すなわち、カメラ14により略均一な入射光を撮像した画像である。図3に示すように、画像取得手段50は、取得した撮像画像を、画像処理部18の等輝度画像生成手段60に出力する。   FIG. 3 is a block diagram showing each means for calculating the optical axis center coordinates and the flow of data generated by them in this embodiment. First, the image acquisition unit 50 of the communication unit 16 acquires a captured image from the camera 14 that is an imaging unit. The captured image is an image in which the integrating sphere 30 of the illumination unit 12 is captured by the camera 14, that is, an image in which substantially uniform incident light is captured by the camera 14. As shown in FIG. 3, the image acquisition unit 50 outputs the acquired captured image to the equiluminance image generation unit 60 of the image processing unit 18.

等輝度画像生成手段60は、撮像画像の中の輝度範囲における複数の注目輝度値を設定する。例えば、カラーの撮像画像をモノクロ化して、その各画素が取り得る輝度値の範囲0〜65535内で300おきに注目輝度値を設定する。そして、撮像画像から各注目輝度値を有する画素を抽出することによって注目輝度値ごとの等輝度画像を生成する。等輝度画像は、例えば、画素値が注目輝度値である画素の画素値を1、そうでない画素の画素値を0に設定した二値画像である。等輝度画像生成手段60は、生成した複数の等輝度画像を、円中心算出手段62(重心算出手段)へ出力する。   The equiluminance image generation means 60 sets a plurality of luminance values of interest in the luminance range in the captured image. For example, a color captured image is converted into a monochrome image, and a target luminance value is set every 300 in a luminance value range 0 to 65535 that each pixel can take. Then, an isoluminance image for each target luminance value is generated by extracting pixels having each target luminance value from the captured image. The equiluminance image is, for example, a binary image in which the pixel value of a pixel whose pixel value is the target luminance value is set to 1, and the pixel value of a pixel other than that is set to 0. The equiluminance image generation means 60 outputs the generated plural equiluminance images to the circle center calculation means 62 (center of gravity calculation means).

円中心算出手段62は、等輝度画像のそれぞれにおいて注目輝度値の画素の重心の座標(重心座標)を算出する。具体的には、等輝度画像の注目輝度値の画素の位置を円近似すると共に、その円の円中心座標を重心座標として算出する。円中心算出手段62は、例えば、等輝度画像にハフ(Hough)変換を施し、等輝度画像の注目輝度値の画素の位置を円近似し、その円の円中心座標を算出する。すなわち、等輝度画像において注目輝度値を有する画素群を円で近似し(円を検出し)、円中心座標をハフ変換により導出する。この際、ハフ変換により円の大きさ(半径)も導出される。そして、円中心算出手段62は、導出した円中心座標を、注目輝度値と対応付ける。円中心算出手段62は、注目輝度値ごとの円中心座標を、変動量算出手段64へ出力する。   The circle center calculation means 62 calculates the coordinates (centroid coordinates) of the center of gravity of the pixel of the target luminance value in each of the equal luminance images. Specifically, the pixel position of the target luminance value of the equiluminance image is approximated to a circle, and the circle center coordinates of the circle are calculated as the center-of-gravity coordinates. The circle center calculation means 62 performs, for example, Hough transformation on the isoluminance image, approximates the position of the pixel of the target luminance value of the isoluminance image, and calculates the circle center coordinates of the circle. That is, a pixel group having a target luminance value in an equiluminance image is approximated by a circle (a circle is detected), and the circle center coordinates are derived by Hough transform. At this time, the size (radius) of the circle is also derived by the Hough transform. Then, the circle center calculation unit 62 associates the derived circle center coordinates with the target luminance value. The circle center calculation unit 62 outputs the circle center coordinates for each target luminance value to the fluctuation amount calculation unit 64.

図4は、円中心算出手段62による円中心座標の算出処理の様子を示す模式図である。図4の上側には、ある注目輝度値の等輝度画像200の一例が示されている。等輝度画像200には、注目輝度値を有する画素群201が現れている。図4の下側には、等輝度画像200にハフ変換を施した後の画像210が示されている。図4の下側に示すように、等輝度画像200にハフ変換を施すと、画素群を近似する円211の円中心座標212と半径とを導出することができる。   FIG. 4 is a schematic diagram showing how the circle center coordinates are calculated by the circle center calculation means 62. On the upper side of FIG. 4, an example of an equiluminance image 200 with a certain luminance value is shown. In the equal luminance image 200, a pixel group 201 having a target luminance value appears. In the lower side of FIG. 4, an image 210 after the Hough transform is performed on the equiluminance image 200 is shown. As shown in the lower part of FIG. 4, when the Hough transform is performed on the equiluminance image 200, the circle center coordinates 212 and the radius of the circle 211 that approximates the pixel group can be derived.

図3に戻り、変動量算出手段64は、注目輝度値ごとの円中心座標について、輝度値の変化に対する円中心座標の変動量を算出する。具体的には、変動量を算出する対象の注目輝度値(対象注目輝度値)の円中心座標と、対象注目輝度値に隣り合う2つの注目輝度値の円中心座標の各々との距離(第1距離および第2距離)を算出し、第1距離と第2距離との和(距離の和)を、対象注目輝度値における円中心座標の変動量として算出する。詳細には、次のようになる。IMAX(注目輝度値の最大値)からIMIN(注目輝度値の最小値)までの各注目輝度値に対して順番に番号0,1,2,3,…,Nを付与し、これらの注目輝度値について算出した円中心座標をC0,C1,C2,…CNとする。そして、n番目の注目輝度値(対象注目輝度値)の円中心座標をCnとし、その円中心座標Cnの変動量をΔCnとする。その場合の変動量ΔCn(円中心座標の変動量)は、以下の(数1)式により算出される。 Returning to FIG. 3, the fluctuation amount calculation means 64 calculates the fluctuation amount of the circle center coordinate with respect to the change of the luminance value for the circle center coordinate for each target luminance value. Specifically, the distance between the circle center coordinate of the target luminance value (target target luminance value) of the target for calculating the amount of variation and each of the circle center coordinates of two target luminance values adjacent to the target target luminance value (first 1 distance and 2nd distance) are calculated, and the sum of 1st distance and 2nd distance (sum of distance) is calculated as a fluctuation amount of the circle center coordinate in the target attention luminance value. The details are as follows. Numbers 0, 1, 2, 3,..., N are assigned in order to each target luminance value from I MAX (maximum value of target luminance value) to I MIN (minimum value of target luminance value). the circle center coordinates calculated for the target luminance values C 0, C 1, C 2 , and ... C N. Then, the circle center coordinate of the nth target luminance value (target target luminance value) is C n, and the variation amount of the circle center coordinate C n is ΔC n . In this case, the fluctuation amount ΔC n (the fluctuation amount of the circle center coordinate) is calculated by the following equation (1).

ΔCn=D(Cn-1,Cn)+D(Cn,Cn+1) (数1) ΔC n = D (C n−1 , C n ) + D (C n , C n + 1 ) (Equation 1)

但し、上記の(数1)式において、nは、1≦n≦(N−1)である。また、上記の(数1)式のDは2点間の距離であり、D(Cn-1,Cn)が第1距離であり、D(Cn,Cn+1)が第2距離である。変動量算出手段64は、注目輝度値と円中心座標と変動量ΔCn(円中心座標の変動量)とを対応付けた変動量情報を光軸中心決定手段66に出力する。 However, in said (Formula 1) formula, n is 1 <= n <= (N-1). In the above equation (1), D is the distance between two points, D (C n−1 , C n ) is the first distance, and D (C n , C n + 1 ) is the second distance. Distance. The fluctuation amount calculation unit 64 outputs fluctuation amount information in which the target luminance value, the circle center coordinate, and the fluctuation amount ΔC n (the fluctuation amount of the circle center coordinate) are associated with each other to the optical axis center determination unit 66.

光軸中心決定手段66は、少なくとも、円中心座標のうち円中心座標の変動量が所定値(閾値T1)以下である注目輝度値における円中心座標から光軸中心座標を決定する。 The optical axis center determining means 66 determines the optical axis center coordinates from the circle center coordinates at the noticed luminance value in which the variation amount of the circle center coordinates is not more than a predetermined value (threshold value T 1 ) among the circle center coordinates.

図5は、注目輝度値に対する円中心座標の変動量ΔCnの一例を示すグラフである。図5に示すように、グラフ300は、横軸が注目輝度値、縦軸が変動量ΔCn[画素(pixel)]となっている。グラフ300には、注目輝度値ごとの変動量がプロットされている。光軸中心決定手段66は、例えば閾値T1=1[画素]とし、1画素以下である変動量を有する注目輝度値の円中心座標を抽出する。なお、閾値T1の値は、要求される校正の精度に応じて予め設定しておいてもよい。図5のグラフ300では、変動量が1画素以下である注目輝度値が、低輝度な領域301,302に存在している。このように、変動量が閾値T1以下であるという条件を満たす注目輝度値の円中心座標を選出する。これにより、図5の高輝度な区間305は、変動量が閾値T1より大きいため、光軸中心座標を決定する際の対象から除かれる。つまり、画素位置に対する輝度値の変化が小さくノイズの影響を受けやすいレンズ中心付近の画像領域(高輝度な領域、図2の領域113)から検出された不安定な円の円中心座標を除いて、高い精度で光軸中心座標が決定される。また、ケラレのボケから生じる減光の影響を強く受けた等輝度円の円中心座標(ほぼ鏡筒中心座標を表す座標)を、光軸中心座標に決定する誤決定を防止することができる。 FIG. 5 is a graph showing an example of the variation amount ΔC n of the circle center coordinates with respect to the target luminance value. As shown in FIG. 5, in the graph 300, the horizontal axis represents the target luminance value, and the vertical axis represents the variation ΔC n [pixel]. In the graph 300, the fluctuation amount for each target luminance value is plotted. The optical axis center determining unit 66 extracts, for example, a circle center coordinate of a target luminance value having a variation amount equal to or less than one pixel with a threshold T 1 = 1 [pixel]. Note that the value of the threshold value T 1 may be set in advance according to the required calibration accuracy. In the graph 300 of FIG. 5, the target luminance value whose variation amount is 1 pixel or less exists in the low luminance areas 301 and 302. In this way, the circle center coordinate of the target luminance value that satisfies the condition that the fluctuation amount is equal to or less than the threshold value T 1 is selected. As a result, the high-brightness section 305 in FIG. 5 is excluded from the target for determining the optical axis center coordinates because the fluctuation amount is larger than the threshold T 1 . That is, except for the center coordinates of the unstable circle detected from the image area (high brightness area, area 113 in FIG. 2) in the vicinity of the lens center where the change of the luminance value with respect to the pixel position is small and susceptible to noise. The optical axis center coordinates are determined with high accuracy. Further, it is possible to prevent erroneous determination of determining the center coordinate of the isoluminance circle (coordinate that substantially represents the lens barrel center coordinate) that is strongly affected by dimming caused by vignetting blur as the optical axis center coordinate.

また、光軸中心決定手段66は、円中心座標の変動量が所定値(閾値T1)以下である円中心座標のうち、所定の輝度値の幅にある円中心座標から光軸中心座標を決定する。換言すれば、円中心座標の変動量が閾値T1以下である注目輝度値の円中心座標であって、注目輝度値同士が近接している(所定の輝度値の幅にある)円中心座標から光軸中心座標を決定する。具体的には、円中心座標の変動量が閾値T1以下である輝度値であって、輝度値が閾値T2[個(回)]以上連続している領域における輝度値の円中心座標から光軸中心座標を決定する。例えば、光軸中心決定手段66は、閾値T2=3として、注目輝度値が3個以上連続している連続区間における注目輝度値の円中心座標を抽出する。注目輝度値が3個以上連続している連続区間とは、例えば、注目輝度値が300刻みで設定されている場合における、注目輝度値13500,13200,12900のような区間である。このように、近傍の複数の注目輝度値(近傍の複数の円)であって、変動量ΔCnが閾値T1以下である注目輝度値(円)の円中心座標を抽出し、この抽出した円中心座標から光軸中心座標を決定する。それにより、光軸中心座標の決定処理の信頼性が向上する。すなわち、例えば、ノイズ等の影響によって、ある輝度値の円中心座標の変動量が離散的に閾値T1以下となり、その輝度値の円中心座標が用いられて、光軸中心座標が決定される事態を避けることができる。なお、閾値T2の値は、レンズ36、照明部12、注目輝度値の間隔などに依存するため、予め実験等を通じて設定しておいてもよい。 Further, the optical axis center determining means 66 calculates the optical axis center coordinates from the circle center coordinates having a predetermined brightness value width among the circle center coordinates in which the variation amount of the circle center coordinates is not more than a predetermined value (threshold value T 1 ). decide. In other words, the circle center coordinates of the target luminance value whose variation amount of the circle center coordinate is equal to or less than the threshold value T 1 , and the target luminance values are close to each other (with a predetermined luminance value width). To determine the optical axis center coordinates. Specifically, from the circle center coordinates of the luminance value in a region where the fluctuation amount of the circle center coordinate is a threshold value T 1 or less and the luminance value is continuous for the threshold value T 2 [number (times)] or more. Determine the optical axis center coordinates. For example, the optical axis center determining unit 66 sets the threshold T 2 = 3, and extracts the circle center coordinate of the target luminance value in a continuous section in which three or more target luminance values are continuous. The continuous section in which three or more attention luminance values are continuous is, for example, a section such as attention luminance values 13500, 13200, and 12900 when the attention luminance value is set in increments of 300. In this way, the circle center coordinates of a plurality of neighboring luminance values (a plurality of neighboring circles) having a variation amount ΔC n of the threshold value T 1 or less are extracted and extracted. The optical axis center coordinates are determined from the circle center coordinates. Thereby, the reliability of the optical axis center coordinate determination process is improved. That is, for example, due to the influence of noise or the like, the fluctuation amount of the circle center coordinate of a certain luminance value is discretely equal to or less than the threshold T 1, and the circle center coordinate of the luminance value is used to determine the optical axis center coordinate. You can avoid the situation. Note that the value of the threshold T 2 depends on the lens 36, the illumination unit 12, the interval of the target luminance value, and the like, and may be set in advance through experiments or the like.

図5のグラフ300では、低輝度な領域301,302において、連続する3個以上の注目輝度値で、変動量が1画素以下となっている区間303,304が存在している。光軸中心決定手段66は、これらの区間303,304を抽出する。   In the graph 300 of FIG. 5, there are sections 303 and 304 in which the variation amount is one pixel or less with three or more consecutive attention luminance values in the low luminance areas 301 and 302. The optical axis center determining means 66 extracts these sections 303 and 304.

また、光軸中心決定手段66は、円中心座標の変動量が閾値T1以下である注目輝度値の円中心座標のうち、より大きい注目輝度値の円中心座標を優先して用いて光軸中心座標を決定する。具体的には、図5に示すように、抽出された連続区間が2つある(区間303および区間304)場合には、注目輝度値が最大の連続区間である区間304が選択され、区間304に含まれている連続するT2個以上の注目輝度値の円中心座標が抽出される。そして、この抽出した円中心座標から光軸中心座標を決定する。これにより、ケラレ境界付近の画像領域の注目輝度値(図5の区間303、注目輝度値が小さい区間)の円中心座標が排除されて、光軸中心座標が決定されることになる。換言すれば、図5の区間302よりもケラレのボケから生じる減光の影響を強く受けている可能性があるケラレ付近の画像領域(図2の領域111a及び111b)の注目輝度値(図5の区間301)を除いて、高精度に光軸中心座標を決定することができる。 Further, the optical axis center determining means 66 preferentially uses the circle center coordinate of the noticed luminance value having a larger amount of noticed brightness value among the circle center coordinates of the noticed brightness value whose variation amount of the circle center coordinate is equal to or less than the threshold value T 1. Determine the center coordinates. Specifically, as shown in FIG. 5, when there are two extracted continuous sections (section 303 and section 304), the section 304 that is the continuous section with the maximum luminance value is selected, and the section 304 is selected. The circle center coordinates of two or more consecutive luminance values of interest contained in the are extracted. Then, the optical axis center coordinates are determined from the extracted circle center coordinates. As a result, the circle center coordinates of the target luminance value (section 303 in FIG. 5, the section where the target luminance value is small) in the image area near the vignetting boundary are excluded, and the optical axis center coordinates are determined. In other words, the noticed luminance value (FIG. 5) of the image area (areas 111a and 111b in FIG. 2) in the vicinity of vignetting that may be more strongly affected by dimming caused by vignetting blur than the section 302 in FIG. The optical axis center coordinates can be determined with high accuracy except for the section 301).

光軸中心決定手段66は、抽出した円中心座標の平均値を算出することで、光軸中心座標を決定する。図5に示すグラフ300の場合には、区間304にある注目輝度値の円中心座標の平均値を算出し、その平均値を光軸中心座標とする。光軸中心決定手段66は、光軸中心座標を含めた校正情報を生成する。この際、光軸中心決定手段66は、画像の中心座標から光軸中心座標までの距離(ズレ量)をさらに算出して、ズレ量を含ませた校正情報を生成してもよい。光軸中心決定手段66は、決定した光軸中心座標を含めた校正情報を通信部16の校正情報出力手段52に出力する。   The optical axis center determination means 66 determines the optical axis center coordinates by calculating the average value of the extracted circle center coordinates. In the case of the graph 300 shown in FIG. 5, the average value of the circle center coordinates of the target luminance value in the section 304 is calculated, and the average value is set as the optical axis center coordinates. The optical axis center determining means 66 generates calibration information including the optical axis center coordinates. At this time, the optical axis center determining unit 66 may further calculate a distance (deviation amount) from the center coordinates of the image to the optical axis center coordinates, and generate calibration information including the deviation amount. The optical axis center determining unit 66 outputs the calibration information including the determined optical axis center coordinates to the calibration information output unit 52 of the communication unit 16.

校正情報出力手段52は、光軸中心決定手段66から入力された校正情報を、出力部22に出力する。出力部22は、入力された校正情報を表示し、検査員に伝達する。検査員は表示された光軸中心座標を読み取って、光軸中心座標を画像監視装置に設定する。なお、校正情報にズレ量を含ませる場合には、検査員は、表示されたズレ量を読み取って、或いは、さらにズレ量を統計分析して、カメラ14の製造精度をレポートすることができる。   The calibration information output unit 52 outputs the calibration information input from the optical axis center determination unit 66 to the output unit 22. The output unit 22 displays the input calibration information and transmits it to the inspector. The inspector reads the displayed optical axis center coordinates and sets the optical axis center coordinates in the image monitoring apparatus. In addition, when the amount of deviation is included in the calibration information, the inspector can report the manufacturing accuracy of the camera 14 by reading the displayed amount of deviation or statistically analyzing the amount of deviation.

次に、カメラ校正装置10が実行する詳細な処理の流れについて説明する。   Next, a detailed processing flow executed by the camera calibration apparatus 10 will be described.

図6,図7は、本実施形態におけるカメラ校正装置10が実行する処理の流れを示すフローチャートである。まず、照明部12において、積分球30の内部は2つの光源32によって照らされた状態にされる。積分球30の内部の照明強度分布は均一になっており、カメラ14は、その積分球30の内部を撮像して撮像画像を出力する。図6,図7のフローは、その状態で開始される。   6 and 7 are flowcharts showing the flow of processing executed by the camera calibration apparatus 10 according to this embodiment. First, in the illumination unit 12, the interior of the integrating sphere 30 is illuminated by the two light sources 32. The illumination intensity distribution inside the integrating sphere 30 is uniform, and the camera 14 images the inside of the integrating sphere 30 and outputs a captured image. 6 and 7 starts in this state.

図6に示すように、まず、S100で、通信部16は画像取得手段50として機能して撮像画像を取得し、撮像画像を画像処理部18へ出力する。   As shown in FIG. 6, first, in S <b> 100, the communication unit 16 functions as the image acquisition unit 50 to acquire a captured image, and outputs the captured image to the image processing unit 18.

撮像画像を受け取った画像処理部18は、等輝度画像生成手段60および円中心算出手段62(重心算出手段)として機能し、注目輝度値を順次設定してS102〜S112の処理を繰り返し行う。S102で、等輝度画像生成手段60は、撮像画像の中の輝度範囲において注目輝度値を設定する。注目輝度値の設定範囲は、例えば、65535から−300刻みで0までとする。或いは、例えば、49200から−300刻みで4500までとする。画像処理部18は、S102で注目輝度値を設定して、S104〜S112の処理を実行し、再びS102に戻って、注目輝度値を300だけ減じて再びS104〜S112の処理を実行する。画像処理部18は、この一連の処理を繰り返す。   The image processing unit 18 that has received the captured image functions as the equiluminance image generation unit 60 and the circle center calculation unit 62 (center of gravity calculation unit), and sequentially sets the target luminance value and repeats the processes of S102 to S112. In S102, the equiluminance image generation means 60 sets a target luminance value in the luminance range in the captured image. The setting range of the target luminance value is, for example, from 65535 to 0 in −300 increments. Or, for example, from 49200 to 4500 in increments of -300. The image processing unit 18 sets the target luminance value in S102, executes the processing of S104 to S112, returns to S102 again, decreases the target luminance value by 300, and executes the processing of S104 to S112 again. The image processing unit 18 repeats this series of processing.

S104で、等輝度画像生成手段60は、カラー画像の撮像画像をモノクロ化し、モノクロ化した撮像画像から注目輝度値を抽出して等輝度画像を生成する。   In S <b> 104, the equiluminance image generation unit 60 converts the captured image of the color image to monochrome, extracts a luminance value of interest from the monochrome imaged image, and generates an isoluminance image.

次に、S106で、画像処理部18は円中心算出手段62(重心算出手段)として機能し、等輝度画像において注目輝度値の画素の重心座標を算出する。具体的には、等輝度画像を用いて、円を検出する注目輝度値の画素の位置を円で近似すると共に、その円の円中心座標を重心座標として算出する。そして、円中心算出手段62は、算出した円中心座標を注目輝度値と対応付ける。   Next, in S106, the image processing unit 18 functions as the circle center calculating unit 62 (centroid calculating unit), and calculates the barycentric coordinates of the pixel of the target luminance value in the equal luminance image. Specifically, using the isoluminance image, the position of the pixel of the target luminance value for detecting the circle is approximated by a circle, and the circle center coordinate of the circle is calculated as the barycentric coordinate. Then, the circle center calculation unit 62 associates the calculated circle center coordinates with the target luminance value.

次に、S108で、円中心算出手段62は、等輝度画像から円が検出されたかを確認する。円が検出された場合(S108:Yes)には、その円の円中心座標を注目輝度値と対応付けて記憶部20に記録する(S110)。一方、円が検出されなかった場合(S108:No)には、S110は省略される。次に、S112で、画像処理部18は、注目輝度値が最小輝度値に達したか、すなわち、最小輝度値の等輝度画像まで処理を行ったかを確認する。注目輝度値が最小輝度値に達していた場合(S112:Yes)には、図7のS114に進む。一方、注目輝度値が最小輝度値に達していない場合(S112:No)には、S102に戻って次の注目輝度値を処理する。   Next, in S108, the circle center calculating means 62 confirms whether a circle is detected from the equiluminance image. If a circle is detected (S108: Yes), the circle center coordinates of the circle are associated with the target luminance value and recorded in the storage unit 20 (S110). On the other hand, when a circle is not detected (S108: No), S110 is omitted. Next, in S112, the image processing unit 18 confirms whether the target luminance value has reached the minimum luminance value, that is, whether the processing has been performed up to the equal luminance image having the minimum luminance value. If the target luminance value has reached the minimum luminance value (S112: Yes), the process proceeds to S114 in FIG. On the other hand, when the target luminance value has not reached the minimum luminance value (S112: No), the process returns to S102 and the next target luminance value is processed.

次に、図7のS114で、画像処理部18は変動量算出手段64として機能し、注目輝度値ごとの円中心座標から注目輝度値に対する円中心座標の変動量を算出する。具体的には、上記した(数1)式により変動量ΔCnを算出する。なお、(数1)式において、円近似することができなかったことにより記録の無い円中心座標Cn-1,CnまたはCn+1がある場合には、それらを算出要素に含む変動量ΔCnは算出せずに、値を無しとしておく。 Next, in S <b> 114 of FIG. 7, the image processing unit 18 functions as the fluctuation amount calculation unit 64, and calculates the fluctuation amount of the circle center coordinate with respect to the target luminance value from the circle center coordinates for each target luminance value. Specifically, the fluctuation amount ΔC n is calculated by the above equation (Equation 1). In the formula (1), if there are unrecorded circle center coordinates C n−1 , C n or C n + 1 due to the fact that the circle cannot be approximated, the variation including these as calculation elements The amount ΔC n is not calculated and has no value.

S114の後はS116に進む。S116で、画像処理部18は光軸中心決定手段66として機能し、S114で算出した変動量のそれぞれを閾値T1と比較して、閾値T1以下である変動量を抽出する。これにより、ノイズ等の影響を受けやすい撮像画像の中心付近の画素位置(図2の領域113)の画素に基づいて得られた円中心座標が排除されて、光軸中心座標が決定されることになる。 After S114, the process proceeds to S116. In S116, the image processing unit 18 functions as an optical axis center determining means 66 compares each of the calculated variation in S114 the thresholds T 1, and extracts the variation is thresholds T 1 below. Thereby, the circle center coordinates obtained based on the pixel at the pixel position (region 113 in FIG. 2) near the center of the captured image that is easily affected by noise or the like are excluded, and the optical axis center coordinates are determined. become.

次に、S118で、光軸中心決定手段66は、S116で抽出した変動量と対応付いた注目輝度値のうち、所定の輝度値の幅にある注目輝度値の円中心座標を抽出する。具体的には、円中心座標の変動量が閾値T1以下である輝度値(注目輝度値)であって、輝度値が閾値T2個以上連続している連続区間の輝度値の円中心座標を抽出する。このように円中心座標を抽出することにより、例えば、ノイズ等の影響によって、ある注目輝度値の円中心座標の変動量が離散的に閾値T1以下となり、その注目輝度値の円中心座標が用いられて、光軸中心座標が決定される事態を避けることができる。 Next, in S118, the optical axis center determining unit 66 extracts the circle center coordinates of the target luminance value within the predetermined luminance value range from the target luminance value associated with the variation amount extracted in S116. Specifically, the circle center coordinate of the luminance value of a continuous section in which the fluctuation amount of the circle center coordinate is the threshold value T 1 or less (the target luminance value) and the luminance value is continuous for the threshold value T 2 or more. To extract. By extracting this way the circle center coordinates, for example, the influence of noise or the like, the amount of variation of the circle center coordinates of a target luminance value is discretely becomes thresholds T 1 or less, the circle center coordinates of the target luminance values It is possible to avoid a situation where the optical axis center coordinates are determined.

次に、S120で、光軸中心決定手段66は、S118で抽出した連続区間が複数個あるかを確認する。連続区間が複数個ある場合(S120:Yes)には、注目輝度値が最大の連続区間を選択する(S122)。そして、光軸中心決定手段66は、この選択した連続区間の注目輝度値の円中心座標から光軸中心座標を決定する。これにより、ケラレのボケから生じる減光の影響を強く受けている可能性があるケラレ付近の区間を除いて、高精度に光軸中心座標を決定することができる。   Next, in S120, the optical axis center determining unit 66 confirms whether there are a plurality of continuous sections extracted in S118. When there are a plurality of continuous sections (S120: Yes), the continuous section with the maximum target luminance value is selected (S122). Then, the optical axis center determining means 66 determines the optical axis center coordinates from the circle center coordinates of the target luminance value in the selected continuous section. As a result, the optical axis center coordinates can be determined with high accuracy except for a section in the vicinity of vignetting that may be strongly affected by dimming caused by vignetting blur.

一方、図7のS120で、光軸中心決定手段66は、複数の連続区間がなかった場合(S120:No)には、S122を省略する。次に、S124で、光軸中心決定手段66は、S122で選択した連続区間の注目輝度値の円中心座標、或いは、複数の連続区間がなかった場合にはS118で抽出された連続区間の注目輝度値の円中心座標から光軸中心座標を算出する。具体的には、連続区間の注目輝度値の円中心座標の平均を算出し、その平均値を光学中心座標と決定する。換言すれば、連続区間に含まれる全ての円中心座標の平均値を光軸中心座標として算出する。   On the other hand, in S120 of FIG. 7, the optical axis center determining unit 66 omits S122 when there are not a plurality of continuous sections (S120: No). Next, in S124, the optical axis center determining unit 66 selects the circular center coordinates of the luminance value of interest in the continuous section selected in S122, or the attention of the continuous section extracted in S118 when there are no plural continuous sections. The optical axis center coordinates are calculated from the circle center coordinates of the luminance value. Specifically, the average of the circle center coordinates of the luminance value of interest in the continuous section is calculated, and the average value is determined as the optical center coordinates. In other words, the average value of all the circle center coordinates included in the continuous section is calculated as the optical axis center coordinates.

S124の後はS126に進む。S126で、光軸中心決定手段66は、決定した光軸中心座標を含めた校正情報を生成する。光軸中心決定手段66は、校正情報を通信部16の校正情報出力手段52に出力する。校正情報出力手段52は、画像処理部18の光軸中心決定手段66から入力された校正情報を、出力部22に出力する。出力部22は、入力された校正情報を表示し、検査員に伝達する。検査員は表示された光軸中心座標を読み取って、光軸中心座標を画像監視装置に設定する。   After S124, the process proceeds to S126. In S126, the optical axis center determining unit 66 generates calibration information including the determined optical axis center coordinates. The optical axis center determining unit 66 outputs the calibration information to the calibration information output unit 52 of the communication unit 16. The calibration information output unit 52 outputs the calibration information input from the optical axis center determination unit 66 of the image processing unit 18 to the output unit 22. The output unit 22 displays the input calibration information and transmits it to the inspector. The inspector reads the displayed optical axis center coordinates and sets the optical axis center coordinates in the image monitoring apparatus.

以上説明した本実施形態のカメラ校正装置10によれば、撮像素子の中心と光軸中心のアライメントずれ、ケラレの像のボケ、または鏡筒のアライメントずれがあっても、撮像した画像における光軸中心座標を正確に算出することができる。   According to the camera calibration device 10 of the present embodiment described above, the optical axis in the captured image even if there is misalignment between the center of the image sensor and the center of the optical axis, blurring of the vignetting image, or misalignment of the lens barrel. The center coordinates can be calculated accurately.

なお、以上説明した実施形態のカメラ校正装置10では、円中心座標の変動量が閾値T1以下である輝度値の円中心座標から、さらに、図7のS118〜S122の処理を行って、光軸中心座標の算出に用いる円中心座標を選んだ。しかし、S118〜S122の処理を省略して、円中心座標の変動量が閾値T1以下である輝度値の円中心座標から光軸中心座標を算出してもよい。この場合であっても、少なくとも、レンズ中心付近の画像領域から検出された不安定な円の円中心座標を確実に排除して、光軸中心座標を算出することができる。 The above in Embodiment camera calibration device 10 as described, the circle center coordinate of the luminance values variation amount of the circle center coordinate is thresholds T 1 or less, further, by performing the processing of S118~S122 in Fig. 7, the light The circle center coordinates used to calculate the axis center coordinates were selected. However, by omitting the processing of S118-S122, may be calculated optical axis center coordinates from the circle center coordinate of the luminance values variation amount of the circle center coordinate is thresholds T 1 below. Even in this case, at least the center coordinate of the unstable circle detected from the image area near the center of the lens can be reliably excluded and the optical axis center coordinate can be calculated.

以上説明した実施形態のカメラ校正装置10は、等輝度画像における注目輝度値の画素の位置を円で近似して当該円の円中心座標を重心座標として算出した。しかし、重心座標は円中心座標でなくても良い。例えば、等輝度画像の注目輝度値の画素の中から互いに略等間隔に位置が離れた数個(例えば3個)の画素を選択し、それらの選択した画素の位置の重心を重心座標として算出しても良い。また、例えば、等輝度画像の注目輝度値の画素の位置を多角形(例えば六角形)に近似すると共に、その多角形の重心となる座標を重心座標として算出しても良い。   The camera calibration device 10 according to the embodiment described above approximates the position of the pixel of the target luminance value in the equiluminance image with a circle and calculates the circle center coordinate of the circle as the barycentric coordinate. However, the center-of-gravity coordinates need not be circle center coordinates. For example, several pixels (for example, three) whose positions are separated from each other at substantially equal intervals are selected from pixels of the target luminance value of the equiluminance image, and the center of gravity of the position of these selected pixels is calculated as the barycentric coordinate You may do it. Further, for example, the pixel position of the target luminance value of the equiluminance image may be approximated to a polygon (for example, a hexagon), and the coordinates that are the center of gravity of the polygon may be calculated as the center of gravity coordinates.

以上説明した実施形態のカメラ校正装置10は、変動量算出手段64が、注目輝度値に対する円中心座標の変動量を算出した。そして、光軸中心決定手段66が、円中心座標のうちの円中心座標の変動量が閾値T1以下である注目輝度値における円中心座標から光軸中心座標を決定した。しかし、変動量算出手段64が、円の大きさに対する円中心座標の変動量を算出してもよい。そして、光軸中心決定手段66が、円中心座標のうち円中心座標の変動量が所定値以下である円の大きさにおける円中心座標から光軸中心座標を決定してもよい。図2に示すように、円の大きさが大きい等輝度線(例えば、等輝度線104)の注目輝度値は低く、円の大きさが小さい等輝度線(例えば、等輝度線103)の注目輝度値は高い。このように、円の大きさと注目輝度値とは対応関係があるため、上記で説明した実施形態の「注目輝度値」を「円の大きさ」に置き換えた実施形態を考えることができる。次に、この「注目輝度値」を「円の大きさ」に置き換えた実施形態(以下、「円の大きさの実施形態」と言う)について説明する。 In the camera calibration device 10 according to the embodiment described above, the fluctuation amount calculation unit 64 calculates the fluctuation amount of the circle center coordinates with respect to the target luminance value. Then, the optical axis center determining means 66 determines the optical axis center coordinates from the circle center coordinates at the target luminance value in which the variation amount of the circle center coordinates out of the circle center coordinates is equal to or less than the threshold value T 1 . However, the fluctuation amount calculation means 64 may calculate the fluctuation amount of the circle center coordinates with respect to the size of the circle. Then, the optical axis center determining means 66 may determine the optical axis center coordinates from the circle center coordinates in the size of the circle in which the variation amount of the circle center coordinates is not more than a predetermined value among the circle center coordinates. As shown in FIG. 2, the attention luminance value of the isoluminance line having a large circle size (for example, the isoluminance line 104) is low and the attention luminance value having a small circle size (for example, the isoluminance line 103) is attention. The brightness value is high. Thus, since the size of the circle and the target luminance value have a correspondence relationship, an embodiment in which “the target luminance value” in the embodiment described above is replaced with “the size of the circle” can be considered. Next, an embodiment in which the “attention luminance value” is replaced with “circle size” (hereinafter, referred to as “circle size embodiment”) will be described.

等輝度画像生成手段60は、撮像画像に含まれる複数の注目輝度値ごとに、撮像画像から注目輝度値を有する画素を抽出して等輝度画像を生成する。この時点までは、上記の実施形態(以下、「輝度値の実施形態」と言う)と同じである。円中心算出手段62は、等輝度画像のそれぞれにおいて注目輝度値の画素の位置を円で近似すると共に、当該円の大きさ(ここでは、半径とする)と円中心座標とを算出し、円の大きさと円中心座標とを対応付ける。円の半径と円中心座標とは、「輝度値の実施形態」と同様に、等輝度画像にハフ変換を施すことで導出される。次に、変動量算出手段64は、円の大きさに対する円中心座標の変動量を算出する。具体的には、変動量を算出する対象の円の半径(以下、「対象の円の半径」と言う)の円中心座標と、「対象の円の半径」に隣り合う(半径の大きさにおいて隣り合う)2つの円の半径の円中心座標の各々との距離(第1距離および第2距離)を算出し、それら第1距離と第2距離との和を、「対象の円の半径」の円中心座標の変動量として算出する。すなわち、変動量の算出方法は、上記の「輝度値の実施形態」の(数1)式と同様である。   The equiluminance image generation means 60 extracts a pixel having an attention luminance value from the captured image for each of a plurality of attention luminance values included in the captured image, and generates an equiluminance image. Up to this point, the present embodiment is the same as the above-described embodiment (hereinafter referred to as “brightness value embodiment”). The circle center calculation means 62 approximates the position of the pixel of the target luminance value with a circle in each of the equal luminance images, calculates the size of the circle (here, the radius) and the circle center coordinates, and Correlate the size of and the center coordinates of the circle. The radius of the circle and the center coordinates of the circle are derived by performing a Hough transform on the equiluminance image, as in the “luminance value embodiment”. Next, the fluctuation amount calculation means 64 calculates the fluctuation amount of the circle center coordinate with respect to the size of the circle. Specifically, the circle center coordinates of the radius of the target circle for calculating the amount of variation (hereinafter referred to as “the radius of the target circle”) and the “radius of the target circle” are adjacent (in the size of the radius). The distance (first distance and second distance) between each of the circle center coordinates of the radii of two adjacent circles is calculated, and the sum of the first distance and the second distance is calculated as “the radius of the target circle”. It is calculated as the amount of change in the circle center coordinates. That is, the calculation method of the fluctuation amount is the same as the equation (Equation 1) in the above “brightness value embodiment”.

そして、光軸中心決定手段66は、円中心座標のうち円中心座標の変動量が閾値T1以下である円の半径(円の大きさ)における円中心座標から光軸中心座標を決定する。なお、「輝度値の実施形態」では、図5に示したグラフは横軸が注目輝度値となっていたが、「円の大きさの実施形態」では、図5に示すグラフは、横軸が円の半径となる。そして、図5に示すグラフは、算出した円の半径ごとの変動量ΔCnがプロットされることになる。また、輝度値が高くなる程、円の大きさは小さくなる傾向がある為、「輝度値の実施形態」における図5に対応させたグラフとする場合には、グラフの横軸の左から右に向かって、円の半径が小さくなるように目盛を配置する。 Then, the optical axis center determining means 66 determines the optical axis center coordinates from the circle center coordinates at the radius (circle size) of the circle whose fluctuation amount of the circle center coordinates is not more than the threshold value T 1 among the circle center coordinates. In the “luminance value embodiment”, the horizontal axis of the graph shown in FIG. 5 is the target luminance value, but in the “circle size embodiment”, the graph shown in FIG. Is the radius of the circle. In the graph shown in FIG. 5, the calculated variation ΔC n for each radius of the circle is plotted. Further, since the size of the circle tends to decrease as the luminance value increases, when the graph corresponding to FIG. 5 in the “luminance value embodiment” is used, the graph is plotted from left to right on the horizontal axis of the graph. The scale is arranged so that the radius of the circle becomes smaller toward.

光軸中心決定手段66は、「輝度値の実施形態」と同様に、円中心座標のうち円中心座標の変動量が閾値T1以下である円の大きさにおける円中心座標から光軸中心座標を決定する。また、光軸中心決定手段66は、「輝度値の実施形態」と同様に、変動量が閾値T1以下である円中心座標のうち、所定の円の大きさの幅における円中心座標から光軸中心座標を決定する。具体的には、円中心座標の変動量が閾値T1以下である円の半径であって、円の半径が閾値T2[個(回)]以上連続している領域の円中心座標を抽出し、この抽出した円中心座標から光軸中心座標を決定する。例えば、光軸中心決定手段66は、閾値T2=3として、円の半径が3個以上連続している連続区間における円の半径の円中心座標を抽出し、この抽出した円中心座標から光軸中心座標を決定する。また、光軸中心決定手段66は、「輝度値の実施形態」と同様に、変動量が閾値T1以下である円中心座標のうち、より小さい円の円中心座標を優先して用いて光軸中心座標を決定する。すなわち、「円の大きさの実施形態」において、図5のように、抽出された連続区間が2つある(区間303と区間304)場合には、円の半径が最小の連続区間が選択され(図5において、グラフの横軸の左から右に向かって円の半径が小さくなるように目盛が配置されている場合には、区間304が選択され)、選択された連続区間の円の半径の円中心座標を用いて光学中心座標を決定する。詳細には、選択された連続区間の円の半径の円中心座標の平均値を光軸中心座標と決定する。このように、光軸中心決定手段66は、変動量が閾値T1以下である円中心座標のうち、円の大きさが最小の円から算出した円中心座標を含む区間から光軸中心座標を決定する。 Similarly to the “luminance value embodiment”, the optical axis center determining means 66 calculates the optical axis center coordinates from the circle center coordinates in the size of the circle whose fluctuation amount of the circle center coordinates is equal to or less than the threshold T 1 among the circle center coordinates. To decide. Further, as in the “luminance value embodiment”, the optical axis center determining means 66 outputs the light from the circle center coordinates in a predetermined circle size width among the circle center coordinates whose fluctuation amount is equal to or less than the threshold value T 1. Determine the axis center coordinates. Specifically, the circle center coordinates of the area where the variation amount of the circle center coordinates is equal to or less than the threshold value T 1 and the circle radius is continuous for the threshold value T 2 [number of times] or more are extracted. Then, the optical axis center coordinates are determined from the extracted circle center coordinates. For example, the optical axis center determining means 66 sets the threshold T 2 = 3, extracts the circle center coordinates of the circle radius in a continuous section in which three or more circle radii are continuous, and extracts light from the extracted circle center coordinates. Determine the axis center coordinates. Similarly to the “luminance value embodiment”, the optical axis center determining unit 66 preferentially uses the circle center coordinates of a smaller circle among the circle center coordinates whose variation amount is equal to or less than the threshold value T 1. Determine the axis center coordinates. That is, in the “circle size embodiment”, when there are two extracted continuous sections (section 303 and section 304) as shown in FIG. 5, the continuous section having the smallest circle radius is selected. (In FIG. 5, when the scale is arranged so that the radius of the circle decreases from left to right on the horizontal axis of the graph, the section 304 is selected), and the radius of the circle of the selected continuous section The optical center coordinates are determined using the circle center coordinates. Specifically, the average value of the circle center coordinates of the radius of the circle of the selected continuous section is determined as the optical axis center coordinates. As described above, the optical axis center determining unit 66 calculates the optical axis center coordinates from the section including the circle center coordinates calculated from the circle having the smallest circle size among the circle center coordinates having the fluctuation amount equal to or less than the threshold T 1. decide.

以上説明した「円の大きさの実施形態」のカメラ校正装置10においても、撮像素子の中心と光軸中心のアライメントずれ、ケラレの像のボケ、または鏡筒のアライメントずれがあっても、撮像した画像における光軸中心座標を正確に算出することができる。   Even in the camera calibration device 10 of the “circle size embodiment” described above, even if there is a misalignment between the center of the image sensor and the center of the optical axis, a blur of the vignetting image, or a misalignment of the lens barrel, the image is taken. The optical axis center coordinates in the obtained image can be accurately calculated.

なお、以上説明した「円の大きさの実施形態」のカメラ校正装置10では、円中心座標の変動量が閾値T1以下である円の大きさの円中心座標から、さらに、閾値T2等を用いて、光軸中心座標の算出に用いる円中心座標を選んだ。しかし、その選ぶ処理を省略して、円中心座標の変動量が閾値T1以下である円の大きさの円中心座標から光軸中心座標を算出してもよい。この場合であっても、少なくとも、レンズ中心付近の画像領域から検出された不安定な円の円中心座標を確実に排除して、光軸中心座標を算出することができる。 In the camera calibration device 10 of the “circle size embodiment” described above, the threshold T 2 and the like are further calculated from the circle center coordinates of the circle size in which the variation amount of the circle center coordinates is equal to or less than the threshold T 1. Was used to select the circle center coordinates used to calculate the optical axis center coordinates. However, the selection process may be omitted, and the optical axis center coordinates may be calculated from the circle center coordinates of the size of the circle whose fluctuation amount of the circle center coordinates is equal to or less than the threshold T 1 . Even in this case, at least the center coordinate of the unstable circle detected from the image area near the center of the lens can be reliably excluded and the optical axis center coordinate can be calculated.

以上説明した実施形態では、照明部12は積分球30を利用したものであったが、均一発光面照明等を用いて、カメラ14に略均一な入射光を撮像させてもよい。以上の実施形態ではカメラ14は監視カメラであったが、カメラ14はスチルカメラ、ビデオカメラ等であってもよい。また、以上の実施形態ではレンズ36は魚眼レンズであったが、レンズ36は広角レンズや望遠レンズであってもよい。また、以上の実施形態では撮像画像はカラー画像であったが、撮像画像はモノクロ画像であってもよい。   In the embodiment described above, the illumination unit 12 uses the integrating sphere 30. However, the camera 14 may be caused to image substantially uniform incident light using uniform light emitting surface illumination or the like. In the above embodiment, the camera 14 is a surveillance camera, but the camera 14 may be a still camera, a video camera, or the like. In the above embodiment, the lens 36 is a fish-eye lens, but the lens 36 may be a wide-angle lens or a telephoto lens. In the above embodiment, the captured image is a color image, but the captured image may be a monochrome image.

また、以上説明した実施形態では、等輝度画像生成手段60は、カラー画像をモノクロ化してその濃淡値を用いたが、カラー画像のR成分、G成分またはB成分等の成分値を用いてもよい。ただし、光源に含まれる成分を用いる必要がある。   In the embodiment described above, the isoluminance image generation means 60 uses a gray value obtained by making a color image monochrome and uses a component value such as an R component, a G component, or a B component of the color image. Good. However, it is necessary to use components contained in the light source.

また、以上説明した実施形態では、円中心算出手段62は、ハフ変換を用いて円中心座標を算出したが、最小二乗法によって円中心座標を算出してもよい。等輝度画像において、最小二乗法により、注目輝度値を有する画素群の座標を近似する円の方程式を導出する。また、円中心算出手段62は、パターンマッチングによって円中心座標を算出してもよい。画像中心付近に複数の円中心候補を設定すると共に、各円中心候補に対して複数の半径候補を設定する。そして、円中心候補と半径候補の組み合わせごとに、円中心候補を中心とし、半径候補を半径とする円パターン画像を生成する。そして、円パターン画像と等輝度画像のそれぞれの一致度を算出し、最も一致度の高い組み合わせにおける円中心候補を、その等輝度画像の円中心座標として出力することができる。   In the embodiment described above, the circle center calculating unit 62 calculates the circle center coordinates using the Hough transform, but the circle center coordinates may be calculated by a least square method. In the equiluminance image, a circle equation that approximates the coordinates of the pixel group having the target luminance value is derived by the least square method. Further, the circle center calculating means 62 may calculate the circle center coordinates by pattern matching. A plurality of circle center candidates are set near the center of the image, and a plurality of radius candidates are set for each circle center candidate. Then, for each combination of the circle center candidate and the radius candidate, a circle pattern image having the circle center candidate as the center and the radius candidate as the radius is generated. Then, the degree of coincidence between the circle pattern image and the equiluminance image can be calculated, and the circle center candidate in the combination having the highest degree of coincidence can be output as the circle center coordinates of the equiluminance image.

また、以上説明した実施形態では、変動量算出手段64が、注目輝度値または円の大きさが連続する3つの円中心座標を用いて第1距離と第2距離とを求め、第1距離と第2距離との和を変動量として算出した。しかし、3つに限らず、4つ、5つ等その他の数の円中心座標を用いて、距離の総和を求め、その総和した値を変動量としてもよい。或いは、注目輝度値の間隔を広くした場合等においては、注目輝度値または円の大きさが連続する2つの円中心座標の距離を変動量としてもよい。   In the embodiment described above, the fluctuation amount calculating unit 64 obtains the first distance and the second distance using three circle center coordinates in which the target luminance value or the circle size is continuous, and the first distance and The sum with the second distance was calculated as the fluctuation amount. However, the total sum of distances is not limited to three but may be obtained by using other numbers of circle center coordinates such as four, five, etc., and the summed value may be used as the fluctuation amount. Alternatively, when the interval between the target luminance values is widened, the distance between two circle center coordinates where the target luminance value or the circle size is continuous may be used as the variation amount.

また、変動量算出手段64は、円中心座標の変動量として、円中心座標の距離に代えて、円中心座標の分散を算出してもよい。この場合、変動量算出手段64は、注目輝度値または円の大きさの範囲に複数の区間を設定して、各区間に含まれる注目輝度値または円の大きさの円中心座標の分散を算出する。この際、区間はオーバーラップさせてもよい。   Further, the fluctuation amount calculation means 64 may calculate the variance of the circle center coordinates instead of the distance of the circle center coordinates as the fluctuation amount of the circle center coordinates. In this case, the fluctuation amount calculation unit 64 sets a plurality of sections in the range of the target luminance value or the circle size, and calculates the variance of the center coordinates of the target luminance value or the circle size included in each section. To do. At this time, the sections may be overlapped.

また、以上説明した「円の大きさの実施形態」では、変動量算出手段64は、円の大きさを表す尺度として半径を用いたが、半径に代えて直径、円周長、注目輝度値を有する画素数(円周長に準ずる値)、面積、または注目輝度値を有する画素に囲まれた領域の画素数(面積に準ずる値)等を用いてもよい。   Further, in the “circle size embodiment” described above, the fluctuation amount calculation means 64 uses the radius as a scale representing the size of the circle, but instead of the radius, the diameter, the circumferential length, and the luminance value of interest. The number of pixels having a value (value corresponding to the circumferential length), the area, or the number of pixels in a region surrounded by pixels having the target luminance value (value corresponding to the area) may be used.

また、カメラ校正装置10は、画像監視装置に組み込まれていてもよい。その場合、画像処理部18および記憶部20を、画像監視装置と共用にしてもよい。光軸中心決定手段66は、決定した光軸中心座標を記憶部20に記憶させ、画像監視装置は、記憶部20にある光軸中心座標を用いることができる。   Further, the camera calibration device 10 may be incorporated in the image monitoring device. In that case, the image processing unit 18 and the storage unit 20 may be shared with the image monitoring apparatus. The optical axis center determining unit 66 stores the determined optical axis center coordinates in the storage unit 20, and the image monitoring apparatus can use the optical axis center coordinates in the storage unit 20.

また、以上説明した「輝度値の実施形態」では、光軸中心決定手段66は、輝度値が最大の円中心座標を含む区間を選択した(図7のS122)。また、「円の大きさの実施形態」では、光軸中心決定手段66は、円の大きさが最小の円中心座標を含む区間を選択した。しかし、これに限らず割合や個数に基づいて選択することもできる。その場合、例えば、光軸中心決定手段66は、連続した閾値T2個以上の注目輝度値について、変動量が閾値T1以下である区間が複数抽出された場合に、注目輝度値が大きいものから順に所定割合(例えば50%など)の個数の円中心座標を選択する、或いは、所定割合を超えない範囲で規定個数(例えば10個)を選択してもよい。また、輝度値に代えて円の大きさを用いる場合も同様にして、例えば、光軸中心決定手段66は、連続した閾値T2個以上の円の大きさについて変動量が閾値T1以下である区間が複数抽出された場合に、円の大きさが小さいものから順に所定割合の個数の円中心座標を選択する、或いは所定割合を超えない範囲で規定個数を選択してもよい。 Further, in the “brightness value embodiment” described above, the optical axis center determining unit 66 selects the section including the circle center coordinate having the maximum luminance value (S122 in FIG. 7). In the “circle size embodiment”, the optical axis center determining unit 66 selects a section including the circle center coordinates having the smallest circle size. However, the present invention is not limited to this, and the selection can also be made based on the ratio or the number. In this case, for example, the optical axis center determining unit 66 has a large target luminance value when a plurality of sections whose fluctuation amount is equal to or smaller than the threshold T 1 are extracted for the continuous luminance value of the threshold value T 2 or more. Alternatively, a predetermined number (for example, 50%) of the circle center coordinates may be selected in order, or a prescribed number (for example, 10) may be selected within a range not exceeding the predetermined ratio. Similarly, when the size of a circle is used in place of the luminance value, for example, the optical axis center determining unit 66 has a variation amount equal to or less than the threshold T 1 for the size of two or more consecutive threshold T 2 circles. When a plurality of certain sections are extracted, a predetermined number of circle center coordinates may be selected in order from the smallest circle size, or a prescribed number may be selected within a range not exceeding the predetermined ratio.

また、以上説明した実施形態では、光軸中心決定手段66は、選択した円中心座標の平均値を光軸中心座標とした。しかし、これに限らず他の代表値を光軸中心座標とすることができる。例えば、光軸中心決定手段66は、選択した円中心座標の中央値を光軸中心座標としてもよい。或いは、選択した円中心座標の数が所定個数以上であり多い場合は、光軸中心決定手段66は、最頻値の円中心座標を光軸中心座標としてもよい。   In the embodiment described above, the optical axis center determining unit 66 sets the average value of the selected circle center coordinates as the optical axis center coordinates. However, the present invention is not limited thereto, and other representative values can be used as the optical axis center coordinates. For example, the optical axis center determining means 66 may use the median value of the selected circle center coordinates as the optical axis center coordinates. Alternatively, when the number of selected circle center coordinates is greater than or equal to a predetermined number, the optical axis center determination unit 66 may use the mode circle center coordinates as the optical axis center coordinates.

1 カメラ校正システム、10 カメラ校正装置、12 照明部、14 カメラ、16 通信部、18 画像処理部、20 記憶部、22 出力部、30 積分球、32 光源、34 鏡筒、36 レンズ、38 撮像素子、40 A/D変換器、42 信号処理部、50 画像取得手段、52 校正情報出力手段、60 等輝度画像生成手段(等輝度画素抽出手段)、62 円中心算出手段(重心算出手段)、64 変動量算出手段、66 光軸中心決定手段。   DESCRIPTION OF SYMBOLS 1 Camera calibration system 10 Camera calibration apparatus 12 Illumination part 14 Camera 16 Communication part 18 Image processing part 20 Storage part 22 Output part 30 Integrating sphere 32 Light source 34 Lens barrel 36 Lens 38 Element, 40 A / D converter, 42 signal processing unit, 50 image acquisition means, 52 calibration information output means, 60 isoluminance image generation means (isoluminance pixel extraction means), 62 circle center calculation means (centroid calculation means), 64 Fluctuation amount calculating means, 66 Optical axis center determining means.

Claims (6)

カメラにより撮像した画像における当該カメラの光軸中心座標を算出するカメラ校正装置であって、
前記カメラにより略均一な入射光を撮像した撮像画像を取得する画像取得手段と、
前記撮像画像に含まれる複数の注目輝度値ごとに、前記撮像画像から前記注目輝度値を有する画素を抽出する等輝度画素抽出手段と、
前記注目輝度値ごとに、前記等輝度画素抽出手段が抽出した画素の重心座標を算出する重心算出手段と、
前記注目輝度値に対する前記重心座標の変動量を算出する変動量算出手段と、
前記重心座標のうち前記変動量が所定値以下である重心座標から前記光軸中心座標を決定する光軸中心決定手段と、を備える、
ことを特徴とするカメラ校正装置。
A camera calibration device that calculates the optical axis center coordinates of the camera in an image captured by the camera,
Image acquisition means for acquiring a captured image obtained by imaging substantially uniform incident light by the camera;
Isoluminance pixel extraction means for extracting a pixel having the target luminance value from the captured image for each of a plurality of target luminance values included in the captured image;
Centroid calculating means for calculating centroid coordinates of the pixels extracted by the isoluminance pixel extracting means for each of the target luminance values;
A fluctuation amount calculating means for calculating a fluctuation amount of the barycentric coordinates with respect to the target luminance value;
Optical axis center determining means for determining the optical axis center coordinates from the center of gravity coordinates in which the variation amount is not more than a predetermined value among the center of gravity coordinates,
A camera calibration device characterized by that.
請求項1に記載のカメラ校正装置であって、
前記重心算出手段は、前記注目輝度値ごとに、前記等輝度画素抽出手段が抽出した画素の位置を円で近似し、当該円の円中心座標を前記重心座標として算出する円中心算出手段である、
ことを特徴とするカメラ校正装置。
The camera calibration device according to claim 1,
The center-of-gravity calculation unit is a circle center calculation unit that approximates the position of the pixel extracted by the equi-brightness pixel extraction unit for each target luminance value with a circle and calculates the circle center coordinate of the circle as the center-of-gravity coordinate. ,
A camera calibration device characterized by that.
請求項1または2に記載のカメラ校正装置であって、
前記光軸中心決定手段は、前記注目輝度値に対する前記変動量が所定値以下である重心座標のうち、注目輝度値が所定の輝度値の幅にある重心座標から前記光軸中心座標を決定する、
ことを特徴とするカメラ校正装置。
The camera calibration device according to claim 1 or 2,
The optical axis center determining means determines the optical axis center coordinate from the centroid coordinates where the amount of variation with respect to the target luminance value is equal to or less than a predetermined value, and the target luminance value is within a predetermined luminance value width. ,
A camera calibration device characterized by that.
請求項1から3のいずれか一項に記載のカメラ校正装置であって、
前記光軸中心決定手段は、前記注目輝度値に対する前記変動量が所定値以下である重心座標のうち、より大きい注目輝度値の重心座標を優先して用いて前記光軸中心座標を決定する、
ことを特徴とするカメラ校正装置。
The camera calibration device according to any one of claims 1 to 3,
The optical axis center determining means determines the optical axis center coordinates by using the center of gravity coordinates of a larger target luminance value preferentially among the center of gravity coordinates in which the variation amount with respect to the target luminance value is a predetermined value or less;
A camera calibration device characterized by that.
カメラにより撮像した画像における当該カメラの光軸中心座標を算出するカメラ校正装置であって、
前記カメラにより略均一な入射光を撮像した撮像画像を取得する画像取得手段と、
前記撮像画像に含まれる複数の注目輝度値ごとに、前記撮像画像から前記注目輝度値を有する画素を抽出する等輝度画素抽出手段と、
前記注目輝度値ごとに前記等輝度画素抽出手段が抽出した画素の位置を円近似して当該円の大きさと円中心座標とを算出する円中心算出手段と、
前記円の大きさに対する前記円中心座標の変動量を算出する変動量算出手段と、
前記円中心座標のうち前記変動量が所定値以下である円の大きさにおける円中心座標から前記光軸中心座標を決定する光軸中心決定手段と、を備える、
ことを特徴とするカメラ校正装置。
A camera calibration device that calculates the optical axis center coordinates of the camera in an image captured by the camera,
Image acquisition means for acquiring a captured image obtained by imaging substantially uniform incident light by the camera;
Isoluminance pixel extraction means for extracting a pixel having the target luminance value from the captured image for each of a plurality of target luminance values included in the captured image;
A circle center calculating means for calculating the size of the circle and the circle center coordinates by approximating the position of the pixel extracted by the isoluminance pixel extracting means for each of the target luminance values as a circle;
A fluctuation amount calculating means for calculating a fluctuation amount of the circle center coordinates with respect to the size of the circle;
Optical axis center determining means for determining the optical axis center coordinates from the circle center coordinates in the size of the circle having the variation amount equal to or less than a predetermined value among the circle center coordinates,
A camera calibration device characterized by that.
請求項1から5のいずれか一項に記載のカメラ校正装置であって、
前記光軸中心決定手段は、前記変動量が所定値以下である注目輝度値における重心座標、又は、前記変動量が所定値以下である円の大きさにおける円中心座標の平均値を前記光軸中心座標に決定する、
ことを特徴とするカメラ校正装置。
The camera calibration device according to any one of claims 1 to 5,
The optical axis center determining means calculates the center of gravity coordinates of the target luminance value where the fluctuation amount is a predetermined value or less, or the average value of the circle center coordinates in the size of the circle where the fluctuation amount is the predetermined value or less. Determine the center coordinates,
A camera calibration device characterized by that.
JP2017063790A 2017-03-28 2017-03-28 Camera calibration device Active JP6482589B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017063790A JP6482589B2 (en) 2017-03-28 2017-03-28 Camera calibration device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017063790A JP6482589B2 (en) 2017-03-28 2017-03-28 Camera calibration device

Publications (2)

Publication Number Publication Date
JP2018166308A JP2018166308A (en) 2018-10-25
JP6482589B2 true JP6482589B2 (en) 2019-03-13

Family

ID=63923030

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017063790A Active JP6482589B2 (en) 2017-03-28 2017-03-28 Camera calibration device

Country Status (1)

Country Link
JP (1) JP6482589B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111182289B (en) * 2019-12-31 2022-09-09 苏州精速智能科技有限公司 Lens cone notch searching method
CN112965261B (en) * 2021-02-23 2022-10-28 山东仕达思生物产业有限公司 Method for quickly and effectively intelligently correcting microscope optical axis based on machine vision and implementation system thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007171455A (en) * 2005-12-21 2007-07-05 Olympus Corp Imaging apparatus
JP2007315982A (en) * 2006-05-29 2007-12-06 Hioki Ee Corp Measuring device and inspecting device
JP4682181B2 (en) * 2007-11-19 2011-05-11 シャープ株式会社 Imaging apparatus and electronic information device
KR101961479B1 (en) * 2012-09-13 2019-07-17 엘지이노텍 주식회사 Apparatus and method for measuring optical center in camera module
JP2014096736A (en) * 2012-11-09 2014-05-22 Sharp Corp Process and apparatus of manufacturing lens integrated imaging apparatus

Also Published As

Publication number Publication date
JP2018166308A (en) 2018-10-25

Similar Documents

Publication Publication Date Title
JP6866365B2 (en) Depth mapping with a head-mounted display using a stereo camera and structured light
WO2020059565A1 (en) Depth acquisition device, depth acquisition method and program
KR20070045126A (en) Methods and devices for image signal processing
JP2009187135A (en) Vehicle periphery monitoring device, vehicle, program for monitoring vehicle periphery, and vehicle periphery monitoring method
JP2003244521A (en) Information processing method and apparatus, and recording medium
JP2015127668A (en) Measurement device, system and program
JP2017032335A (en) Information processing device, information processing method, and program
JP6556013B2 (en) PROCESSING DEVICE, PROCESSING SYSTEM, IMAGING DEVICE, PROCESSING METHOD, PROGRAM, AND RECORDING MEDIUM
JP4389602B2 (en) Object detection apparatus, object detection method, and program
JP2013542528A (en) Night scene image blur detection system
CN108632604B (en) Method and device for detecting optical center of lens
JP6482589B2 (en) Camera calibration device
JP6452361B2 (en) Information processing apparatus, information processing method, and program
JP6585668B2 (en) Object detection device
US10783646B2 (en) Method for detecting motion in a video sequence
JP2009017158A (en) Camera inspection device
JP3888528B2 (en) Liquid level recognition processing apparatus and liquid level monitoring system
US11530993B2 (en) Deposit detection device and deposit detection method
KR20150009842A (en) System for testing camera module centering and method for testing camera module centering using the same
KR102195072B1 (en) Thermal camera system and driving method thereof
JP2008058279A (en) Apparatus and method for forming range image, and program
Désaulniers et al. Performance evaluation of panoramic electro-optic imagers using the TOD method
JP6561479B2 (en) Imaging device capable of color shading correction
JP6332703B2 (en) Space recognition device
JP7039221B2 (en) Control method of image processing device, image pickup device and image processing device

Legal Events

Date Code Title Description
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: 20190129

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190212

R150 Certificate of patent or registration of utility model

Ref document number: 6482589

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250