JP2003255217A - Focusing method and focusing device - Google Patents

Focusing method and focusing device

Info

Publication number
JP2003255217A
JP2003255217A JP2002056003A JP2002056003A JP2003255217A JP 2003255217 A JP2003255217 A JP 2003255217A JP 2002056003 A JP2002056003 A JP 2002056003A JP 2002056003 A JP2002056003 A JP 2002056003A JP 2003255217 A JP2003255217 A JP 2003255217A
Authority
JP
Japan
Prior art keywords
focus
lens
image pickup
image
optical axis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002056003A
Other languages
Japanese (ja)
Inventor
Koichi Ikuta
剛一 生田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2002056003A priority Critical patent/JP2003255217A/en
Publication of JP2003255217A publication Critical patent/JP2003255217A/en
Pending legal-status Critical Current

Links

Landscapes

  • Automatic Focus Adjustment (AREA)
  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)
  • Focusing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a focusing method and a focusing device, which easily detect the present focus state of an image pickup device and use the detection result to perform focusing with a high precision. <P>SOLUTION: The focusing device 10 comprises a focus state detection part 14 for detecting the focus state of an image pickup device 12 and a lens moving part 16 for utilizing the detection result of the focus state detection part 14 to move a lens of the image pickup device 12 in the direction of the optical axis. The focus state detection part 14 is provided with a focus index calculation means 18 which utilizes data of a picked-up image of the image pickup device 12 to calculate a focus index value representative of the focus state, a lens movement direction determination means 20 which utilizes the focus index value to determine the moving direction on the optical axis of the lens in the image pickup device 12, and a fine focus discrimination means 22 which performs processing of detecting a lens defect and discriminates that the image pickup device 12 is in the fine focus state when not detecting a lens defect. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、固定フォーカス型
の撮像モジュールを搭載した撮像装置のフォーカス調整
方法および装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a focus adjusting method and apparatus for an image pickup apparatus equipped with a fixed focus type image pickup module.

【0002】[0002]

【従来の技術】従来、撮像装置のフォーカス状態を示す
指標(以下、「フォーカス指標」という。)として、撮
像画像のコントラストが使用されてきた。これは、フォ
ーカスが合っている状態で撮像された画像はコントラス
トが高いという事実を利用している。コントラストは、
撮像装置におけるレンズや撮像素子の特性、および、環
境光等の影響を受けやすく、絶対的なフォーカス状態を
検出するには不向きである。そこで、撮像装置のレンズ
を光軸方向に移動させながら、撮像画像のコントラスト
値を測定し、コントラスト値が最も大きくなるレンズの
位置をフォーカス位置として検出する方式を採ってい
る。
2. Description of the Related Art Conventionally, the contrast of a captured image has been used as an index (hereinafter, referred to as "focus index") indicating the focus state of an image pickup apparatus. This takes advantage of the fact that images taken in focus have high contrast. The contrast is
It is easily affected by the characteristics of a lens or an image sensor in an image pickup device, ambient light, etc., and is not suitable for detecting an absolute focus state. Therefore, while moving the lens of the imaging device in the optical axis direction, the contrast value of the captured image is measured, and the position of the lens having the largest contrast value is detected as the focus position.

【0003】上述の方法以外にも、例えば、特開200
1−108576号公報に開示される方法は、レンズが
固定された光学ステージを光軸方向に移動させながら、
撮像されるスポット像において一定輝度を越える画素数
をカウント(測定)し、その画素数が最大になるレンズ
の位置をフォーカス位置として検出する。
In addition to the method described above, for example, Japanese Unexamined Patent Publication No. 200
The method disclosed in Japanese Patent Laid-Open No. 1-108576, while moving the optical stage to which the lens is fixed in the optical axis direction,
The number of pixels that exceed a certain brightness in the imaged spot image is counted (measured), and the position of the lens at which the number of pixels is maximum is detected as the focus position.

【0004】[0004]

【発明が解決しようとする課題】これらの方法は、レン
ズの個体差によらずフォーカス位置を検出できる。しか
し、1回の測定によって絶対的なフォーカス状態を検出
できず、比較的多数の測定を必要とするので、効率が悪
いという問題があった。特に、測定中に、フォーカスを
合わせるために、レンズを光軸方向のどちら側に移動さ
せればよいかが判定できないという問題があった。従来
は、フォーカス調整を始める前に一旦、レンズを光軸方
向における一方の側に寄せておき、測定中は、その反対
側に一方向にレンズを移動させていた。しかし、その場
合には、フォーカス調整前に、レンズを光軸方向のどち
ら側に移動させて測定すればよいのか調べる必要があっ
た。
According to these methods, the focus position can be detected without depending on the individual difference of the lens. However, since the absolute focus state cannot be detected by one measurement, and a relatively large number of measurements are required, there is a problem of poor efficiency. In particular, there is a problem that it is not possible to determine which side of the optical axis the lens should be moved to adjust the focus during measurement. Conventionally, the lens is temporarily moved to one side in the optical axis direction before the focus adjustment is started, and the lens is moved to the opposite side in one direction during measurement. However, in that case, it was necessary to examine which side of the optical axis the lens should be moved to perform measurement before focus adjustment.

【0005】また、単に、現在撮像装置のフォーカスが
合っているかどうかを確かめる場合でさえ、複数のコン
トラスト値または画素数を測定しなければならないとい
った問題があった。さらに、一旦レンズが固定される
と、現在のフォーカス状態を知ることは困難であるとい
う問題があった。
Further, there is a problem that it is necessary to measure a plurality of contrast values or the number of pixels even when simply checking whether or not the image pickup apparatus is currently in focus. Furthermore, once the lens is fixed, it is difficult to know the current focus state.

【0006】加えて、コントラストを利用する方法で
は、不良レンズの存在等によって、実際にはフォーカス
が合っていなくても、画像のコントラスト値が最大にな
る場合がある。その場合には、レンズ不良等によって生
じる撮像装置のフォーカス不良を検出できないという問
題があった。
In addition, in the method utilizing the contrast, the contrast value of the image may be maximized due to the presence of a defective lens or the like, even if the image is not actually focused. In that case, there is a problem that a focus defect of the image pickup device caused by a lens defect or the like cannot be detected.

【0007】これらの問題を解決するフォーカス調整方
法として、例えば、人間の眼のように並べた2つのセン
サを用いて、1つの被写体を2つの地点から見たときの
画像を取得し、それらの画像の位相差を利用する方法
(以下、「位相差方式」という。)や、被写体に1つの
センサから赤外線を照射し、その反射光を別のセンサで
受信して、赤外線の入射角と反射角を取得し、それらを
利用する方法(以下、「赤外線方式」という。)があ
る。
As a focus adjusting method for solving these problems, for example, two sensors arranged like a human eye are used to obtain images when one subject is viewed from two points, and those images are obtained. A method that uses the phase difference of the image (hereinafter referred to as "phase difference method"), or an object is irradiated with infrared light from one sensor and the reflected light is received by another sensor, and the incident angle and reflection of the infrared light are reflected. There is a method of acquiring the corners and using them (hereinafter referred to as "infrared method").

【0008】しかし、位相差方式や赤外線方式は、別個
にセンサ等の設置が必要であるため、コストがかかると
いった問題があった。
However, the phase difference method and the infrared method have a problem that the cost is high because it is necessary to separately install a sensor and the like.

【0009】また、最近では、従来の方法より精度の高
いフォーカス調整方法が求められている。
Recently, there is a demand for a focus adjusting method which is more accurate than conventional methods.

【0010】従って、本発明の目的は、撮像装置の現在
のフォーカス状態を容易に検出でき、その検出結果を用
いて、フォーカス調整を精度良く行えるフォーカス調整
方法および装置を提供することである。
Therefore, an object of the present invention is to provide a focus adjusting method and device which can easily detect the current focus state of the image pickup apparatus and can perform the focus adjustment with high accuracy by using the detection result.

【0011】[0011]

【課題を解決するための手段】本発明に係るフォーカス
調整装置は、撮像素子と、その撮像素子に像を結ぶレン
ズと、光軸方向に移動可能なレンズ装着部とを備えるカ
ラー撮像装置のフォーカス調整装置である。そのフォー
カス調整装置は、前記の撮像装置によって撮像された白
黒テストパターンの複数の色成分画像を示す画像データ
を受け取るデータ受け取り手段と、前記の画像データを
利用して、あらかじめ決められた2つの色成分画像のヒ
ストグラムを求め、その各々のヒストグラムにおいて、
前記のテストパターンの白および黒に対応する2つのピ
ークの鮮鋭さを表わす指標(フォーカス指標)を計算す
る計算手段と、前記の2つの色成分画像のヒストグラム
によるフォーカス指標値を比較する比較手段と、前記の
2つのフォーカス指標値が異なるとき、その2つのフォ
ーカス指標値の大小関係を用いて、前記のレンズの光軸
上における移動方向を判定する判定手段とを備える。
A focus adjustment device according to the present invention is a focus device for a color image pickup device, which comprises an image pickup device, a lens for forming an image on the image pickup device, and a lens mounting portion movable in the optical axis direction. It is an adjusting device. The focus adjusting device uses a data receiving unit that receives image data showing a plurality of color component images of a black-and-white test pattern captured by the image capturing device, and two predetermined colors using the image data. Obtain the histogram of the component image, in each of the histogram,
Calculating means for calculating an index (focus index) representing sharpness of two peaks corresponding to white and black of the test pattern, and comparing means for comparing focus index values by the histograms of the two color component images. When the two focus index values are different, the determination means for determining the moving direction of the lens on the optical axis is used by using the magnitude relationship between the two focus index values.

【0012】前記のフォーカス調整装置において、好ま
しくは、前記の白黒テストパターンは、光軸に垂直な平
面上において、白地に複数の黒の縞が配列されるか、ま
たは、黒地に複数の白の縞が配列されたものであり、そ
れらの縞の間隔がそれぞれ異なる。
In the above focus adjusting device, preferably, the black and white test pattern is such that a plurality of black stripes are arranged on a white background or a plurality of white stripes are formed on a black background on a plane perpendicular to the optical axis. The stripes are arranged, and the intervals between the stripes are different.

【0013】前記のフォーカス調整装置において、好ま
しくは、前記の白黒テストパターンは、光軸に垂直な平
面上において、白地に複数の黒の縞が配列されるか、ま
たは、黒地に複数の白の縞が配列されたものであり、そ
れらの縞は、縞が並ぶ方向と縞の長手方向が垂直になら
ないように配列されたものである。
In the above focus adjustment device, preferably, the black-and-white test pattern has a plurality of black stripes arranged on a white background or a plurality of white stripes on a black background on a plane perpendicular to the optical axis. The stripes are arranged, and the stripes are arranged so that the direction in which the stripes are arranged and the longitudinal direction of the stripes are not perpendicular to each other.

【0014】好ましくは、前記のフォーカス調整装置
は、さらに、前記の判定手段の結果に基づき、前記の撮
像装置のレンズ装着部を光軸上で移動させるレンズ移動
手段を備える。
Preferably, the focus adjusting device further comprises a lens moving means for moving the lens mounting portion of the image pickup device on the optical axis based on the result of the judging means.

【0015】好ましくは、前記のフォーカス調整装置
は、さらに、前記の判定手段の結果を表示する表示手段
と、前記の撮像装置のレンズ装着部を光軸上で移動させ
るレンズ移動手段とを備える。
Preferably, the focus adjusting device further comprises display means for displaying the result of the determining means, and lens moving means for moving the lens mounting portion of the image pickup apparatus on the optical axis.

【0016】好ましくは、前記のフォーカス調整装置
は、さらに、前記の2つのフォーカス指標値が等しいと
き、そのフォーカス指標値と所定の基準値とを比較する
第2の比較手段を備える。
Preferably, the focus adjusting device further comprises second comparing means for comparing the focus index value with a predetermined reference value when the two focus index values are equal.

【0017】好ましくは、前記のフォーカス調整装置
は、さらに、前記の撮像装置の被写体として光軸上に白
黒テストパターンを設置する設置手段と、前記のテスト
パターンを照らす照明手段とを備える。
Preferably, the focus adjusting device further comprises an installation means for installing a black and white test pattern on the optical axis as an object of the image pickup device, and an illumination means for illuminating the test pattern.

【0018】好ましくは、前記の照明手段は、前記のテ
ストパターンを前方から照射する。
Preferably, the illumination means illuminates the test pattern from the front.

【0019】好ましくは、前記の照明手段は、前記のテ
ストパターンを後方から照射する透過光式照明である。
Preferably, the illumination means is a transmitted light type illumination which irradiates the test pattern from behind.

【0020】本発明に係るフォーカス調整方法は、撮像
素子と、その撮像素子に像を結ぶレンズと、光軸方向に
移動可能なレンズ装着部とを備えるカラー撮像装置にお
いて、フォーカスを調整する方法である。そのフォーカ
ス調整方法は、前記の撮像装置によって撮像された白黒
テストパターンの複数の色成分画像を示す画像データを
受け取るデータ受け取りステップと、前記の画像データ
を利用して、あらかじめ決められた2つの色成分画像の
ヒストグラムを求め、その各々のヒストグラムにおい
て、前記のテストパターンの白および黒に対応する2つ
のピークの鮮鋭さを表わす指標(フォーカス指標)を計
算する計算ステップと、前記の2つの色成分画像のヒス
トグラムによるフォーカス指標値を比較する比較ステッ
プと、前記の2つのフォーカス指標値が異なるとき、そ
の2つのフォーカス指標値の大小関係を用いて、前記の
レンズの光軸上における移動方向を判定する判定ステッ
プとから成る。
A focus adjusting method according to the present invention is a method for adjusting focus in a color image pickup apparatus comprising an image pickup device, a lens for forming an image on the image pickup device, and a lens mounting portion movable in the optical axis direction. is there. The focus adjusting method includes a data receiving step of receiving image data showing a plurality of color component images of a black-and-white test pattern imaged by the image pickup device, and two predetermined colors using the image data. Calculating steps for obtaining histograms of the component images, and calculating an index (focus index) representing the sharpness of the two peaks corresponding to the white and black of the test pattern in each of the histograms; When the comparison step of comparing the focus index values by the histogram of the image and the two focus index values are different, the magnitude direction of the two focus index values is used to determine the moving direction of the lens on the optical axis. And a determination step to perform.

【0021】好ましくは、前記のフォーカス調整方法
は、さらに、前記の判定ステップの結果に基づき、前記
の撮像装置のレンズ装着部を光軸上で移動させるレンズ
移動ステップを含む。
Preferably, the focus adjusting method further includes a lens moving step of moving the lens mounting portion of the image pickup apparatus on the optical axis based on the result of the determining step.

【0022】好ましくは、前記のフォーカス調整方法
は、さらに、前記の判定ステップの結果を表示する表示
ステップと、前記の撮像装置のレンズ装着部を光軸上で
移動させるレンズ移動ステップとを備える。
Preferably, the focus adjusting method further includes a display step of displaying the result of the determining step, and a lens moving step of moving the lens mounting portion of the image pickup apparatus on the optical axis.

【0023】好ましくは、前記のフォーカス調整方法
は、さらに、前記の2つのフォーカス指標値が等しいと
き、そのフォーカス指標値と所定の基準値とを比較する
第2の比較ステップを含む。
Preferably, the focus adjusting method further includes a second comparing step of comparing the focus index value with a predetermined reference value when the two focus index values are equal.

【0024】[0024]

【発明の実施の形態】以下に、添付の図面を参照して、
本発明の実施の形態について説明する。 実施の形態1.図1は、本実施の形態によるフォーカス
調整装置の構成を図式的に示すブロック図である。図1
において、フォーカス調整装置10は、撮像装置12の
フォーカスを調整する。フォーカス調整装置10は、撮
像装置12のフォーカス状態を検出するフォーカス状態
検出部14と、フォーカス状態検出部14の検出結果を
利用して、撮像装置12のレンズを光軸方向に移動させ
るレンズ移動部16とから成る。フォーカス状態検出部
14は、フォーカス指標計算手段18、レンズ移動方向
指示手段20およびファインフォーカス判定手段22を
備える。フォーカス指標計算手段18は、撮像装置12
によって撮像された画像のデータを利用して、フォーカ
ス指標を計算する。ここで、フォーカス指標は、撮像装
置のフォーカス状態を数値で表したものであり、その計
算方法は、後に詳細に説明される。レンズ移動方向判定
手段20は、計算されたフォーカス指標の値(フォーカ
ス指標値)を利用して、撮像装置12のレンズが、光軸
上において前後どちらに移動すればよいかを判定する。
ファインフォーカス判定手段22は、レンズ不良検出の
ために、計算されたフォーカス指標値と所定の値とを比
較し、フォーカス指標値がその所定の値以上であれば、
撮像装置12のフォーカスが合っている(ファインフォ
ーカス状態である)と判定する。
BEST MODE FOR CARRYING OUT THE INVENTION Referring to the accompanying drawings,
An embodiment of the present invention will be described. Embodiment 1. FIG. 1 is a block diagram schematically showing the configuration of the focus adjustment device according to the present embodiment. Figure 1
In, the focus adjustment device 10 adjusts the focus of the imaging device 12. The focus adjustment device 10 uses a focus state detection unit 14 that detects the focus state of the image pickup device 12, and a lens movement unit that moves the lens of the image pickup device 12 in the optical axis direction using the detection result of the focus state detection unit 14. 16 and. The focus state detection unit 14 includes a focus index calculation unit 18, a lens movement direction instruction unit 20, and a fine focus determination unit 22. The focus index calculation means 18 includes the image pickup device 12.
The focus index is calculated using the data of the image captured by. Here, the focus index is a numerical representation of the focus state of the imaging device, and its calculation method will be described in detail later. The lens movement direction determination means 20 uses the calculated focus index value (focus index value) to determine whether the lens of the imaging device 12 should move forward or backward on the optical axis.
The fine focus determination means 22 compares the calculated focus index value with a predetermined value to detect a lens defect, and if the focus index value is greater than or equal to the predetermined value,
It is determined that the imaging device 12 is in focus (in a fine focus state).

【0025】図2は、図1に示されたフォーカス調整装
置の一例を示す図式的な図である。図2において、撮像
素子32およびその撮像素子32に像を結ぶレンズ34
は、撮像装置の構成要素である。撮像装置の前面には、
光軸に垂直に回転円盤38が取り付けられる。その回転
円盤38の中心部には、レンズ34が装着されたレンズ
筒36がはめ込まれる。回転円盤38が回転すると、レ
ンズ筒36(レンズ34)は、回転円盤38に連動して
回転しながら、光軸上で前後に移動する。
FIG. 2 is a schematic diagram showing an example of the focus adjusting device shown in FIG. In FIG. 2, an image sensor 32 and a lens 34 that forms an image on the image sensor 32.
Are components of the imaging device. On the front of the imaging device,
A rotating disk 38 is attached perpendicular to the optical axis. A lens barrel 36 having a lens 34 mounted therein is fitted in the center of the rotating disk 38. When the rotating disc 38 rotates, the lens barrel 36 (lens 34) moves back and forth on the optical axis while rotating in conjunction with the rotating disc 38.

【0026】撮像装置の外部において、上述の光軸上に
は、レンズ34を挟んで撮像素子32に対向するように
白黒のテストパターン40が設置される。テストパター
ン40は、撮像装置の使用撮像距離に合わせて設置され
る。ここで、図3は、使用されるテストパターン40の
パターンを示す。このパターンは、白地に複数の黒の縦
縞が配列されたものである。この黒の縦縞は、それぞ
れ、異なる間隔で配列される。また、この黒の縦縞は、
垂直方向に対してわずかな角度だけ傾いている。
Outside the image pickup device, a black and white test pattern 40 is provided on the above-mentioned optical axis so as to face the image pickup device 32 with the lens 34 in between. The test pattern 40 is installed according to the imaging distance used by the imaging device. Here, FIG. 3 shows a pattern of the test pattern 40 used. This pattern has a plurality of black vertical stripes arranged on a white background. The black vertical stripes are arranged at different intervals. Also, this black vertical stripe is
It is tilted at a slight angle to the vertical.

【0027】また、回転円盤38のテストパターン40
側の円形表面に、テストパターン40を照らす照明装置
42が円形状に取り付けられる。さらに、回転円盤38
のその同じ表面に、筐体44が接続される。筐体44
は、照明装置42、テストパターン40およびレンズ3
4を覆って、外光を遮断する。回転円盤38の表面に
は、図4に示されるように、ベアリング溝300があ
る。回転円盤38と筐体44は、このベアリング溝30
0に筐体44の接続部をはめこむことによって接続され
る。これにより、回転円盤38が回転するとき、筐体4
4は連動しない。従って、筐体44を固定した場合であ
っても、筐体44を回転円盤38から取り外すことな
く、回転円盤38のみを回転させることができ、同時
に、中央にはめ込まれたレンズ筒301を回転させるこ
とができる。
A test pattern 40 for the rotating disk 38 is also provided.
A lighting device 42 for illuminating the test pattern 40 is circularly attached to the side circular surface. Furthermore, the rotating disk 38
A housing 44 is connected to the same surface of the. Case 44
Is the illumination device 42, the test pattern 40, and the lens 3
4 is covered to block external light. On the surface of the rotating disk 38, there is a bearing groove 300, as shown in FIG. The rotating disk 38 and the housing 44 are provided in the bearing groove 30.
It is connected by fitting the connection part of the housing 44 into 0. As a result, when the rotating disk 38 rotates, the housing 4
4 does not work. Therefore, even when the casing 44 is fixed, only the rotating disc 38 can be rotated without removing the casing 44 from the rotating disc 38, and at the same time, the lens barrel 301 fitted in the center is rotated. be able to.

【0028】さらに、回転円盤38の同じ表面、かつ、
筐体44の外部に、回転円盤38を回転させる歯車60
が取り付けられる。歯車60にはハンドル62が連結さ
れ、ハンドル62を回すと、それに連動して歯車60が
回転する。ハンドル62をまわす方向を変えると、歯車
60の回転方向も変わり、それに応じて、歯車60に接
触する回転円盤38の回転方向も変えることができる。
この構造により、ハンドル62をどちらに回すかによっ
て、レンズ筒36の光軸上の移動方向を変えることがで
きる。
Furthermore, the same surface of the rotating disk 38, and
A gear 60 for rotating the rotating disk 38 is provided outside the housing 44.
Is attached. A handle 62 is connected to the gear 60, and when the handle 62 is rotated, the gear 60 rotates in conjunction with it. When the direction in which the handle 62 is turned is changed, the rotation direction of the gear 60 is also changed, and accordingly, the rotation direction of the rotary disk 38 contacting the gear 60 can also be changed.
With this structure, the moving direction of the lens barrel 36 on the optical axis can be changed depending on which direction the handle 62 is turned.

【0029】また、撮像装置は、その内部に、撮像され
た画像のデータを記憶する画像メモリ、および、その画
像データを処理する処理装置を備える。計算機70は、
その画像データを利用して計算を行う。図5を参照する
と、計算機70の構成を図式的に示すブロック図が示さ
れる。計算機70は、撮像装置等の外部装置と画像デー
タの授受を行うインタフェース部700と、画像データ
を記憶するメモリ702と、画像データを処理する処理
装置(CPU:中央処理装置)704と、計算機70に
所定の処理を実行させるプログラムを記憶したROM
(読み取り専用メモリ)706とを備える。表示装置7
2は、計算機70の計算結果を表示する。ユーザは、入
力装置74を利用して計算機70に指示を与えることが
できる。例えば、計算機70は、パーソナルコンピュー
タ(PC)であってよく、入力装置74は、キーボード
であってよい。
Further, the image pickup device includes therein an image memory for storing the data of the picked-up image and a processing device for processing the image data. The computer 70
Calculation is performed using the image data. Referring to FIG. 5, a block diagram schematically showing the configuration of the computer 70 is shown. The computer 70 includes an interface unit 700 for exchanging image data with an external device such as an imaging device, a memory 702 for storing image data, a processing device (CPU: central processing unit) 704 for processing image data, and a computer 70. ROM that stores a program for executing predetermined processing
(Read-only memory) 706. Display device 7
2 displays the calculation result of the computer 70. The user can give instructions to the computer 70 using the input device 74. For example, the calculator 70 may be a personal computer (PC) and the input device 74 may be a keyboard.

【0030】以下に、図6を参照して、このフォーカス
調整装置の動作について詳細に説明する。図6は、計算
機70内部のCPU704の処理を示すフローチャート
である。まず、ユーザは、撮像装置により、テストパタ
ーン40の撮像を行う。筐体44の内部において、照明
装置42は、テストパターン40に光を照射する。筐体
44が外光を遮断するので、テストパターン40は、照
明装置42によって、一定の照度で照らされる。レンズ
34は、テストパターン40から反射された光を収束
し、撮像素子32に結像する。
The operation of this focus adjusting device will be described in detail below with reference to FIG. FIG. 6 is a flowchart showing the processing of the CPU 704 inside the computer 70. First, the user captures an image of the test pattern 40 with the imaging device. Inside the housing 44, the lighting device 42 irradiates the test pattern 40 with light. Since the housing 44 blocks outside light, the test pattern 40 is illuminated by the illumination device 42 with a constant illuminance. The lens 34 converges the light reflected from the test pattern 40 and forms an image on the image sensor 32.

【0031】撮像素子32がカラー入力用CCDの場
合、テストパターン40の像は、複数の色成分に分解さ
れて入力される。色成分の数は、CCDにおいて使用さ
れるカラーフィルタの数に等しい。本実施の形態による
フォーカス調整装置では、原色フィルタ(R、G、B)
CCDを用いて、テストパターン40の画像を、R成分
画像、G成分画像およびB成分画像の3つの画像に分解
する。撮像素子34から出力された画像データは、撮像
装置内のメモリに記憶される。
When the image pickup device 32 is a color input CCD, the image of the test pattern 40 is separated into a plurality of color components and input. The number of color components is equal to the number of color filters used in the CCD. In the focus adjustment device according to the present embodiment, the primary color filters (R, G, B)
The image of the test pattern 40 is decomposed into three images of an R component image, a G component image and a B component image using a CCD. The image data output from the image pickup device 34 is stored in the memory in the image pickup apparatus.

【0032】ユーザが、入力装置74により、計算機7
0に対して、撮像画像におけるフォーカス指標の計算を
指示すると、計算機70は、撮像装置内のメモリに記憶
されたR成分画像およびB成分画像の画像データを読み
込むことにより、その画像データを受け取る(ステップ
S2)。計算機70は、それらの画像データを用いて、
R成分画像およびB成分画像のフォーカス指標を計算す
る(ステップS4)。以下に、その方法について、図7
を参照しながら詳細に説明する。まず、計算機70は、
画像データを処理して、R成分画像およびB色成分画像
のヒストグラムを得る。ヒストグラムは、横軸および縦
軸が、それぞれ、明度および画素数を示すグラフであ
り、各々の明度に対して、画像におけるその明度をもっ
た画素数を示す。テストパターン40が白黒なので、そ
れぞれのヒストグラムは、その白および黒に対応する地
点に合計2つのピークを持つ。
The user uses the input device 74 to calculate the computer 7.
When 0 is instructed to calculate the focus index in the captured image, the computer 70 receives the image data by reading the image data of the R component image and the B component image stored in the memory in the imaging device ( Step S2). The computer 70 uses those image data,
The focus index of the R component image and the B component image is calculated (step S4). Below, the method is shown in FIG.
Will be described in detail with reference to. First, the computer 70
The image data is processed to obtain histograms of the R component image and the B color component image. In the histogram, the horizontal axis and the vertical axis are graphs showing the brightness and the number of pixels, respectively, and for each brightness, the number of pixels having that brightness in the image is shown. Since the test pattern 40 is black and white, each histogram has a total of two peaks at points corresponding to its white and black.

【0033】一般に、フォーカスが合っている場合、白
黒パターンを撮像すると、その撮像画像からは、2つの
鮮鋭なピークを持つヒストグラムが得られる(図7の
(1))。このヒストグラムを参照すると、ピーク間の
谷部分に対応する画素、つまり、白および黒の明度を持
たない中間調の明度を持つ画素はほとんどないことがわ
かる。しかし、フォーカスが合っていない場合、白黒パ
ターンを撮像すると、白と黒の境界がぼけて、撮像画像
における白および黒の明度を持つ画素が減り、中間調の
明度を持つ画素が増える。よって、その場合には、図7
の(2)に示されるようなヒストグラムが得られる。図
7の(1)と図7の(2)のヒストグラムを比較する
と、図7の(2)のヒストグラムでは、明らかに、2つ
のピークが中央(中間調領域)に寄って、その谷部分に
対応する画素数が増えている。また、明らかに、谷部分
の明度の範囲が狭くなり、谷部分の領域の長さが短くな
っている。故に、この谷部分の領域の長さを利用して、
フォーカス指標を求める。谷部分の領域の長さSは、以
下のように計算する。まず、ヒストグラムの2つのピー
ク地点を探索し、そのピーク地点の中間地点を求めて、
その地点の画素数を得る。次に、その中間地点を基点と
して、左(負)方向および右(正)方向に交互に(左方
向、右方向の順、または、右方向、左方向の順で)1メ
モリ(明度が1段階高くなる、または、低くなることを
示す単位)だけ進み、その各々の地点の画素数を、先程
の中間地点の画素数に加算する。次に、たった今画素数
を加算した各々の地点から、中間地点(すでに画素数が
加算された地点)に戻らないように、左方向または右方
向に交互に(左方向、右方向の順、または、右方向、左
方向の順で)1メモリだけ進み、その進んだ各々の地点
の画素数を、これまで得られた画素数に加算する。これ
を繰り返して、画素数の加算を行い、加算値が全画素数
の一定割合(例えば、50%)に達したときに、加算を
中止する。このようにして加算を行った領域の長さを、
谷部分の長さSとする(図7の(3))。
In general, when a black-and-white pattern is imaged when it is in focus, a histogram having two sharp peaks is obtained from the imaged image ((1) in FIG. 7). By referring to this histogram, it can be seen that there are almost no pixels corresponding to the valley portions between the peaks, that is, pixels having halftone brightness that does not have white and black brightness. However, when the black-and-white pattern is imaged when the image is out of focus, the boundary between white and black is blurred, the number of pixels having white and black lightness in the captured image is reduced, and the number of pixels having halftone lightness increases. Therefore, in that case, FIG.
A histogram as shown in (2) is obtained. Comparing the histograms of (1) of FIG. 7 and (2) of FIG. 7, in the histogram of (2) of FIG. 7, it is apparent that two peaks are closer to the center (halftone region) and are located in the valley portion. The number of corresponding pixels is increasing. Also, obviously, the range of lightness in the valley is narrowed and the length of the region in the valley is shortened. Therefore, using the length of this valley area,
Find the focus index. The length S of the valley area is calculated as follows. First, search for the two peak points in the histogram, find the middle point of the peak points,
Get the number of pixels at that point. Next, with the intermediate point as a base point, one memory (lightness is 1) is alternated in the left (negative) direction and the right (positive) direction (left direction, right direction, or right direction, left direction). The number of pixels at each point is added to the number of pixels at the intermediate point. Next, from each point where the number of pixels has just been added, not to return to the intermediate point (the point where the number of pixels has already been added), alternating leftward or rightward (leftward, rightward, or , Right direction, left direction), and the number of pixels at each of the advanced points is added to the number of pixels obtained so far. By repeating this, the number of pixels is added, and when the added value reaches a fixed ratio (for example, 50%) of the total number of pixels, the addition is stopped. The length of the area added in this way is
The length of the valley portion is S ((3) in FIG. 7).

【0034】さらに、計算機70は、計算された谷部分
の長さSを用いて、フォーカス指標値を計算する。具体
的には、計算機70は、計算された谷部分の長さSをヒ
ストグラムの全体のレンジ幅Lで割ることによって、フ
ォーカス指標値を得る。つまり、フォーカス指標値を、
ヒストグラムの全体のレンジ幅Lに対する谷部分の長さ
Sの割合とする。このように、谷部分の長さSをヒスト
グラムの全体のレンジ幅Lで割った値をフォーカス指標
値とすることにより、フォーカス指標値は、レンズや環
境光等の影響によるヒストグラムのレンジの変動に影響
されなくなる。
Further, the calculator 70 uses the calculated length S of the valley portion to calculate the focus index value. Specifically, the calculator 70 obtains the focus index value by dividing the calculated length S of the valley portion by the entire range width L of the histogram. That is, the focus index value is
The ratio of the length S of the valley portion to the entire range width L of the histogram is set. In this way, by setting the value obtained by dividing the length S of the valley portion by the entire range width L of the histogram as the focus index value, the focus index value changes in the range of the histogram due to the influence of the lens, ambient light, or the like. It will not be affected.

【0035】なお、ここでは、ヒストグラムにおける2
つのピーク間の長さを、画素数を用いて谷部分の長さを
計算することによって求めているが、例えば、ヒストグ
ラムにおいて2つのピーク位置を検出し、直接それらの
差(ピーク位置間の距離)を計算するなど他の任意の方
法でピーク間の長さを計算してもよい。その場合であっ
ても、得られた2つのピーク間の長さを、そのヒストグ
ラムの全体のレンジ幅で割ることにより、ヒストグラム
のレンジ変動の影響を受けないフォーカス指標値を得る
ことができる。
Here, 2 in the histogram is used.
The length between two peaks is obtained by calculating the length of the valley portion using the number of pixels. For example, two peak positions are detected in the histogram and the difference between them (the distance between the peak positions is directly detected. The peak-to-peak length may be calculated by any other method such as calculating). Even in that case, by dividing the obtained length between the two peaks by the entire range width of the histogram, it is possible to obtain the focus index value that is not affected by the range variation of the histogram.

【0036】次に、計算機70は、R成分画像のフォー
カス指標値とB成分画像のフォーカス指標値とを比較す
る(ステップS6)。そして、その比較結果を、表示装
置72に表示させる。通常、撮像装置のレンズを通過し
た光は、レンズによる色収差のために、一点に集光され
ない。つまり、光の波長(色)によって、焦点位置が異
なる。従って、R成分画像とB成分画像のフォーカス指
標値は、大抵、一致しない。図8は、各々の色成分画像
に対して、レンズと撮像素子との距離と、フォーカス指
標値との関係を示すグラフである。本実施の形態では、
R成分画像のフォーカス指標値およびB成分画像のフォ
ーカス指標値が一致する点をファインフォーカス点と
し、そのファインフォーカス点におけるレンズと撮像素
子との距離をファインフォーカス距離とする。もし、表
示装置72が、「2つのフォーカス指標値が一致しな
い」(「フォーカスが合っていない」)と表示するな
ら、ユーザは、入力装置74により、計算機70に対し
て、レンズ移動方向の判定を指示する。計算機70は、
図8のグラフの関係を利用して、レンズの移動方向を判
定する(ステップS8)。その場合、計算機70は、R
成分画像のフォーカス指標値とB成分画像のフォーカス
指標値の大小を比較する。図8のグラフの関係を利用す
れば、計算機70は、2つのフォーカス指標値の大小を
比較することにより、現在のレンズと撮像素子との距離
が、ファインフォーカス距離よりも大きいのか小さいの
かを判断できる。よって、計算機70は、撮像装置のレ
ンズ34を光軸方向のどちら側に移動させるべきか判定
できる。計算機70は、その判定結果を、表示装置72
に表示させる(ステップ10)。
Next, the computer 70 compares the focus index value of the R component image with the focus index value of the B component image (step S6). Then, the comparison result is displayed on the display device 72. Normally, the light that has passed through the lens of the image pickup device is not focused on one point due to the chromatic aberration of the lens. That is, the focal position differs depending on the wavelength (color) of light. Therefore, the focus index values of the R component image and the B component image generally do not match. FIG. 8 is a graph showing the relationship between the distance between the lens and the image sensor and the focus index value for each color component image. In this embodiment,
A point where the focus index value of the R component image and the focus index value of the B component image match is defined as a fine focus point, and the distance between the lens and the image sensor at the fine focus point is defined as the fine focus distance. If the display device 72 displays “two focus index values do not match” (“out of focus”), the user uses the input device 74 to determine the lens movement direction to the computer 70. Instruct. The computer 70
The moving direction of the lens is determined using the relationship in the graph of FIG. 8 (step S8). In that case, the computer 70
The focus index value of the component image and the focus index value of the B component image are compared. Using the relationship of the graph of FIG. 8, the computer 70 determines whether the current distance between the lens and the image sensor is larger or smaller than the fine focus distance by comparing the magnitudes of the two focus index values. it can. Therefore, the computer 70 can determine which side in the optical axis direction the lens 34 of the imaging device should be moved to. The computer 70 displays the determination result on the display device 72.
To be displayed (step 10).

【0037】ユーザは、表示装置72に表示されたレン
ズ移動方向を見て、ハンドル62をいずれか一方に回
し、レンズ34を移動させる。ユーザは、レンズ34を
移動させた後、再び、撮像装置によってテストパターン
40を撮像する。その後、計算機70は、再び、ステッ
プS2からステップS6までの処理を行う。
The user looks at the lens moving direction displayed on the display device 72 and turns the handle 62 to either one to move the lens 34. After moving the lens 34, the user captures the test pattern 40 again with the imaging device. After that, the computer 70 performs the processing from step S2 to step S6 again.

【0038】ステップS6において、計算機70が、R
成分画像のフォーカス指標値とB成分画像のフォーカス
指標値とを比較し、再び、2つのフォーカス指標値が異
なると判断するなら、ユーザの指示に従って、ステップ
S8およびステップS10の処理を行う。
In step S6, the computer 70 causes the R
If the focus index value of the component image and the focus index value of the B component image are compared and it is determined again that the two focus index values are different, the processes of steps S8 and S10 are performed according to the user's instruction.

【0039】ステップS6において、計算機70が、R
成分画像のフォーカス指標値とB成分画像のフォーカス
指標値が等しいと判断し、その結果を表示装置72に表
示させるなら、ユーザは、入力装置74により、計算機
70に対して、そのフォーカス指標値とあらかじめ決め
られた基準値とを比較するように(レンズ不良の検査を
行うように)指示できる。ユーザから指示を受けると、
計算機70は、そのフォーカス指標値とあらかじめ決め
られた基準値とを比較する(ステップS12)。フォー
カス指標値が、その基準値に等しい、または、その基準
値よりも大きいなら、計算機70は、撮像装置はファイ
ンフォーカス状態にあると判定し、その判定結果を表示
装置72に表示させる(ステップS14)。フォーカス
指標値が、その基準値よりも小さいなら、計算機70
は、撮像装置はレンズ不良によるフォーカス不良状態に
あると判定し、その結果を表示装置72に表示させる
(ステップS16)。
In step S6, the computer 70 makes the R
If it is determined that the focus index value of the component image is the same as the focus index value of the B component image and the result is displayed on the display device 72, the user uses the input device 74 to inform the calculator 70 of the focus index value. It can be instructed to compare with a predetermined reference value (to inspect for lens failure). When instructed by the user,
The calculator 70 compares the focus index value with a predetermined reference value (step S12). If the focus index value is equal to or larger than the reference value, the computer 70 determines that the imaging device is in the fine focus state and displays the determination result on the display device 72 (step S14). ). If the focus index value is smaller than the reference value, the calculator 70
Determines that the imaging device is in a poor focus state due to a defective lens, and displays the result on the display device 72 (step S16).

【0040】なお、本実施の形態によるフォーカス調整
方法においては、フォーカス指標の計算と比較、レンズ
移動方向の判定およびフォーカス指標値とあらかじめ決
められた基準値との比較(レンズ不良の検査)を、それ
ぞれ、ユーザが計算機70に対して指示しているが、撮
像が行われた後、ユーザが計算機70に対してフォーカ
ス状態の検出を指示するだけで、計算機70によって一
連の処理が続けてなされてもよい。
In the focus adjusting method according to the present embodiment, the calculation and comparison of the focus index, the determination of the lens moving direction, and the comparison of the focus index value with a predetermined reference value (lens defect inspection) are performed. In each case, the user gives an instruction to the computer 70, but after imaging is performed, the user only instructs the computer 70 to detect the focus state, and the computer 70 continuously performs a series of processes. Good.

【0041】また、本実施の形態によるフォーカス調整
装置においては、ハンドル62や歯車60を利用して、
手動で回転円盤38を回転させたが、代わりに、自動で
回転円盤38を回転させる回転機構を設けてもよい。
Further, in the focus adjusting device according to the present embodiment, the handle 62 and the gear 60 are used,
Although the rotary disc 38 is manually rotated, a rotary mechanism for automatically rotating the rotary disc 38 may be provided instead.

【0042】また、計算機70に連動し、かつ、自動で
回転円盤38を回転させる回転機構を用いることによ
り、撮像が行われた後、ユーザが計算機70に対してフ
ォーカス調整を指示するだけで、フォーカス指標の計
算、フォーカス指標値の比較、レンズ移動方向の判定、
レンズ移動およびレンズ不良の検査が、計算機70によ
って続けて処理されてもよい。その場合に、表示装置7
2は、各々の処理が終了する毎に、その結果を表示して
もよいし、しなくてもよい。この場合における計算機7
0内部のCPU704の処理を示すフローチャートを図
9に示す。図9において、ユーザが、撮像装置によって
テストパターン40の撮像を行った後、入力装置74に
より、計算機70に対して、撮像装置のフォーカス調整
を指示すると、計算機70は、まず、撮像装置内のメモ
リに記憶されたR成分画像およびB成分画像の画像デー
タを読み込むことにより、その画像データを受け取る。
(ステップS22)。そして、それらの画像データを用
いて、上述の方法により、R成分画像およびB成分画像
のフォーカス指標を計算する(ステップS24)。次
に、R成分画像のフォーカス指標値とB成分画像のフォ
ーカス指標値とを比較する(ステップS26)。R成分
画像のフォーカス指標値とB成分画像のフォーカス指標
値が異なると判断するなら、その後、上述の方法によ
り、レンズの移動方向を判定する(ステップS28)。
さらに、ステップS28で得られる判定結果に基づき、
回転機構に指示を与えて、レンズを移動させる(ステッ
プS30)。ステップS26において、R成分画像のフ
ォーカス指標値とB成分画像のフォーカス指標値が等し
いと判断するなら、そのフォーカス指標値とあらかじめ
決められた基準値とを比較する(ステップS32)。フ
ォーカス指標値が、その基準値に等しい、または、その
基準値よりも大きいなら、計算機70は、撮像装置はフ
ァインフォーカス状態にあると判定し、その判定結果を
表示装置72に表示させる(ステップS34)。フォー
カス指標値が、その基準値よりも小さいなら、計算機7
0は、撮像装置はレンズ不良によるフォーカス不良状態
にあると判定し、その結果を表示装置72に表示させる
(ステップS36)。
Further, by using the rotating mechanism which is interlocked with the computer 70 and automatically rotates the rotary disk 38, the user simply instructs the computer 70 to perform focus adjustment after the image is picked up. Focus index calculation, focus index value comparison, lens movement direction determination,
Inspection of lens movement and lens defects may be subsequently processed by the calculator 70. In that case, the display device 7
The item 2 may or may not display the result each time each process is completed. Calculator 7 in this case
FIG. 9 is a flowchart showing the processing of the CPU 704 inside 0. In FIG. 9, after the user captures an image of the test pattern 40 with the image capturing device, the input device 74 instructs the computer 70 to adjust the focus of the image capturing device. By reading the image data of the R component image and the B component image stored in the memory, the image data is received.
(Step S22). Then, using those image data, the focus index of the R component image and the B component image is calculated by the above method (step S24). Next, the focus index value of the R component image is compared with the focus index value of the B component image (step S26). If it is determined that the focus index value of the R component image and the focus index value of the B component image are different, then the moving direction of the lens is determined by the above method (step S28).
Furthermore, based on the determination result obtained in step S28,
An instruction is given to the rotating mechanism to move the lens (step S30). If it is determined in step S26 that the focus index value of the R component image and the focus index value of the B component image are equal, the focus index value is compared with a predetermined reference value (step S32). If the focus index value is equal to or larger than the reference value, the calculator 70 determines that the imaging device is in the fine focus state and displays the determination result on the display device 72 (step S34). ). If the focus index value is smaller than the reference value, the calculator 7
In 0, it is determined that the image pickup apparatus is in a poor focus state due to a defective lens, and the result is displayed on the display device 72 (step S36).

【0043】なお、レンズ不良の検査処理(ステップS
12、ステップS32)が必要でない場合には、この処
理を省くことができる。
It should be noted that the lens defect inspection process (step S
If step 12, step S32) is not required, this process can be omitted.

【0044】なお、表示装置72は、撮像装置によって
撮像された画像を表示することもできる。
The display device 72 can also display the image picked up by the image pickup device.

【0045】本実施の形態によるフォーカス調整装置
は、1回の撮像によって得られる2つの色成分画像のフ
ォーカス指標値を比較するだけで、撮像装置のフォーカ
スが合っているかどうかを検出できる。従って、現在の
撮像装置のフォーカス状態を容易に検出できる。また、
撮像装置のレンズが固定されていても、フォーカス状態
を容易に検出できる。
The focus adjusting apparatus according to the present embodiment can detect whether or not the image pickup apparatus is in focus only by comparing the focus index values of the two color component images obtained by one image pickup. Therefore, the current focus state of the image pickup apparatus can be easily detected. Also,
Even if the lens of the imaging device is fixed, the focus state can be easily detected.

【0046】本実施の形態によるフォーカス調整装置
は、2つの色成分画像のフォーカス指標値を比較するだ
けで、フォーカス調整のためのレンズの移動方向を判定
できる。従って、フォーカス調整前に、レンズを光軸方
向のどちら側に寄せておくべきか調べるといった面倒な
作業が不要となり、効率的なフォーカス調整を行える。
The focus adjusting apparatus according to the present embodiment can determine the moving direction of the lens for focus adjustment simply by comparing the focus index values of the two color component images. Therefore, it is not necessary to perform a troublesome work of checking which side of the optical axis the lens should be moved to before focus adjustment, and efficient focus adjustment can be performed.

【0047】また、本実施の形態によるフォーカス調整
装置は、2つの色成分画像のフォーカス指標値が一致す
るとき、フォーカスが合っていると判断する。これは、
コントラスト値等の絶対的な測定値を利用する方法と異
なり、レンズや撮像素子を交換して条件を変えても、フ
ァインフォーカス調整を行えるという利点がある。
Further, the focus adjusting apparatus according to the present embodiment determines that the two color component images are in focus when they match. this is,
Unlike the method of using the absolute measurement value such as the contrast value, there is an advantage that the fine focus adjustment can be performed even if the condition is changed by exchanging the lens or the image pickup element.

【0048】なお、本実施の形態によるフォーカス調整
装置において、2つの色成分画像のフォーカス指標値
は、それぞれ、各々の色成分画像のヒストグラムにおけ
る谷部分の長さを、そのヒストグラムの全体のレンジ幅
で割ることによって得られる。このようにして得られた
各々の色成分画像のフォーカス指標値は、レンズや環境
光等の条件の変化によってその色成分画像のヒストグラ
ムのレンジ(コントラスト)に変動があっても、ある程
度一定に保たれる。従って、各々の色成分画像のフォー
カス指標値は、単独でも、現在の撮像装置のフォーカス
状態を示すことができる。よって、撮像装置のフォーカ
ス状態が合っているかどうかの判定には、任意の1つの
色成分画像のフォーカス指標値を使用することもでき
る。
In the focus adjusting apparatus according to the present embodiment, the focus index values of two color component images are respectively the length of the valley portion in the histogram of each color component image, and the range width of the entire histogram. Obtained by dividing by. The focus index value of each color component image obtained in this way is kept constant to some extent even if the range (contrast) of the histogram of that color component image changes due to changes in conditions such as the lens and ambient light. Be drunk Therefore, the focus index value of each color component image alone can indicate the current focus state of the image pickup apparatus. Therefore, the focus index value of any one color component image can also be used to determine whether or not the focus state of the image pickup apparatus is correct.

【0049】また、本実施の形態によるフォーカス調整
装置は、フォーカス指標値とあらかじめ決められた基準
値とを比較することにより、レンズ不良等によって生じ
る撮像装置のフォーカス不良を検出できる。
Further, the focus adjusting device according to the present embodiment can detect the focus defect of the image pickup device caused by the lens defect or the like by comparing the focus index value with the predetermined reference value.

【0050】また、本実施の形態によるフォーカス調整
装置においては、図3に示すような周期的でない白黒の
テストパターンが使用される。白黒パターンを撮像する
とき、白黒の境目が撮像素子の画素の中央に結像する
と、その画素は中間調の値を出力する。撮像素子におけ
る画素の配列は周期的であるため、テストパターンが周
期的だと、テストパターンの設置の仕方によっては、そ
の中央に白黒の境目が結像する画素が多くなる。これ
は、撮像画像における中間調成分の増大につながり、フ
ォーカス指標が不正確になる。本実施の形態によるフォ
ーカス調整装置においては、テストパターンにおける黒
の縦縞の間隔が一定ではなく、また、それらの縦縞が、
垂直方向からわずかな角度だけ傾いているので、以上の
ような不具合を避けることができる。よって、フォーカ
ス指標が正確となるので、高い精度のフォーカス調整を
行うことができる。ここで、「わずかな角度」とは、0
度より大きく、90度より小さい角度であればよい。な
お、本実施の形態によるフォーカス調整装置において、
テストパターンは、白地に黒の縞が配列されたものを用
いたが、黒地に白の縞が配列されたものを用いても同様
の効果が得られる。また、本実施の形態によるフォーカ
ス調整装置において、テストパターンとして縦縞を用い
たが、横縞を用いてもよい。その場合は、その横縞は、
水平方向に対してわずかな角度だけ傾く。横縞を用いた
場合であっても、同様の効果が得られる。
Further, in the focus adjusting apparatus according to the present embodiment, a non-periodic black and white test pattern as shown in FIG. 3 is used. When a black-and-white pattern is imaged, if a black-and-white boundary forms an image in the center of a pixel of the image sensor, the pixel outputs a halftone value. Since the array of pixels in the image sensor is periodic, if the test pattern is periodic, a large number of pixels form a black-and-white boundary in the center depending on how the test pattern is installed. This leads to an increase in halftone components in the captured image, which makes the focus index inaccurate. In the focus adjustment device according to the present embodiment, the intervals of the black vertical stripes in the test pattern are not constant, and the vertical stripes are
Since it is tilted at a slight angle from the vertical direction, the above problems can be avoided. Therefore, since the focus index is accurate, highly accurate focus adjustment can be performed. Here, the "slight angle" is 0
The angle may be larger than 90 degrees and smaller than 90 degrees. In the focus adjustment device according to the present embodiment,
As the test pattern, a pattern in which black stripes are arranged on a white background is used, but the same effect can be obtained by using a pattern in which white stripes are arranged on a black background. Further, in the focus adjustment device according to the present embodiment, vertical stripes are used as the test pattern, but horizontal stripes may be used. In that case, the horizontal stripe is
Tilt at a slight angle to the horizontal. Similar effects can be obtained even when horizontal stripes are used.

【0051】また、本実施の形態によるフォーカス調整
装置は、別個にセンサ等の設置が必要でないので、コス
トがかからない。
Further, the focus adjusting apparatus according to the present embodiment does not require a separate sensor or the like, so that it does not cost much.

【0052】なお、本実施の形態によるフォーカス調整
装置においては、テストパターン40を正面から照らす
照明42を用いたが、テストパターン40を後方から照
らす透過式照明を用いてもよい。また、筐体44は、必
ずしも必要というわけではないが、筐体44を取り付け
れば、テストパターン40は、照明装置42によって、
常に一定の照度で照らされ、フォーカス調整時に環境光
の影響を考慮する必要がなくなる。
In the focus adjusting apparatus according to the present embodiment, the illumination 42 that illuminates the test pattern 40 from the front is used, but a transmissive illumination that illuminates the test pattern 40 from the rear may be used. Although the housing 44 is not always necessary, if the housing 44 is attached, the test pattern 40 can be changed by the lighting device 42.
It is always illuminated with a constant illuminance, eliminating the need to consider the effect of ambient light when adjusting the focus.

【0053】[0053]

【発明の効果】本発明によるフォーカス調整装置は、2
つの色成分画像のフォーカス指標値を比較することによ
り、フォーカス調整時のレンズの移動方向を容易に判定
できる。
The focus adjusting device according to the present invention has two features.
By comparing the focus index values of the three color component images, the moving direction of the lens during focus adjustment can be easily determined.

【0054】本発明によるフォーカス調整装置におい
て、縞の間隔が一定ではないテストパターンを用いるこ
とにより、高い精度のフォーカス調整を行うことができ
る。
In the focus adjusting apparatus according to the present invention, by using a test pattern in which the interval between stripes is not constant, it is possible to perform focus adjustment with high accuracy.

【0055】本発明によるフォーカス調整装置において
は、縞が、その縞が並ぶ方向と縞の長手方向が垂直にな
らないように配列されたテストパターンを用いることに
より、高い精度のフォーカス調整を行うことができる。
In the focus adjusting apparatus according to the present invention, by using a test pattern in which stripes are arranged so that the direction in which the stripes are arranged and the longitudinal direction of the stripes are not vertical, it is possible to perform focus adjustment with high accuracy. it can.

【0056】本発明によるフォーカス調整装置は、フォ
ーカス指標値とあらかじめ決められた基準値とを比較す
ることにより、レンズ不良等によって生じる撮像装置の
フォーカス不良を容易に検出できる。
The focus adjusting device according to the present invention can easily detect a focus defect of the image pickup device caused by a lens defect or the like by comparing the focus index value with a predetermined reference value.

【0057】本発明によるフォーカス調整方法は、2つ
の色成分画像のフォーカス指標値を比較することによ
り、フォーカス調整時のレンズの移動方向を容易に判定
できる。
The focus adjusting method according to the present invention can easily determine the moving direction of the lens at the time of focus adjustment by comparing the focus index values of the two color component images.

【0058】本発明によるフォーカス調整方法は、フォ
ーカス指標値とあらかじめ決められた基準値とを比較す
ることにより、レンズ不良等によって生じる撮像装置の
フォーカス不良を容易に検出できる。
The focus adjusting method according to the present invention can easily detect the focus defect of the image pickup device caused by the lens defect or the like by comparing the focus index value with the predetermined reference value.

【図面の簡単な説明】[Brief description of drawings]

【図1】 本実施の形態によるフォーカス調整装置の構
成を図式的に示すブロック図。
FIG. 1 is a block diagram schematically showing the configuration of a focus adjustment device according to the present embodiment.

【図2】 図1に示されたフォーカス調整装置の一例を
示す図式的な図。
FIG. 2 is a schematic diagram showing an example of the focus adjustment device shown in FIG.

【図3】 本実施の形態によるフォーカス調整装置にお
いて使用される使用されるテストパターンのパターン
図。
FIG. 3 is a pattern diagram of a test pattern used in the focus adjustment apparatus according to the present embodiment.

【図4】 本実施の形態によるフォーカス調整装置にお
いて使用される回転円盤の表面図。
FIG. 4 is a surface view of a rotating disk used in the focus adjustment device according to the present embodiment.

【図5】 図2に示された計算機の構成を図式的に示す
ブロック図。
5 is a block diagram schematically showing the configuration of the computer shown in FIG.

【図6】 本実施の形態によるフォーカス調整方法を示
すフローチャートの図。
FIG. 6 is a flowchart showing a focus adjustment method according to the present embodiment.

【図7】 本実施の形態によるフォーカス指標の計算方
法を説明する図。
FIG. 7 is a diagram illustrating a method of calculating a focus index according to the present embodiment.

【図8】 各々の色成分画像に対して、レンズおよび撮
像素子の距離と、フォーカス指標値との関係を示す図。
FIG. 8 is a diagram showing a relationship between a distance between a lens and an image sensor and a focus index value for each color component image.

【図9】 本実施の形態による別のフォーカス調整方法
を示すフローチャートの図。
FIG. 9 is a flowchart showing another focus adjusting method according to the present embodiment.

【符号の説明】[Explanation of symbols]

10 フォーカス調整装置、 12 撮像装置、 14
フォーカス検出部、16 レンズ移動部、 18 フ
ォーカス指標計算手段、 20 レンズ移動方向判定手
段、 22 ファインフォーカス判定手段、 32 撮
像素子、 34 レンズ、 36 レンズ筒、 38
回転円盤、 40 テストパターン、42 照明装置、
60 歯車、 62 ハンドル、 70 計算機、
72表示装置、 74 入力装置
10 Focus Adjusting Device, 12 Imaging Device, 14
Focus detecting unit, 16 lens moving unit, 18 focus index calculating unit, 20 lens moving direction determining unit, 22 fine focus determining unit, 32 image sensor, 34 lens, 36 lens barrel, 38
Rotating disc, 40 test patterns, 42 illuminators,
60 gears, 62 handles, 70 calculators,
72 display device, 74 input device

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 2H011 AA03 BA21 BB04 CA21 2H051 AA06 BA47 BA72 CE16 CE26 DB01 EB19 EB20 FA45 FA48 5C022 AB28 AB44 AC34 5C065 AA01 AA03 BB11 BB35 DD02 GG16 GG32    ─────────────────────────────────────────────────── ─── Continued front page    F-term (reference) 2H011 AA03 BA21 BB04 CA21                 2H051 AA06 BA47 BA72 CE16 CE26                       DB01 EB19 EB20 FA45 FA48                 5C022 AB28 AB44 AC34                 5C065 AA01 AA03 BB11 BB35 DD02                       GG16 GG32

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】 撮像素子と、その撮像素子に像を結ぶレ
ンズと、光軸方向に移動可能なレンズ装着部とを備える
カラー撮像装置のフォーカス調整装置であって、 前記撮像装置によって撮像された白黒テストパターンの
複数の色成分画像を示す画像データを受け取るデータ受
け取り手段と、 前記画像データを利用して、あらかじめ決められた2つ
の色成分画像のヒストグラムを求め、その各々のヒスト
グラムにおいて、前記テストパターンの白および黒に対
応する2つのピークの鮮鋭さを表わす指標(以下、「フ
ォーカス指標」という。)を計算する計算手段と、 前記2つの色成分画像のヒストグラムによるフォーカス
指標値を比較する比較手段と、 前記2つのフォーカス指標値が異なるとき、その2つの
フォーカス指標値の大小関係を用いて、前記レンズの光
軸上における移動方向を判定する判定手段とを備える装
置。
1. A focus adjusting device for a color image pickup device, comprising: an image pickup device; a lens for forming an image on the image pickup device; and a lens mounting portion movable in an optical axis direction, wherein the image pickup device takes an image. Data receiving means for receiving image data showing a plurality of color component images of a black-and-white test pattern, and histograms of two predetermined color component images are obtained using the image data, and the test is performed in each histogram. Comparing means for calculating an index (hereinafter, referred to as "focus index") representing sharpness of two peaks corresponding to white and black of the pattern, and a focus index value based on histograms of the two color component images. Means and when the two focus index values are different, the magnitude relationship between the two focus index values is used. The apparatus comprises a determination means for determining a moving direction on the optical axis of the lens.
【請求項2】 前記白黒テストパターンが、光軸に垂直
な平面上において、白地に複数の黒の縞が配列される
か、または、黒地に複数の白の縞が配列されたものであ
り、それらの縞の間隔がそれぞれ異なることを特徴とす
る請求項1に記載のフォーカス調整装置。
2. The black-and-white test pattern has a plurality of black stripes arranged on a white background or a plurality of white stripes arranged on a black background on a plane perpendicular to the optical axis. The focus adjusting device according to claim 1, wherein the intervals of the stripes are different from each other.
【請求項3】 前記白黒テストパターンが、光軸に垂直
な平面上において、白地に複数の黒の縞が配列される
か、または、黒地に複数の白の縞が配列されたものであ
り、それらの縞は、縞が並ぶ方向と縞の長手方向が垂直
にならないように配列されたものであることを特徴とす
る請求項1に記載のフォーカス調整装置。
3. The black-and-white test pattern is a pattern in which a plurality of black stripes are arranged on a white background or a plurality of white stripes are arranged on a black background on a plane perpendicular to the optical axis. The focus adjusting device according to claim 1, wherein the stripes are arranged so that a direction in which the stripes are arranged and a longitudinal direction of the stripes are not perpendicular to each other.
【請求項4】 さらに、前記判定手段の結果に基づき、
前記撮像装置のレンズ装着部を光軸上で移動させるレン
ズ移動手段を備える請求項1から請求項3のいずれかに
記載のフォーカス調整装置。
4. Further, based on the result of the judging means,
The focus adjusting device according to claim 1, further comprising a lens moving unit that moves a lens mounting portion of the imaging device on an optical axis.
【請求項5】 さらに、前記判定手段の結果を表示する
表示手段と、 前記撮像装置のレンズ装着部を光軸上で移動させるレン
ズ移動手段とを備える請求項1から請求項3のいずれか
に記載のフォーカス調整装置。
5. The method according to claim 1, further comprising display means for displaying a result of the determination means, and lens moving means for moving a lens mounting portion of the image pickup apparatus on an optical axis. The focus adjustment device described.
【請求項6】 さらに、前記2つのフォーカス指標値が
等しいとき、そのフォーカス指標値と所定の基準値とを
比較する第2の比較手段を備えることを特徴とする請求
項1から請求項5のいずれかに記載のフォーカス調整装
置。
6. The method according to claim 1, further comprising second comparing means for comparing the focus index value with a predetermined reference value when the two focus index values are equal. The focus adjustment device according to any one of claims.
【請求項7】 さらに、前記撮像装置の被写体として光
軸上に白黒テストパターンを設置する設置手段と、 前記テストパターンを照らす照明手段とを備える請求項
1から請求項6のいずれかに記載のフォーカス調整装
置。
7. The apparatus according to claim 1, further comprising: an installation unit that installs a black-and-white test pattern on an optical axis as a subject of the imaging device, and an illumination unit that illuminates the test pattern. Focus adjustment device.
【請求項8】 前記照明手段が、前記テストパターンを
前方から照射することを特徴とする請求項7に記載のフ
ォーカス調整装置。
8. The focus adjusting apparatus according to claim 7, wherein the illumination unit irradiates the test pattern from the front side.
【請求項9】 前記照明手段が、前記テストパターンを
後方から照射する透過光式照明であることを特徴とする
請求項7に記載のフォーカス調整装置。
9. The focus adjustment apparatus according to claim 7, wherein the illumination unit is a transmitted light illumination that illuminates the test pattern from behind.
【請求項10】 撮像素子と、その撮像素子に像を結ぶ
レンズと、光軸方向に移動可能なレンズ装着部とを備え
るカラー撮像装置において、フォーカスを調整する方法
であって、 前記撮像装置によって撮像された白黒テストパターンの
複数の色成分画像を示す画像データを受け取るデータ受
け取りステップと、 前記画像データを利用して、あらかじめ決められた2つ
の色成分画像のヒストグラムを求め、その各々のヒスト
グラムにおいて、前記テストパターンの白および黒に対
応する2つのピークの鮮鋭さを表わす指標(以下、「フ
ォーカス指標」という。)を計算する計算ステップと、 前記2つの色成分画像のヒストグラムによるフォーカス
指標値を比較する比較ステップと、 前記2つのフォーカス指標値が異なるとき、その2つの
フォーカス指標値の大小関係を用いて、前記レンズの光
軸上における移動方向を判定する判定ステップとから成
るフォーカス調整方法。
10. A method for adjusting focus in a color image pickup device comprising an image pickup device, a lens for forming an image on the image pickup device, and a lens mounting part movable in an optical axis direction, the method comprising: A data receiving step of receiving image data showing a plurality of imaged color component images of the black-and-white test pattern, and obtaining histograms of two predetermined color component images by using the image data, and in each histogram, A calculation step of calculating an index (hereinafter, referred to as “focus index”) representing sharpness of two peaks corresponding to white and black of the test pattern, and a focus index value based on histograms of the two color component images. The comparing step of comparing and the two focus index values when the two focus index values are different. With the size relationship of Kas index value, the focus adjusting method comprising a determination step of determining the moving direction of the optical axis of the lens.
【請求項11】 さらに、前記判定ステップの結果に基
づき、前記撮像装置のレンズ装着部を光軸上で移動させ
るレンズ移動ステップを含む請求項10に記載のフォー
カス調整方法。
11. The focus adjusting method according to claim 10, further comprising a lens moving step of moving a lens mounting portion of the imaging device on an optical axis based on a result of the determining step.
【請求項12】 さらに、前記判定ステップの結果を表
示する表示ステップと、 前記撮像装置のレンズ装着部を光軸上で移動させるレン
ズ移動ステップとを備える請求項10に記載のフォーカ
ス調整方法。
12. The focus adjusting method according to claim 10, further comprising a display step of displaying a result of the determination step, and a lens moving step of moving a lens mounting portion of the imaging device on an optical axis.
【請求項13】 さらに、前記2つのフォーカス指標値
が等しいとき、そのフォーカス指標値と所定の基準値と
を比較する第2の比較ステップを含むことを特徴とする
請求項10から請求項12のいずれかに記載のフォーカ
ス調整方法。
13. The method according to claim 10, further comprising a second comparing step of comparing the focus index value with a predetermined reference value when the two focus index values are equal. The focus adjustment method according to any one.
JP2002056003A 2002-03-01 2002-03-01 Focusing method and focusing device Pending JP2003255217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002056003A JP2003255217A (en) 2002-03-01 2002-03-01 Focusing method and focusing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002056003A JP2003255217A (en) 2002-03-01 2002-03-01 Focusing method and focusing device

Publications (1)

Publication Number Publication Date
JP2003255217A true JP2003255217A (en) 2003-09-10

Family

ID=28666695

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002056003A Pending JP2003255217A (en) 2002-03-01 2002-03-01 Focusing method and focusing device

Country Status (1)

Country Link
JP (1) JP2003255217A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008197020A (en) * 2007-02-14 2008-08-28 Mitsutoyo Corp Optical displacement measuring instrument
JP2011107682A (en) * 2009-07-17 2011-06-02 Nikon Corp Focusing device and camera
JP2011107681A (en) * 2009-07-17 2011-06-02 Nikon Corp Focusing device and camera
JP2014222271A (en) * 2013-05-13 2014-11-27 株式会社キーレックス Camera focus adjustment apparatus
US9241106B2 (en) 2009-08-28 2016-01-19 Omron Corporation Image processing apparatus and image processing method, and computer-readable storage medium storage image processing program
CN113873153A (en) * 2021-09-23 2021-12-31 汇献科技(深圳)有限公司 Camera shooting adjusting method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008197020A (en) * 2007-02-14 2008-08-28 Mitsutoyo Corp Optical displacement measuring instrument
JP2011107682A (en) * 2009-07-17 2011-06-02 Nikon Corp Focusing device and camera
JP2011107681A (en) * 2009-07-17 2011-06-02 Nikon Corp Focusing device and camera
US9241106B2 (en) 2009-08-28 2016-01-19 Omron Corporation Image processing apparatus and image processing method, and computer-readable storage medium storage image processing program
JP2014222271A (en) * 2013-05-13 2014-11-27 株式会社キーレックス Camera focus adjustment apparatus
CN113873153A (en) * 2021-09-23 2021-12-31 汇献科技(深圳)有限公司 Camera shooting adjusting method

Similar Documents

Publication Publication Date Title
US20200364491A1 (en) Image detection scanning method for object surface defects and image detection scanning system thereof
TWI278597B (en) Optical film tester
US7697746B2 (en) Inspection system and inspection method
CN108291854B (en) Optical inspection device, lens, and optical inspection method
US7924418B2 (en) Inspection apparatus and method
EP1946376B1 (en) Apparatus for and method of measuring image
CN109253700B (en) Film thickness measuring method and film thickness measuring apparatus
US20160238382A1 (en) Three dimensional shape measurement apparatus, control method therefor, and storage medium
US8810799B2 (en) Height-measuring method and height-measuring device
JP2006258582A (en) Image input device and image input method
US8334908B2 (en) Method and apparatus for high dynamic range image measurement
JP2003255217A (en) Focusing method and focusing device
US20120069335A1 (en) Surface inspecting apparatus and surface inspecting method
JP4901246B2 (en) Spectral luminance distribution estimation system and method
JP2023169165A (en) Computer, program, and method
KR20160100824A (en) Light distribution characteristic measurement apparatus and light distribution characteristic measurement method
JP3639542B2 (en) Focus determination device and focus determination method for video camera with autofocus function
JP2007278931A (en) Image evaluating apparatus and method
KR100605226B1 (en) Apparatus and method for detecting foreign material in digital camera module
US6757491B2 (en) Photometric apparatus and method for evaluating backlight
JP2017036937A (en) Colorimetry device, colorimetry system and colorimetry method
JP2007003332A (en) Method and detector for detecting defect on planar body side face
JP2008046361A (en) Optical system and its control method
JP3755319B2 (en) Main subject detection device and apparatus using the same
CN109655005B (en) Film thickness measuring apparatus, substrate inspecting apparatus, film thickness measuring method, and substrate inspecting method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051206

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060329

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070619