JP2008096610A - Automatic focusing device and adjustment method therefor - Google Patents

Automatic focusing device and adjustment method therefor Download PDF

Info

Publication number
JP2008096610A
JP2008096610A JP2006277161A JP2006277161A JP2008096610A JP 2008096610 A JP2008096610 A JP 2008096610A JP 2006277161 A JP2006277161 A JP 2006277161A JP 2006277161 A JP2006277161 A JP 2006277161A JP 2008096610 A JP2008096610 A JP 2008096610A
Authority
JP
Japan
Prior art keywords
focus lens
contrast value
designated position
moving
designated
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.)
Withdrawn
Application number
JP2006277161A
Other languages
Japanese (ja)
Inventor
Masatake Yamanaka
正剛 山中
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2006277161A priority Critical patent/JP2008096610A/en
Publication of JP2008096610A publication Critical patent/JP2008096610A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an automatic focusing device capable of minimizing an error between the stopped position and target specified position of a focus lens by making the distance of the movement of the focus lens longer, thereby facilitating the control of a linear motor, and to provide an adjustment method therefor. <P>SOLUTION: The driving range of the focus lens driven by the linear motor is divided into ten equal intervals from a specified position P0 to another specified position P9. After the contrast value of a subject is obtained at the specified position P0, the focus lens is moved to the specified position P5 in a rightward direction and a contrast value is obtained. Subsequently, the focus lens is moved in a leftward direction from the specified position P5 to the specified position P1 to obtain the contrast value. In the same way as above, the contrast values are obtained at all the specified positions by moving the focus lens alternately to a fifth specified position ahead in the rightward direction and a fourth specified position in the leftward direction. Then, the greatest contrast value is selected from them and the focus lens is moved to the specified position that has the greatest contrast value. Since the focus lens moves a long distance as far as a specified position at least two or more specified positions ahead, an error between the stopped position and target specified position of the focus lens after its movement can be minimized. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

この発明は、自動焦点調節装置およびその調節方法に関し、特にリニアモータを用いてフォーカスレンズの位置を調節する、自動焦点調節装置およびその調節方法に関する。   The present invention relates to an automatic focus adjustment device and an adjustment method thereof, and more particularly to an automatic focus adjustment device and an adjustment method thereof that adjust the position of a focus lens using a linear motor.

ボイスコイルモータ等のリニアモータは小型化および軽量化に適しているため、携帯用電子機器では、リニアモータによってフォーカスレンズを駆動する自動焦点調節装置が採用されている場合が多い。この種の自動焦点調節装置は、特許文献1に記載されているように、いわゆる山登り方式によってフォーカスレンズの合焦位置を検出している。すなわち、フォーカスレンズをその駆動範囲の一端から他端に向かって、等間隔で配置された指定位置に順次移動させて、各指定位置で被写体からの画像信号に基づいてコントラスト値を求める。このようにして求めたコントラスト値が、フォーカスレンズの移動に伴って増加から減少に転じたとき、減少に転じる直前の指定位置、すなわち最大のコントラスト値を示す指定位置を被写体の合焦位置と判断し、その指定位置にフォーカスレンズを移動させる。このようにして、自動焦点調節装置は被写体に合焦させることができる。
特開平11−84228号公報[G02B 7/11、H04N 5/232、G02B 7/11]
Since linear motors such as voice coil motors are suitable for miniaturization and weight reduction, portable electronic devices often employ an automatic focus adjustment device that drives a focus lens by a linear motor. As described in Patent Document 1, this type of automatic focus adjustment apparatus detects a focus position of a focus lens by a so-called hill-climbing method. That is, the focus lens is sequentially moved from one end to the other end of the driving range to designated positions arranged at equal intervals, and the contrast value is obtained based on the image signal from the subject at each designated position. When the contrast value obtained in this way changes from increasing to decreasing with the movement of the focus lens, the designated position immediately before starting to decrease, that is, the designated position showing the maximum contrast value is determined as the in-focus position of the subject. Then, the focus lens is moved to the designated position. In this way, the automatic focus adjustment device can focus on the subject.
JP 11-84228 A [G02B 7/11, H04N 5/232, G02B 7/11]

しかし、山登り方式によって合焦位置を求める場合、位置センサでフォーカスレンズの位置を確認しながら、リニアモータに電流を供給してフォーカスレンズを移動させているので、コントラスト値を求める指定位置の間隔が狭い場合、位置検出とリニアモータへの電流の供給を断続的に繰り返して行う必要がある。この場合、フォーカスレンズの加速時間および減速時間が短いので、能力の高いコンピュータでも、加速/減速時間およびリニアモータの出力を制御することが難しい。また、割り込みのオーバヘッドがあると、フォーカスレンズを指定位置に停止させることが一層困難となる。この結果、フォーカスレンズの移動後の停止位置と目標とする指定位置との誤差が大きくなって、指定位置での正確なコントラスト値を求めることができなくなるので、正確な合焦位置を求めることができないという問題がある。特に、携帯端末に内蔵されたカメラでは、フォーカスレンズの駆動範囲が200〜300μmで、隣接する指定位置の間隔が10μm程度と非常に狭いため、フォーカスレンズを指定位置に停止させることはさらに困難となる。このため、移動後の停止位置と目標とする指定位置との誤差がさらに大きくなり、正確な合焦位置を求めることがより一層困難となる。   However, when determining the in-focus position by the hill-climbing method, the focus lens is moved by supplying current to the linear motor while checking the position of the focus lens with the position sensor. If it is narrow, it is necessary to intermittently repeat position detection and supply of current to the linear motor. In this case, since the acceleration time and the deceleration time of the focus lens are short, it is difficult to control the acceleration / deceleration time and the output of the linear motor even with a high-performance computer. Also, if there is an interruption overhead, it becomes more difficult to stop the focus lens at the specified position. As a result, an error between the stop position after the movement of the focus lens and the target designated position becomes large, and it becomes impossible to obtain an accurate contrast value at the designated position. Therefore, an accurate in-focus position can be obtained. There is a problem that you can not. In particular, in a camera built in a portable terminal, since the driving range of the focus lens is 200 to 300 μm and the interval between adjacent designated positions is as narrow as about 10 μm, it is more difficult to stop the focus lens at the designated position. Become. For this reason, the error between the stop position after movement and the target designated position is further increased, and it becomes even more difficult to obtain an accurate in-focus position.

それゆえに、この発明の主たる目的は、フォーカスレンズの移動距離を長くすることによりリニアモータを制御しやすくして、フォーカスレンズの停止位置と目標とする指定位置との誤差を小さくすることができる、自動焦点調節装置およびその調節方法を提供することである。   Therefore, the main object of the present invention is to make it easier to control the linear motor by increasing the moving distance of the focus lens, and to reduce the error between the stop position of the focus lens and the target designated position. An automatic focus adjustment device and an adjustment method thereof are provided.

請求項1の発明は、フォーカスレンズ(14)の駆動範囲を等間隔に分割した複数個の指定位置に、リニアモータ(42)によって駆動されるフォーカスレンズを停止させてコントラスト値を求めることにより合焦位置を検出する、自動焦点調節装置において、フォーカスレンズを第1方向の少なくとも2個以上先の指定位置まで移動させる第1移動手段(36、40、42、S15、S43、S63、S75)、フォーカスレンズを第1方向とは逆の第2方向の少なくとも2個以上先の指定位置まで移動させる第2移動手段(36、40、42、S25、S53、S89)、指定位置ごとに被写体の画像信号からコントラスト値を求めるコントラスト値取得手段(36、S17、S27、S45、S55、S67、S81、S93)、コントラスト値取得手段によって求められたコントラスト値から最大コントラスト値を選定する選定手段(36、S33)、および最大コントラスト値を示す指定位置にフォーカスレンズを移動させて被写体に合焦させる合焦手段(36、40、42、S35)を備えることを特徴とする、自動焦点調節装置である。   According to the first aspect of the present invention, the focus lens driven by the linear motor (42) is stopped at a plurality of designated positions obtained by dividing the drive range of the focus lens (14) at equal intervals to obtain the contrast value. A first moving means (36, 40, 42, S15, S43, S63, S75) for moving the focus lens to a specified position at least two or more ahead in the first direction in the automatic focus adjustment device for detecting a focal position; Second moving means (36, 40, 42, S25, S53, S89) for moving the focus lens to at least two or more specified positions in the second direction opposite to the first direction, an image of the subject at each specified position Contrast value acquisition means (36, S17, S27, S45, S55, S67, S81, S93) for obtaining a contrast value from the signal, Selection means (36, S33) for selecting the maximum contrast value from the contrast value obtained by the last value acquisition means, and focusing means (36 for moving the focus lens to a designated position indicating the maximum contrast value to focus the subject) , 40, 42, S35).

請求項1の発明では、フォーカスレンズの駆動範囲が複数の指定位置によって等間隔に分割されている。リニアモータによって駆動されるフォーカスレンズは、この駆動範囲内で、第1移動手段によって第1方向の少なくとも2個以上先の指定位置まで移動させられたり、第2移動手段によって第1方向とは逆の第2方向の少なくとも2個以上先の指定位置まで移動させられたりする。このようにして移動させられた各指定位置で、コントラスト値取得手段によって、被写体の画像信号からコントラスト値を求める。そして、各指定位置で求めたコントラスト値から選定手段によって最大コントラスト値を選定し、その最大コントラスト値を示す指定位置に合焦手段によってフォーカスレンズを移動させる。この結果、フォーカスレンズを被写体に合焦させることができる。   In the first aspect of the invention, the driving range of the focus lens is divided at equal intervals by a plurality of designated positions. The focus lens driven by the linear motor is moved within the driving range by the first moving means to at least two or more specified positions ahead of the first direction, or is reverse to the first direction by the second moving means. Or at least two or more positions in the second direction. At each designated position thus moved, the contrast value is obtained from the image signal of the subject by the contrast value acquisition means. Then, the maximum contrast value is selected by the selecting means from the contrast values obtained at each specified position, and the focus lens is moved by the focusing means to the specified position indicating the maximum contrast value. As a result, the focus lens can be focused on the subject.

山登り方式のように隣接する指定位置に順次移動する場合と異なり、フォーカスレンズは、第1移動手段または第2移動手段によって少なくとも2個以上先の指定位置まで移動させられるので、その移動距離が長くなる。このため、第1移動手段または第2移動手段によるフォーカスレンズの加速/減速時間、および第1移動手段または第2移動手段の出力の制御が容易となり、能力の低いコンピュータでもフォーカスレンズの停止位置と目標とする指定位置との誤差を小さくすることができる。したがって、各指定位置でより正確な被写体のコントラスト値を求めることができるので、被写体のより正確な合焦位置を求めることができる。   Unlike the case of sequentially moving to adjacent designated positions as in the hill-climbing method, the focus lens is moved to the designated position ahead by at least two or more by the first moving means or the second moving means, so the moving distance is long. Become. For this reason, it becomes easy to control the acceleration / deceleration time of the focus lens by the first moving unit or the second moving unit and the output of the first moving unit or the second moving unit. The error from the target designated position can be reduced. Accordingly, a more accurate subject contrast value can be obtained at each designated position, and thus a more accurate in-focus position of the subject can be obtained.

請求項2の発明は、請求項1記載の自動焦点調節装置において、第1移動手段と第2移動手段とを交互に動作させることによってフォーカスレンズを第1方向と第2方向に交互に移動させる、自動焦点調節装置である。この場合、フォーカスレンズを第1方向と第2方向にランダムに動かす場合に比べて、第1方向の移動距離および第2方向の移動距離を長くすることができる。   According to a second aspect of the present invention, in the automatic focusing apparatus according to the first aspect, the focus lens is moved alternately in the first direction and the second direction by alternately operating the first moving means and the second moving means. , An automatic focusing device. In this case, the moving distance in the first direction and the moving distance in the second direction can be made longer than when the focus lens is moved randomly in the first direction and the second direction.

請求項3の発明は、請求項1または2記載の自動焦点調節装置において、第1方向の移動距離はすべて同じ距離であり、第2方向の移動距離は第1方向の移動プロファイルとは異なるかつすべて同じ距離である、自動焦点調節装置である。この場合、第1移動手段による移動と第2移動手段による移動について、移動プロファイルをそれぞれ1種類ずつ準備すればよいので、コンピュータの負担を軽減することができる。   According to a third aspect of the present invention, in the automatic focusing apparatus according to the first or second aspect, the movement distances in the first direction are all the same distance, and the movement distance in the second direction is different from the movement profile in the first direction and It is an autofocus device that is all the same distance. In this case, it is only necessary to prepare one type of movement profile for each of the movement by the first movement unit and the movement by the second movement unit, so that the burden on the computer can be reduced.

請求項4の発明は、請求項3記載の自動焦点調節装置において、指定位置の個数が奇数(2n−1:nは3以上の整数)のときも偶数(2n:nは3以上の整数)のときも、第1方向の移動距離はn個先の指定位置までの距離であり、第2方向の移動距離は(n−1)個先の指定位置までの距離である、請求項3記載の自動焦点調節装置である。この場合、第1移動手段により指定位置n個分だけ第1方向に進み、第2移動手段により指定位置(n−1)個分だけ第2方向に進むことを交互に繰り返すことにより、フォーカスレンズはすべての指定位置に1回だけ停止して、各指定位置でコントラスト値を求めることができる。このため、各指定位置でのコントラスト値を効率的に求めることができる。   According to a fourth aspect of the present invention, in the automatic focus adjustment apparatus according to the third aspect, even when the number of designated positions is an odd number (2n-1: n is an integer of 3 or more) (2n: n is an integer of 3 or more). The moving distance in the first direction is the distance to the nth specified position, and the moving distance in the second direction is the distance to the (n-1) th specified position. Is an automatic focusing device. In this case, the first moving means advances in the first direction by n designated positions and the second moving means advances in the second direction by (n-1) designated positions, thereby alternately repeating the focus lens. Can stop only once at all specified positions and obtain a contrast value at each specified position. For this reason, the contrast value at each designated position can be efficiently obtained.

請求項5の発明は、請求項1ないし4のいずれかに記載の自動焦点調節装置において、メモリ(38)、コントラスト値取得手段によって求められたコントラスト値をメモリに書き込む書き込み手段(36、S19、S29,S47、S57、S69、S83、S95)、第1移動手段および第2移動手段のいずれかにより指定位置に移動後に、指定位置の前記コントラスト値がメモリに書き込まれているか否かを確認する確認手段(36、S65、S79、S91)、および確認手段によって指定位置のコントラスト値がメモリに書き込まれていることを確認した場合、指定位置のコントラスト値を求めることなく次の指定位置にフォーカスレンズを移動させる第3移動手段(36、40、42、S63、S75、S89)をさらに備える、自動焦点調節装置である。   According to a fifth aspect of the present invention, there is provided the automatic focusing apparatus according to any one of the first to fourth aspects, wherein the memory (38) and the writing means (36, S19, S29, S47, S57, S69, S83, S95), after moving to the designated position by any of the first moving means and the second moving means, it is confirmed whether or not the contrast value at the designated position is written in the memory. When it is confirmed by the confirmation means (36, S65, S79, S91) and the confirmation means that the contrast value at the designated position is written in the memory, the focus lens is moved to the next designated position without obtaining the contrast value at the designated position. Is further provided with third moving means (36, 40, 42, S63, S75, S89) for moving An automatic focusing device.

請求項5の発明では、第1移動手段および第2移動手段のいずれかによって指定位置に移動させられたとき、その指定位置でのコントラスト値が書き込み手段によってすでにメモリに書き込まれているか否かを確認手段によって確認する。その結果、コントラスト値がすでに書き込まれていることが確認できた場合には、その指定位置でもう一度コントラスト値を求めることなく、第3移動手段によってフォーカスレンズを次の指定位置に移動させる。このため、合焦位置を求めるまでの時間を短縮することができる。   According to the fifth aspect of the present invention, whether the contrast value at the designated position is already written in the memory by the writing means when moved to the designated position by either the first moving means or the second moving means. Confirm by confirmation means. As a result, when it is confirmed that the contrast value has already been written, the focus lens is moved to the next designated position by the third moving means without obtaining the contrast value again at the designated position. For this reason, the time until the in-focus position is obtained can be shortened.

請求項6の発明は、請求項1ないし5のいずれかに記載の自動焦点調節装置において、第1移動手段および第2移動手段のいずれかによってフォーカスレンズを移動させているときにフォーカスレンズの位置情報を所定の時間間隔で検出する位置検出手段(36、44)、および位置検出手段によって検出された位置情報に基づき、第1移動手段および第2移動手段を制御する制御手段(36、S15、S25、S43、S53、S63、S75、S89)をさらに備える、自動焦点調節装置である。   According to a sixth aspect of the present invention, in the automatic focus adjustment apparatus according to any one of the first to fifth aspects, the position of the focus lens when the focus lens is moved by either the first moving means or the second moving means. Position detecting means (36, 44) for detecting information at predetermined time intervals, and control means (36, S15, S15, etc.) for controlling the first moving means and the second moving means based on the position information detected by the position detecting means. S25, S43, S53, S63, S75, and S89).

請求項6の発明では、第1移動手段または第2移動手段によってフォーカスレンズを移動させているときに、位置検出手段によってフォーカスレンズの位置情報を所定の時間間隔で検出する。そして、検出した位置情報に基づいて制御手段を制御して、フォーカスレンズを所定の指定位置に停止させる。この場合、フォーカスレンズの移動中にその位置情報を位置センサ44によって正確に知ることができるので、フォーカスレンズの停止位置と目標とする指定位置との誤差をより一層小さくすることができる。   In the sixth aspect of the invention, when the focus lens is moved by the first moving means or the second moving means, the position information of the focus lens is detected by the position detecting means at predetermined time intervals. Then, the control unit is controlled based on the detected position information, and the focus lens is stopped at a predetermined designated position. In this case, since the position information can be accurately known by the position sensor 44 during the movement of the focus lens, the error between the stop position of the focus lens and the target designated position can be further reduced.

請求項7の発明は、請求項1ないし6のいずれかに記載の自動焦点調節装置において、ディスプレイ(24)、被写体のプレビュー画像をディスプレイに表示する表示手段(36、S37)、および前記フォーカスレンズの移動開始前から合焦手段によるフォーカスレンズの移動終了まで表示手段を不能化する不能化手段(36、S1)をさらに備える、自動焦点調節装置である。   According to a seventh aspect of the present invention, in the autofocusing apparatus according to any one of the first to sixth aspects, the display (24), the display means (36, S37) for displaying a preview image of the subject, and the focus lens It is an automatic focus adjustment device further comprising disabling means (36, S1) for disabling the display means from the start of the movement until the end of the movement of the focus lens by the focusing means.

請求項7の発明では、フォーカスレンズの移動開始前に、被写体のプレビュー画像をディスプレイに表示する表示手段を不能化し、合焦手段によるフォーカスレンズの移動終了後に表示手段の不能化を解除する。この場合、合焦位置を求めている間は被写体のプレビュー画像がディスプレイに表示されないので、ユーザがディスプレイの画面を注視して気分が悪くなることを防止することができる。   According to the seventh aspect of the present invention, the display means for displaying the preview image of the subject on the display is disabled before the focus lens starts moving, and the disabling of the display means is canceled after the focus lens is moved by the focusing means. In this case, since the preview image of the subject is not displayed on the display while the in-focus position is obtained, it is possible to prevent the user from feeling bad by gazing at the display screen.

請求項8の発明は、フォーカスレンズ(14)の駆動範囲を等間隔に分割した複数個の指定位置に、リニアモータ(42)によって駆動されるフォーカスレンズを停止させてコントラスト値を求めることにより合焦位置を検出する、自動焦点調節装置の調節方法において、フォーカスレンズを第1方向の少なくとも2個以上先の指定位置まで移動させ(36、40、42、S15、S43、S63、S75)、フォーカスレンズを第1方向とは逆の第2方向の少なくとも2個以上先の指定位置まで移動させ(36、40、42、S25、S53、S89)、指定位置ごとに被写体の画像信号からコントラスト値を求め(36、S17、S27、S45、S55、S67、S81、S93)、求められたコントラスト値から最大コントラスト値を選定し(36、S33)、および最大コントラスト値を示す指定位置にフォーカスレンズを移動させて被写体に合焦させる(36、40、42、S35)ことを特徴とする、自動焦点調節装置の調節方法である。この請求項8の発明の作用および効果は、請求項1の発明の作用および効果と同一なので省略する。   In the invention of claim 8, the focus lens driven by the linear motor (42) is stopped at a plurality of designated positions obtained by dividing the drive range of the focus lens (14) at equal intervals, and the contrast value is obtained. In the adjustment method of the automatic focusing apparatus that detects the focal position, the focus lens is moved to at least two or more specified positions in the first direction (36, 40, 42, S15, S43, S63, S75), and the focus is moved. The lens is moved to at least two or more specified positions in the second direction opposite to the first direction (36, 40, 42, S25, S53, S89), and the contrast value is obtained from the image signal of the subject at each specified position. Obtained (36, S17, S27, S45, S55, S67, S81, S93) and the maximum contrast value from the obtained contrast value A method of adjusting an automatic focus adjustment device, characterized by selecting (36, S33) and moving a focus lens to a designated position showing a maximum contrast value to focus on a subject (36, 40, 42, S35) It is. Since the operation and effect of the invention of claim 8 are the same as those of the invention of claim 1, they are omitted.

請求項9の発明は、請求項8記載の自動焦点調節装置の調節方法において、コントラスト値をメモリ(38)に書き込み(36、S19、S29,S47、S57、S69、S83、S95)、第1方向への移動および第2方向への移動のいずれかに基づいてフォーカスレンズを指定位置に移動後に、指定位置のコントラスト値がメモリに書き込まれているか否かを確認し(36、S65、S79、S91)、および指定位置のコントラスト値がメモリに書き込まれていることを確認した場合、指定位置のコントラスト値を求めることなく次の指定位置にフォーカスレンズを移動させる(36、40、42、S63、S75、S89)ことをさらに備える、自動焦点調節装置の調節方法である。この請求項9の発明の作用および効果は、請求項5の発明の作用および効果と同一なので省略する。   The invention of claim 9 is the adjustment method of the automatic focusing apparatus according to claim 8, wherein the contrast value is written in the memory (38) (36, S19, S29, S47, S57, S69, S83, S95), After moving the focus lens to the designated position based on either the movement in the direction or the movement in the second direction, it is confirmed whether the contrast value at the designated position is written in the memory (36, S65, S79, S91), and when it is confirmed that the contrast value at the designated position is written in the memory, the focus lens is moved to the next designated position without obtaining the contrast value at the designated position (36, 40, 42, S63, S75, S89) is an adjustment method for the automatic focus adjustment device. Since the operation and effect of the ninth aspect of the invention are the same as those of the fifth aspect of the invention, they are omitted.

請求項10の発明は、請求項8または9記載の自動焦点調節装置の調節方法において、フォーカスレンズを第1方向および第2方向のいずれかに移動させているときにフォーカスレンズの位置情報を所定の時間間隔で検出し(36、44)、および位置情報に基づき、フォーカスレンズの移動を制御する(36、S15、S25、S43、S53、S63、S75、S89)ことをさらに備える、自動焦点調節装置の調節方法である。この請求項10の発明の作用および効果は、請求項6の発明の作用および効果と同一なので省略する。   According to a tenth aspect of the present invention, in the adjustment method of the automatic focus adjustment apparatus according to the eighth or ninth aspect, the position information of the focus lens is predetermined when the focus lens is moved in either the first direction or the second direction. Auto focus adjustment further comprising detecting at a time interval of (36, 44) and controlling movement of the focus lens (36, S15, S25, S43, S53, S63, S75, S89) based on the position information. This is a method for adjusting the apparatus. Since the operation and effect of the invention of claim 10 are the same as those of the invention of claim 6, they are omitted.

請求項11の発明は、請求項8ないし10のいずれかに記載の自動焦点調節装置の調節方法において、被写体のプレビュー画像をディスプレイ(24)に表示し(36、S37)、およびフォーカスレンズの移動開始前からフォーカスレンズの合焦位置への移動終了までプレビュー画像をディスプレイに表示しないようにする(36、S1)ことをさらに備える、自動焦点調節装置の調節方法である。この請求項11の発明の作用および効果は、請求項7の発明の作用および効果と同一なので省略する。   According to an eleventh aspect of the present invention, in the adjustment method of the automatic focusing apparatus according to any one of the eighth to tenth aspects, a preview image of the subject is displayed on the display (24) (36, S37), and the focus lens is moved. This is an adjustment method for the automatic focus adjustment device, further comprising preventing the preview image from being displayed on the display from the start to the end of the movement of the focus lens to the in-focus position (36, S1). Since the operation and effect of the invention of claim 11 are the same as those of the invention of claim 7, they are omitted.

この発明によれば、少なくとも2個以上先の指定位置までフォーカスレンズを移動させるので、フォーカスレンズの移動後の停止位置と目標とする指定位置との誤差を小さくすることができる。したがって、各指定位置でより正確な被写体のコントラスト値を求めることができるので、被写体のより正確な合焦位置を求めることができる。   According to the present invention, since the focus lens is moved to at least two or more specified positions ahead, the error between the stop position after the focus lens is moved and the target specified position can be reduced. Accordingly, a more accurate subject contrast value can be obtained at each designated position, and thus a more accurate in-focus position of the subject can be obtained.

この発明の上述の目的、その他の目的、特徴および利点は、図面を参照して行う以下の実施例の詳細な説明から一層明らかとなろう。   The above object, other objects, features, and advantages of the present invention will become more apparent from the following detailed description of embodiments with reference to the drawings.

図1を参照して、この発明の第1実施例の携帯端末に内蔵されるカメラ制御回路10は、光学ユニット12を含み、光学ユニット12内にはフォーカスレンズ14が設けられている。被写体の光学像は、フォーカスレンズ14を通してCCD16の受光面に投影される。CCD16の受光面では、光電変換によって被写体の光学像に対応する電荷すなわち画像信号が生成される。生成された画像信号は、A/D変換回路18でデジタルデータである画像データに変換された後、画像信号処理回路20に与えられる。画像信号処理回路20は、与えられた画像データに白バランス調整、色分離、ガンマ補正、YUV変換の一連の処理を施し、YUV形式の画像データ(YUV画像データ)を生成する。生成されたYUV画像データは、バッファメモリ22に取り込まれた後、液晶ディスプレイ24にプレビュー画像として表示される。   Referring to FIG. 1, a camera control circuit 10 built in a portable terminal according to a first embodiment of the present invention includes an optical unit 12, and a focus lens 14 is provided in the optical unit 12. The optical image of the subject is projected onto the light receiving surface of the CCD 16 through the focus lens 14. On the light receiving surface of the CCD 16, a charge corresponding to the optical image of the subject, that is, an image signal is generated by photoelectric conversion. The generated image signal is converted into image data which is digital data by the A / D conversion circuit 18 and then applied to the image signal processing circuit 20. The image signal processing circuit 20 performs a series of processes of white balance adjustment, color separation, gamma correction, and YUV conversion on the given image data, and generates YUV image data (YUV image data). The generated YUV image data is taken into the buffer memory 22 and then displayed on the liquid crystal display 24 as a preview image.

また、記録再生処理回路26は、バッファメモリ22からYUV画像データを取り込み、取り込んだYUV画像データを記録メモリ28に書き込んだり、記録メモリ28からYUV画像データを読み出して被写体の画像を液晶ディスプレイ24に表示したりする。   The recording / reproducing processing circuit 26 takes in the YUV image data from the buffer memory 22, writes the fetched YUV image data into the recording memory 28, reads out the YUV image data from the recording memory 28, and puts the subject image on the liquid crystal display 24. Or display.

CCD16から出力された画像信号は、ハイパスフィルタ(HPF)30にも与えられる。ハイパスフィルタ30は、画像信号の輝度信号から高周波成分を抽出し、抽出した高周波成分をA/D変換回路32に与える。A/D変換回路32は、高周波成分をアナログ信号からデジタルデータに変換した後、オートフォーカス信号検出回路34に与える。オートフォーカス信号検出回路34は、デジタルデータに変換された高周波成分からコントラスト値を求める。具体的には高周波成分の絶対値を取って、そのピークを検出する。求められたコントラスト値は、コンピュータ36に与えられてメモリ38に書き込まれる。ここで、輝度信号の高周波成分を用いて合焦状態を検出するのは以下の理由による。すなわち、合焦状態で取り込まれた画像は、非合焦状態で取り込まれた画像に比べて、隣接する画素間の輝度差が大きいため、輝度信号に高周波成分が多く含まれている。このため、輝度信号に含まれる高周波成分を評価すれば、合焦状態を評価できるからである。なお、この実施例ではハイパスフィルタ30を用いたが、撮影ターゲットによってはバンドパスフィルタ(BPS)を用いることができる。   The image signal output from the CCD 16 is also given to a high pass filter (HPF) 30. The high pass filter 30 extracts a high frequency component from the luminance signal of the image signal, and supplies the extracted high frequency component to the A / D conversion circuit 32. The A / D conversion circuit 32 converts the high-frequency component from an analog signal to digital data, and then gives it to the autofocus signal detection circuit 34. The autofocus signal detection circuit 34 obtains a contrast value from the high frequency component converted into digital data. Specifically, the absolute value of the high frequency component is taken and the peak is detected. The obtained contrast value is given to the computer 36 and written into the memory 38. Here, the focus state is detected using the high-frequency component of the luminance signal for the following reason. That is, an image captured in a focused state has a larger luminance difference between adjacent pixels than an image captured in an out-of-focus state, so that a high-frequency component is included in the luminance signal. For this reason, if the high frequency component contained in the luminance signal is evaluated, the in-focus state can be evaluated. Although the high-pass filter 30 is used in this embodiment, a band-pass filter (BPS) can be used depending on the imaging target.

メモリ38には、合焦状態を検出するために必要なコントラスト値を求める指定位置およびそれらの移動順序だけでなく、フォーカスレンズ14の移動方向および移動距離に応じた加速時および減速時のリニアモータ42の駆動制御プログラム(以下「移動プロファイル」という)も書き込まれている。   In the memory 38, linear motors at the time of acceleration and deceleration according to the moving direction and moving distance of the focus lens 14 as well as the designated positions for obtaining the contrast value necessary for detecting the in-focus state and the movement order thereof. 42 drive control programs (hereinafter referred to as “movement profiles”) are also written.

したがって、コンピュータ36は、コントラスト値を求める指定位置、それらの移動順序および移動プロファイルをメモリ38から読み出す。そして、読み出した移動プロファイルに基づき、モータ駆動回路40を制御して光学ユニット12内に設けられたリニアモータ42を駆動することによって、フォーカスレンズ14をあらかじめ設定された順序に従って、設定された指定位置に移動させる。また、コンピュータ36は、各指定位置で求めたコントラスト値をメモリ38から読み出し、それらの中から最大のコントラスト値を選定する。そして、モータ駆動回路40を制御してリニアモータ42を駆動することにより、最大のコントラスト値を示す指定位置、すなわち合焦位置にフォーカスレンズ14を移動させる。また、光学ユニット12内には、移動中のフォーカスレンズ14の位置情報を検出してコンピュータ36に与える位置センサ44も設けられている。   Therefore, the computer 36 reads the designated positions for obtaining the contrast value, their movement order, and the movement profile from the memory 38. Then, based on the read movement profile, the motor driving circuit 40 is controlled to drive the linear motor 42 provided in the optical unit 12, so that the focus lens 14 is set according to a preset order. Move to. Further, the computer 36 reads the contrast value obtained at each designated position from the memory 38 and selects the maximum contrast value from them. Then, by controlling the motor drive circuit 40 to drive the linear motor 42, the focus lens 14 is moved to a designated position showing the maximum contrast value, that is, a focus position. In addition, a position sensor 44 that detects position information of the moving focus lens 14 and supplies the position information to the computer 36 is also provided in the optical unit 12.

次に、図2を参照して、カメラ制御回路10に含まれている光学ユニット12の構成について説明する。光学ユニット12は、光軸50方向に延びる円筒状のレンズホルダ52を含み、フォーカスレンズ14はこのレンズホルダ52内に収納されている。レンズホルダ52の下部にはフォーカスレンズ14を支える支持台54が設けられ、フォーカスレンズ14の光軸50と平行に設けられたシャフト56が支持台54を貫通している。このため、支持台54はシャフト56に沿って左右に動くことができ、それに伴ってフォーカスレンズ14もレンズホルダ52内を光軸50方向に左右に移動することができる。なお、図2では、1組のシャフト56および支持台54しか図示されていないが、このシャフト56と平行にもう1組のシャフト56と支持台54が紙面の裏側に設けられている。この裏側に設けられたシャフト56もフォーカスレンズ14を支える支持台54を貫通している。このため、フォーカスレンズ14は2組のシャフト56および支持台54によって安定して光軸50方向に左右に移動することができる。   Next, the configuration of the optical unit 12 included in the camera control circuit 10 will be described with reference to FIG. The optical unit 12 includes a cylindrical lens holder 52 extending in the direction of the optical axis 50, and the focus lens 14 is accommodated in the lens holder 52. A support base 54 that supports the focus lens 14 is provided below the lens holder 52, and a shaft 56 that is provided in parallel with the optical axis 50 of the focus lens 14 passes through the support base 54. For this reason, the support base 54 can move to the left and right along the shaft 56, and the focus lens 14 can also move to the left and right in the direction of the optical axis 50 in the lens holder 52. In FIG. 2, only one set of shaft 56 and support base 54 is shown, but another set of shaft 56 and support base 54 is provided on the back side of the sheet in parallel with this shaft 56. The shaft 56 provided on the back side also penetrates the support base 54 that supports the focus lens 14. For this reason, the focus lens 14 can be stably moved left and right in the direction of the optical axis 50 by the two sets of the shaft 56 and the support base 54.

レンズホルダ52の上面には駆動コイル42aが取り付けられている。筺体58に固定されたヨーク60と駆動コイル42aとの間にはマグネット42bが設けられ、駆動コイル42aとマグネット42bによりリニアモータ42を構成している。この駆動コイル42aに駆動電流を供給すれば、マグネット42bによって形成された磁界と、駆動コイル42aに流れる電流との相互作用によって、光軸50に平行な駆動力が駆動コイル42aに生じる。このため、フォーカスレンズ14をシャフト56に沿って左右に移動させることができる。レンズホルダ52の上面にはフォトインタラプタ等からなる位置センサ44も設けられている。位置センサ44は、フォーカスレンズ14の位置情報を検出し、検出したフォーカスレンズ14の位置情報を所定の時間間隔でコンピュータ36に与えている。   A drive coil 42 a is attached to the upper surface of the lens holder 52. A magnet 42b is provided between the yoke 60 fixed to the housing 58 and the drive coil 42a, and the linear motor 42 is constituted by the drive coil 42a and the magnet 42b. When a drive current is supplied to the drive coil 42a, a drive force parallel to the optical axis 50 is generated in the drive coil 42a due to the interaction between the magnetic field formed by the magnet 42b and the current flowing through the drive coil 42a. For this reason, the focus lens 14 can be moved left and right along the shaft 56. A position sensor 44 made of a photo interrupter or the like is also provided on the upper surface of the lens holder 52. The position sensor 44 detects position information of the focus lens 14 and provides the detected position information of the focus lens 14 to the computer 36 at predetermined time intervals.

被写体の光学像は、フォーカスレンズ14を通してCCD16の受光面に投影され、受光面で光電変換によって被写体の光学像に対応する電荷に変換されて、画像信号が生成される。また、フォーカスレンズ14とCCD16との間には紫外線をカットする光学フィルタ62が設けられている。   The optical image of the subject is projected onto the light receiving surface of the CCD 16 through the focus lens 14, and is converted into charges corresponding to the optical image of the subject by photoelectric conversion on the light receiving surface, thereby generating an image signal. An optical filter 62 that cuts off ultraviolet rays is provided between the focus lens 14 and the CCD 16.

次に、図3を参照して、フォーカスレンズ14を指定位置P0から指定位置P5に移動させるとき、リニアモータ42に供給する駆動電流およびフォーカスレンズ14の移動速度について説明する。ここで、指定位置P0から指定位置P5までの各指定位置は直線上に等間隔で配置されている。   Next, the drive current supplied to the linear motor 42 and the moving speed of the focus lens 14 when the focus lens 14 is moved from the specified position P0 to the specified position P5 will be described with reference to FIG. Here, the designated positions from the designated position P0 to the designated position P5 are arranged on the straight line at equal intervals.

最初の指定位置P0から目標とする指定位置P5に到達する手前までリニアモータ42に一定の大きさの電流を供給し、指定位置P5の手前で逆方向の電流をパルス的に供給して移動速度を急激にゼロにする。   A constant current is supplied to the linear motor 42 from the first designated position P0 to just before reaching the target designated position P5, and a reverse current is supplied in pulses before the designated position P5. Is rapidly reduced to zero.

このような駆動電流をリニアモータ42に流すと、フォーカスレンズ14の移動速度は、ゼロから徐々に増加して、例えば指定位置P1付近で一定となる。その後、一定の速度で指定位置P5の手前まで移動する。一定の速度で移動しているとき、位置センサ44によって所定の時間間隔でフォーカスレンズ14の位置情報を検出している。コンピュータ36は、位置センサ44から与えられたフォーカスレンズ14の位置情報に基づいて、フォーカスレンズ14が指定位置P5の手前に来たことを検知すると、今までとは逆方向の駆動電流をパルス的にリニアモータ42に供給する。この結果、フォーカスレンズ14の移動速度が急激に減少して指定位置P5で停止する。   When such a drive current is passed through the linear motor 42, the moving speed of the focus lens 14 gradually increases from zero and becomes constant near the designated position P1, for example. Thereafter, the robot moves to a position before the designated position P5 at a constant speed. When moving at a constant speed, the position information of the focus lens 14 is detected by the position sensor 44 at predetermined time intervals. When the computer 36 detects that the focus lens 14 has come before the specified position P5 based on the position information of the focus lens 14 given from the position sensor 44, the drive current in the direction opposite to that in the past is pulsed. To the linear motor 42. As a result, the moving speed of the focus lens 14 rapidly decreases and stops at the designated position P5.

従来のように、フォーカスレンズ14を指定位置P0から指定位置P1まで移動させて停止させ、次に指定位置P1から指定位置P2まで移動させて停止させるというようにして、隣接する指定位置に順次停止させる場合と異なり、指定位置P0から指定位置P5まで途中で停止させることなく移動させるので移動速度が一定の時間を長くでき、さらにフォーカスレンズ14の移動中にその位置情報を位置センサ44によって正確に知ることができる。この結果、高速のコンピュータを用いなくても加速時間および減速時間の時間制御および出力制御が容易になり、また割り込みのオーバヘッドがあってもリニアモータの制御に影響を与えないので、フォーカスレンズ14の停止位置と目標とする指定位置P5との誤差を小さくすることができる。   As in the prior art, the focus lens 14 is moved from the designated position P0 to the designated position P1 and stopped, and then moved from the designated position P1 to the designated position P2 to be stopped. Unlike the case where the focus lens 14 is moved, it can be moved from the designated position P0 to the designated position P5 without stopping on the way, so that the moving speed can be increased for a certain period of time. I can know. As a result, the time control and output control of the acceleration time and the deceleration time are facilitated without using a high-speed computer, and even if there is an interruption overhead, the control of the linear motor is not affected. The error between the stop position and the target designated position P5 can be reduced.

図4を参照して、指定位置P0から指定位置P9まで指定位置が10個、すなわち偶数個ある場合について、フォーカスレンズ14の移動方法を説明する。前に進むときには現在の指定位置よりも指定位置5個分だけ右方向(プラス方向)に移動させ、後ろに戻るときには現在の指定位置よりも指定位置4個分だけ左方向(マイナス方向)に移動させるようにした場合について、フォーカスレンズ14の動きを示す。ここで、指定位置P0から指定位置P9までの距離はフォーカスレンズ14の駆動距離に相当し、その間に配置された指定位置P1から指定位置P8までの各指定位置は直線上に等間隔に配置されている。   With reference to FIG. 4, a method of moving the focus lens 14 in the case where there are ten designated positions, that is, an even number, from the designated position P0 to the designated position P9 will be described. When moving forward, move 5 specified positions to the right (plus) from the current specified position, and when moving backward, move 4 specified positions to the left (minus) from the current specified position The movement of the focus lens 14 is shown for the case where it is made to do so. Here, the distance from the designated position P0 to the designated position P9 corresponds to the driving distance of the focus lens 14, and the designated positions from the designated position P1 to the designated position P8 arranged therebetween are arranged on the straight line at equal intervals. ing.

まず、第1ステップで指定位置P0のコントラスト値を求めた後(白丸で表示、以下同じ)、第2ステップで指定位置P0から指定位置P5まで指定位置5個分だけ右方向に進み、指定位置P5のコントラスト値を求める。第3ステップでは、指定位置P5から指定位置P1まで指定位置4個分だけ左方向に戻り、指定位置P1のコントラスト値を求める。第4ステップでは、指定位置P1から指定位置P6まで指定位置5個分だけ右方向に進み、指定位置P6のコントラスト値を求める。以下同様にして、フォーカスレンズ14は前進と後退を交互に繰り返しながら、第10ステップで指定位置P9に到達し、指定位置P9のコントラスト値を求める。この動作により、フォーカスレンズは指定位置P0から指定位置P9のすべての指定位置に1回ずつ停止するので、すべての指定位置でのコントラスト値を求めることができる。   First, after obtaining the contrast value of the designated position P0 in the first step (displayed by a white circle, the same applies hereinafter), in the second step, the designated position P0 is advanced to the right by five designated positions from the designated position P0 to the designated position. The contrast value of P5 is obtained. In the third step, the designated position P5 returns to the left by four designated positions from the designated position P1 to obtain the contrast value at the designated position P1. In the fourth step, the process proceeds rightward by five designated positions from the designated position P1 to the designated position P6, and the contrast value at the designated position P6 is obtained. Similarly, the focus lens 14 reaches the designated position P9 in the tenth step while alternately repeating the forward movement and the backward movement, and obtains the contrast value of the designated position P9. With this operation, the focus lens stops once at all the designated positions from the designated position P0 to the designated position P9, so that the contrast values at all the designated positions can be obtained.

次に、指定位置P0から指定位置P9の各指定位置のコントラスト値同士を比較し、コントラスト値が最大となる指定位置を確定する。このコントラスト値が最大となる指定位置が合焦位置であるので、リニアモータ42を駆動してフォーカスレンズ14をその合焦位置に移動させて、フォーカスレンズ14を被写体に合焦させる。   Next, the contrast values at the designated positions from the designated position P0 to the designated position P9 are compared, and the designated position with the maximum contrast value is determined. Since the designated position where the contrast value is maximized is the focus position, the linear motor 42 is driven to move the focus lens 14 to the focus position, and the focus lens 14 is focused on the subject.

次に、コンピュータ36は、図5および図6に示すフローに従ってフォーカスレンズ14を移動させて、各指定位置のコントラスト値を求め、合焦位置にフォーカスレンズ14を移動させる処理を実行する。まず、ステップS1では、プレビュー表示をオフする。この結果、液晶ディスプレイ24には被写体のプレビュー画像が表示されなくなる。このようにプレビュー表示をオフするのは、合焦位置を求めるためにフォーカスレンズ14を前後に大きく移動させると、それにつれて液晶ディスプレイ24に表示される被写体の画像も短時間の内に大きくなったり小さくなったりすることを繰り返すので、ユーザが液晶ディスプレイ24の画面を注視して気分が悪くなることを防止するためである。   Next, the computer 36 moves the focus lens 14 according to the flow shown in FIGS. 5 and 6 to obtain the contrast value at each designated position, and executes processing for moving the focus lens 14 to the in-focus position. First, in step S1, the preview display is turned off. As a result, the preview image of the subject is not displayed on the liquid crystal display 24. The preview display is turned off as described above. When the focus lens 14 is moved back and forth in order to obtain the in-focus position, the image of the subject displayed on the liquid crystal display 24 is increased in a short time. This is to prevent the user from feeling uneasy by gazing at the screen of the liquid crystal display 24 because it repeatedly decreases.

ステップS3で、メモリ38に書き込まれている合焦状態を検出する指定位置、コントラスト値を求めるために移動する指定位置の順序、および移動プロファイルを読み出す。ステップS5で変数nをゼロとし、ステップS7で、リニアモータ42を駆動してフォーカスレンズ14を原点である指定位置P0に移動させる。このとき、コンピュータ36は、所定の時間間隔で位置センサ44から与えられる位置情報に基づいてフォーカスレンズ14の現在の位置を把握しながら、リニアモータ42に流れる電流を制御して、指定位置P0にフォーカスレンズ14を停止させる。ステップS9で、フォーカスレンズ14を通して得られた被写体の画像信号からハイパスフィルタ30によって求めた高周波成分をA/D変換した後、指定位置P0のコントラスト値を求める。そして、ステップS11で、指定位置P0でのコントラスト値をメモリ38に書き込む。   In step S3, the designated position for detecting the in-focus state written in the memory 38, the order of the designated positions for obtaining the contrast value, and the movement profile are read out. In step S5, the variable n is set to zero. In step S7, the linear motor 42 is driven to move the focus lens 14 to the designated position P0 that is the origin. At this time, the computer 36 grasps the current position of the focus lens 14 based on the position information given from the position sensor 44 at predetermined time intervals, and controls the current flowing through the linear motor 42 to the designated position P0. The focus lens 14 is stopped. In step S9, the high-frequency component obtained by the high-pass filter 30 from the subject image signal obtained through the focus lens 14 is A / D converted, and then the contrast value at the designated position P0 is obtained. In step S11, the contrast value at the designated position P0 is written in the memory 38.

ステップS13では変数nを(n+5)とし、ステップS15では、リニアモータ42を駆動してフォーカスレンズ14を指定位置5個分だけ右方向に進ませて、指定位置Pnに移動させる。なお、この実施例では、変数nは3以上の整数である。ステップS17では、ステップS9の場合と同様にして被写体の画像信号から指定位置Pnのコントラスト値を求める。そして、ステップS19で、指定位置Pnのコントラスト値をメモリ38に書き込む。ステップS21で、変数nが9か否かを判定する。“YES”と判定した場合は後述する。一方、“NO”と判定した場合、すなわち変数nが9でない場合は、フォーカスレンズ14がまだ最後の指定位置である位置P9に到達していないので、ステップS23に進む。   In step S13, the variable n is set to (n + 5), and in step S15, the linear motor 42 is driven to move the focus lens 14 rightward by five designated positions and move to the designated position Pn. In this embodiment, the variable n is an integer of 3 or more. In step S17, the contrast value at the designated position Pn is obtained from the image signal of the subject in the same manner as in step S9. In step S19, the contrast value at the designated position Pn is written in the memory 38. In step S21, it is determined whether or not the variable n is 9. The case where “YES” is determined will be described later. On the other hand, if it is determined as “NO”, that is, if the variable n is not 9, the focus lens 14 has not yet reached the position P9 which is the last designated position, and the process proceeds to step S23.

次に、ステップS23で、変数nを(n−4)とし、ステップS25では、リニアモータ42を駆動してフォーカスレンズ14を指定位置4個分だけ左方向に後退させて、指定位置Pnに移動させる。そして、ステップS27では、ステップS9の場合と同様にして被写体の画像信号から指定位置Pnのコントラスト値を求める。ステップS29では、指定位置Pnのコントラスト値をメモリ38に書き込んだ後、ステップS13に戻る。   Next, in step S23, the variable n is set to (n-4). In step S25, the linear motor 42 is driven to move the focus lens 14 backward by four designated positions and move to the designated position Pn. Let In step S27, the contrast value at the designated position Pn is obtained from the image signal of the subject in the same manner as in step S9. In step S29, the contrast value at the designated position Pn is written in the memory 38, and the process returns to step S13.

ステップS21で、“YES”と判定されたとき、すなわちフォーカスレンズ14が最後の指定位置P9に到達したと判定されたときステップS31に進む。ステップS31では、ステップS9、ステップS17およびステップS27で求めた、指定位置P0から指定位置P9のすべての指定位置のコントラスト値をメモリ38から読み出す。ステップS33では、読み出されたコントラスト値同士を比較してその中から最大のコントラスト値を選定し、最大のコントラスト値を示す指定位置を確定する。ステップS35では、リニアモータ42を駆動して確定された指定位置にフォーカスレンズ14を移動する。この結果、フォーカスレンズ14を合焦位置に移動させることができたので、ステップS1でオフにしたプレビュー表示を終了するため、ステップS37でプレビュー表示をオンし、画像信号処理回路20から出力される被写体のプレビュー画像を、バッファメモリ22を介して液晶ディスプレイ24に表示する。その後、オートフォーカス制御動作を終了する。   If “YES” is determined in the step S21, that is, if it is determined that the focus lens 14 has reached the last designated position P9, the process proceeds to a step S31. In step S31, the contrast values of all the specified positions from the specified position P0 to the specified position P9 obtained in steps S9, S17, and S27 are read from the memory 38. In step S33, the read contrast values are compared with each other to select the maximum contrast value, and the designated position indicating the maximum contrast value is determined. In step S35, the focus lens 14 is moved to the designated position determined by driving the linear motor 42. As a result, since the focus lens 14 can be moved to the in-focus position, the preview display turned on in step S37 and output from the image signal processing circuit 20 to end the preview display turned off in step S1. A preview image of the subject is displayed on the liquid crystal display 24 via the buffer memory 22. Thereafter, the autofocus control operation is terminated.

この実施例では、前進する場合は常に指定位置5個分だけ右方向に進み、後退する場合は常に指定位置4個分だけ左方向に戻る。このように、コントラスト値を求める指定位置間に複数の指定位置が含まれているので、フォーカスレンズ14の移動距離が長くなる。このため、リニアモータ42によるフォーカスレンズ14を加速/減速する時間、およびリニアモータ42の出力の制御が容易となり、コンピュータ36の能力が低くてもフォーカスレンズ14の停止位置と目標とする指定位置との誤差を小さくすることができる。したがって、各指定位置でより正確な被写体のコントラスト値を求めることができ、ひいては被写体のより正確な合焦位置を求めることができる。   In this embodiment, when moving forward, the vehicle always moves right by 5 designated positions, and when moving backward, it always moves left by 4 specified positions. As described above, since a plurality of designated positions are included between the designated positions for obtaining the contrast value, the moving distance of the focus lens 14 becomes long. Therefore, it becomes easy to control the time to accelerate / decelerate the focus lens 14 by the linear motor 42 and the output of the linear motor 42, and the stop position of the focus lens 14 and the target designated position can be controlled even if the computer 36 has low capability. The error can be reduced. Accordingly, it is possible to obtain a more accurate contrast value of the subject at each designated position, and thus a more accurate in-focus position of the subject.

また、前進および後退の移動量はそれぞれ一定であるため、移動プロファイルを前進と後退の場合について、それぞれ1種類ずつ準備すればよいので、コンピュータ36の負担を軽減することができる。   Further, since the forward and backward movement amounts are constant, it is only necessary to prepare one type of movement profile for each of forward and backward movements, so that the burden on the computer 36 can be reduced.

この実施例では、フォーカスレンズ14は、指定位置P0から指定位置P9までの10個、すなわち偶数個(2n個)の指定位置に停止する。したがって、nを3以上の整数とするとき、前進する場合は指定位置n個分だけ右方向に進み、後退する場合は指定位置(n−1)個分だけ左方向に戻ることを交互に繰り返すことにより、フォーカスレンズ14はすべての指定位置に1回だけ停止して、すべての指定位置でコントラスト値を求めることができる。このため、すべての指定位置のコントラスト値を効率的に求めることができる。   In this embodiment, the focus lens 14 stops at ten designated positions from the designated position P0 to the designated position P9, that is, even (2n) designated positions. Therefore, when n is an integer greater than or equal to 3, when moving forward, it proceeds to the right by n specified positions, and when moving backward, it returns alternately to the left by specified positions (n-1). As a result, the focus lens 14 can be stopped only once at all designated positions, and the contrast value can be obtained at all designated positions. For this reason, the contrast values of all the designated positions can be obtained efficiently.

なお、移動量は、指定位置n個分と指定位置(n−1)個分の組合せに限定されず、例えば指定位置(n+1)個分と指定位置(n−1)個分、指定位置(n−1)個分と指定位置(n−2)個分等、右方向への移動量と左方向への移動量がいずれも指定位置2個分以上であればよい。また、前進と後退を交互に繰り返す必要はなく、複数回前進した後に後退してもよく、逆に前進した後に複数回後退してもよい。ただし、移動量の組合せによっては、フォーカスレンズ14が停止しない指定位置があったり、同じ指定位置に複数回停止したりする場合が生じる。この同じ指定位置に複数回停止した場合の取り扱いについては、後述する第3実施例で説明する。   Note that the movement amount is not limited to the combination of n designated positions and (n-1) designated positions. For example, the movement amount is designated by (n + 1) designated positions (n-1), designated positions ( It is sufficient that the amount of movement in the right direction and the amount of movement in the left direction are equal to or more than two designated positions, such as n-1) pieces and designated positions (n-2) pieces. Further, it is not necessary to alternately repeat the forward movement and the backward movement. The forward movement and the backward movement may be performed after a plurality of forward movements, or the reverse movement may be performed after the forward movement. However, depending on the combination of movement amounts, there may be a designated position where the focus lens 14 does not stop, or it may stop several times at the same designated position. Handling in the case of stopping at the same designated position a plurality of times will be described in a third embodiment to be described later.

次に、この発明の第2実施例について説明する。第2実施例の場合も、第1実施例の説明で使用した図1のカメラ制御回路10の構成、図2の光学ユニット12の構成および図3の図解図は同じであるため、第2実施例の説明ではそれらの図およびその説明を省略する。   Next explained is the second embodiment of the invention. Also in the case of the second embodiment, the configuration of the camera control circuit 10 of FIG. 1 used in the description of the first embodiment, the configuration of the optical unit 12 of FIG. 2, and the illustration of FIG. In the explanation of the examples, those figures and the explanation thereof are omitted.

図7を参照して、指定位置P0から指定位置P10までの指定位置が11個、すなわち奇数個ある場合について、フォーカスレンズ14の移動方法を説明する。前に進むときには現在の指定位置よりも指定位置6個分だけ右方向に移動させ、後ろに戻るときには、現在の指定位置よりも指定位置5個分だけ左方向に移動させるようにした場合について、フォーカスレンズ14の動きを示す。ここで、指定位置P0から指定位置P10までの距離はフォーカスレンズ14の駆動距離に相当し、その間に配置された指定位置P1から指定位置P9までの各指定位置は直線上に等間隔に配置されている。   With reference to FIG. 7, a method of moving the focus lens 14 will be described in the case where there are 11 designated positions from the designated position P0 to the designated position P10, that is, an odd number. When moving forward by 6 specified positions from the current specified position when moving forward, and moving left by 5 specified positions from the current specified position when going back, The movement of the focus lens 14 is shown. Here, the distance from the designated position P0 to the designated position P10 corresponds to the drive distance of the focus lens 14, and the designated positions from the designated position P1 to the designated position P9 arranged therebetween are arranged at equal intervals on a straight line. ing.

まず、第11ステップで、指定位置P0のコントラスト値を求めた後、第12ステップで指定位置P0から指定位置P6まで指定位置6個分だけ右方向に進み、指定位置P6のコントラスト値を求める。第13ステップでは、指定位置P6から指定位置P1まで指定位置5個分だけ左方向に戻り、指定位置P1のコントラスト値を求める。第14ステップでは、指定位置P1から指定位置P7まで指定位置6個分だけ右方向に進み、指定位置P7のコントラスト値を求める。以下同様にして、フォーカスレンズ14は前進と後退を交互に繰り返しながら、第21ステップで指定位置P5に到達し、指定位置P5のコントラスト値を求める。この実施例では、フォーカスレンズ14が最後に到達するのは、指定位置P10ではなく、指定位置P5である。このようにして、フォーカスレンズ14は指定位置P0から指定位置P10のすべての指定位置に1回ずつ停止するので、すべての指定位置でのコントラスト値を求めることができる。   First, after obtaining the contrast value at the designated position P0 in the eleventh step, the process proceeds to the right by six designated positions from the designated position P0 to the designated position P6 in the twelfth step to obtain the contrast value at the designated position P6. In the thirteenth step, the designated position P6 returns to the left by five designated positions from the designated position P6 to obtain the contrast value at the designated position P1. In the fourteenth step, the designated position P1 is advanced to the right by 6 designated positions from the designated position P1 to obtain the contrast value at the designated position P7. Similarly, the focus lens 14 reaches the designated position P5 in the 21st step while alternately repeating the forward movement and the backward movement, and obtains the contrast value of the designated position P5. In this embodiment, the focus lens 14 reaches the end not at the specified position P10 but at the specified position P5. In this way, the focus lens 14 stops once at all the designated positions from the designated position P0 to the designated position P10, so that the contrast values at all the designated positions can be obtained.

次に、指定位置P0から指定位置P10の各指定位置のコントラスト値同士を比較し、コントラスト値が最大となる指定位置を確定する。このコントラスト値が最大となる指定位置が合焦位置であるので、リニアモータ42を駆動してフォーカスレンズ14をその合焦位置に移動させ、フォーカスレンズ14を被写体に合焦させる。   Next, the contrast values at the designated positions from the designated position P0 to the designated position P10 are compared with each other, and the designated position having the maximum contrast value is determined. Since the designated position where the contrast value is maximized is the focus position, the linear motor 42 is driven to move the focus lens 14 to the focus position, and the focus lens 14 is focused on the subject.

次に、コンピュータ36は、図8および図9に示すフローに従ってフォーカスレンズ14を移動させて、各指定位置のコントラスト値をもとめ、合焦位置にフォーカスレンズ14を移動させる処理を実行する。最初のステップS1からステップS11までは、図5に示されたステップS1からステップS11と同一であるため、同じ番号を付してその説明を省略する。   Next, the computer 36 moves the focus lens 14 in accordance with the flow shown in FIGS. 8 and 9 to obtain the contrast value at each designated position, and executes processing for moving the focus lens 14 to the in-focus position. Since the first step S1 to step S11 are the same as the step S1 to step S11 shown in FIG. 5, the same numbers are given and the description thereof is omitted.

ステップS41では変数nを(n+6)とし、ステップS43では、リニアモータ42を駆動してフォーカスレンズ14を指定位置6個分だけ右方向に進ませて、指定位置Pnに移動させる。なお、この実施例でも、変数nは3以上の整数である。ステップS45では、ステップS9の場合と同様にして被写体の画像信号から指定位置Pnのコントラスト値を求める。そして、ステップS47で、指定位置Pnのコントラスト値をメモリ38に書き込む。ステップS49で、変数nが5か否かを判定する。“YES”と判定した場合は後述する。一方、“NO”と判定した場合、すなわち変数nが5でない場合は、フォーカスレンズ14がまだ最後の指定位置P5に到達していないので、ステップS51に進む。   In step S41, the variable n is set to (n + 6), and in step S43, the linear motor 42 is driven to move the focus lens 14 rightward by six designated positions and move to the designated position Pn. In this embodiment, the variable n is an integer of 3 or more. In step S45, the contrast value at the designated position Pn is obtained from the image signal of the subject in the same manner as in step S9. In step S47, the contrast value at the designated position Pn is written in the memory 38. In step S49, it is determined whether the variable n is 5. The case where “YES” is determined will be described later. On the other hand, if “NO” is determined, that is, if the variable n is not 5, the focus lens 14 has not yet reached the last designated position P5, and thus the process proceeds to step S51.

次に、ステップS51で、変数nを(n−5)とし、ステップS53では、リニアモータ42を駆動してフォーカスレンズ14を指定位置5個分だけ左方向に後退させ、指定位置Pnに移動させる。そして、ステップS55では、ステップS9の場合と同様にして被写体の画像信号から指定位置Pnのコントラスト値を求める。ステップS57では、指定位置Pnのコントラスト値をメモリ38に書き込んだ後、ステップS41に戻る。   Next, in step S51, the variable n is set to (n-5), and in step S53, the linear motor 42 is driven to move the focus lens 14 backward by five designated positions and move to the designated position Pn. . In step S55, the contrast value at the designated position Pn is obtained from the image signal of the subject in the same manner as in step S9. In step S57, the contrast value at the designated position Pn is written in the memory 38, and the process returns to step S41.

ステップS49で、“YES”と判定されたとき、すなわちフォーカスレンズ14が最後の指定位置P5に到達したと判定されたときステップS59に進む。ステップS59では、ステップS9、ステップS45およびステップS55で求めた、指定位置P0から指定位置P10の各指定位置のコントラスト値をメモリ38から読み出す。   If “YES” is determined in the step S49, that is, if it is determined that the focus lens 14 has reached the last designated position P5, the process proceeds to a step S59. In step S59, the contrast value at each specified position from the specified position P0 to the specified position P10 obtained in steps S9, S45, and S55 is read from the memory 38.

次のステップS33から最後のステップS37までは、図6に示されたステップS33からステップS37と同一であるため、同じ番号を付してその説明を省略する。   Since the next step S33 to the last step S37 are the same as the step S33 to step S37 shown in FIG. 6, the same numbers are given and the description thereof is omitted.

この実施例では、前進する場合は常に指定位置6個分だけ右方向に進み、後退する場合は常に指定位置5個分だけ左方向に戻る。したがって実施例1の場合と同様に、コントラスト値を求める指定位置間に複数の指定位置が含まれているので、フォーカスレンズ14の移動距離が長くなる。このため、リニアモータ42によるフォーカスレンズ14を加速/減速する時間、およびリニアモータ42の出力の制御が容易となり、コンピュータ36の能力が低くてもフォーカスレンズ14の停止位置と目標とする指定位置との誤差を小さくすることができる。したがって、各指定位置でより正確な被写体のコントラスト値を求めることができ、ひいては被写体のより正確な合焦位置を求めることができる。   In this embodiment, when moving forward, it always proceeds rightward by 6 specified positions, and when moving backward, it always returns leftward by 5 specified positions. Accordingly, as in the case of the first embodiment, since a plurality of designated positions are included between designated positions for obtaining the contrast value, the moving distance of the focus lens 14 becomes long. Therefore, it becomes easy to control the time to accelerate / decelerate the focus lens 14 by the linear motor 42 and the output of the linear motor 42, and the stop position of the focus lens 14 and the target designated position can be controlled even if the computer 36 has low capability. The error can be reduced. Accordingly, it is possible to obtain a more accurate contrast value of the subject at each designated position, and thus a more accurate in-focus position of the subject.

また、前進および後退の移動量はそれぞれ一定であるため、移動プロファイルを前進と後退の場合について、それぞれ1種類ずつ準備すればよいので、コンピュータ36の負担を軽減することができる。   Further, since the forward and backward movement amounts are constant, it is only necessary to prepare one type of movement profile for each of forward and backward movements, so that the burden on the computer 36 can be reduced.

また、この実施例では、フォーカスレンズ14は、指定位置P0から指定位置P10までの11個、すなわち奇数個(2n−1)の指定位置に停止する。したがって、nを3以上の整数とするとき、前進する場合は指定位置n個分だけ右方向に進み、後退する場合は指定位置(n−1)個分だけ左方向に戻ることを交互に繰り返すことにより、フォーカスレンズ14はすべての指定位置に1回だけ停止して、すべての指定位置でコントラスト値を求めることができる。このため、コントラストを求める指定位置の個数が奇数の場合も、各指定位置のコントラスト値を効率的に求めることができる。ただし、この場合の最後に到達する指定位置は右端の指定位置ではなく、中央の指定位置である。   In this embodiment, the focus lens 14 stops at eleven, ie, odd (2n-1) designated positions from the designated position P0 to the designated position P10. Therefore, when n is an integer greater than or equal to 3, when moving forward, it proceeds to the right by n specified positions, and when moving backward, it returns alternately to the left by specified positions (n-1). As a result, the focus lens 14 can be stopped only once at all designated positions, and the contrast value can be obtained at all designated positions. For this reason, even when the number of designated positions for obtaining the contrast is an odd number, the contrast value at each designated position can be obtained efficiently. However, the designated position that reaches the end in this case is not the designated position at the right end but the designated position in the center.

なお、移動量は、指定位置n個分と指定位置(n−1)個分の組合せに限定されず、例えば指定位置(n+1)個分と指定位置n個分、指定位置(n−1)個分と指定位置(n−2)個分等、右方向への移動量と左方向への移動量がいずれも指定位置2個分以上であればよい。また、前進と後退を交互に繰り返す必要はなく、複数回前進した後に後退を行ってもよく、逆に前進した後に複数回後退してもよい。ただし、移動量の組合せによっては、フォーカスレンズ14が停止しない指定位置があったり、同じ指定位置に複数回停止したりする場合が生じる。この同じ指定位置に複数回停止した場合の取り扱いについては、後述する第3実施例で説明する。   Note that the movement amount is not limited to the combination of n designated positions and (n-1) designated positions. For example, the movement amount is designated by (n + 1) designated positions, n designated positions, and designated positions (n-1). The amount of movement in the right direction and the amount of movement in the left direction, such as the number of pieces and the number of designated positions (n−2), need only be equal to or more than two designated positions. Further, it is not necessary to alternately repeat the forward movement and the backward movement, and the backward movement may be performed after moving forward a plurality of times, or the reverse movement may be performed a plurality of times after moving forward. However, depending on the combination of movement amounts, there may be a designated position where the focus lens 14 does not stop, or it may stop several times at the same designated position. Handling in the case of stopping at the same designated position a plurality of times will be described in a third embodiment to be described later.

さらに、この発明の第3実施例について説明する。第3実施例の場合も、第1実施例の説明で使用した図1のカメラ制御回路10の構成、図2の光学ユニット12の構成および図3の図解図は同じであるため、第3実施例の説明ではそれらの図およびその説明を省略する。   Furthermore, a third embodiment of the present invention will be described. Also in the case of the third embodiment, the configuration of the camera control circuit 10 of FIG. 1 used in the description of the first embodiment, the configuration of the optical unit 12 of FIG. 2, and the illustration of FIG. In the explanation of the examples, those figures and the explanation thereof are omitted.

図10を参照して、指定位置P0から指定位置P10までの11個の指定位置にフォーカスレンズ14を移動させるときに、第2実施例の場合とは異なり、前に進むときには現在の指定位置から右方向に指定位置3個分ずつ2回に分けてフォーカスレンズ14を移動させる。一方、後ろに戻るときには、第2実施例の場合と同様に、現在の指定位置から指定位置5個分だけ左方向にフォーカスレンズ14を移動させる。ここで、図7の場合と同様に、指定位置P0から指定位置P10までの距離はフォーカスレンズ14の駆動距離に相当し、その間に配置された指定位置P1から指定位置P9までの各指定位置は直線上に等間隔に配置されている。   Referring to FIG. 10, when moving the focus lens 14 to eleven designated positions from the designated position P0 to the designated position P10, unlike the case of the second embodiment, from the current designated position when proceeding forward. The focus lens 14 is moved to the right by dividing it into three designated positions twice. On the other hand, when returning to the back, the focus lens 14 is moved to the left by 5 designated positions from the current designated position, as in the second embodiment. Here, as in FIG. 7, the distance from the designated position P0 to the designated position P10 corresponds to the driving distance of the focus lens 14, and each designated position from the designated position P1 to the designated position P9 arranged therebetween is They are arranged at regular intervals on a straight line.

まず、第31ステップで、指定位置P0でのコントラスト値を求めた後、第32ステップで指定位置P0から指定位置P3まで指定位置3個分だけ右方向に進み、指定位置P3のコントラスト値を求める。第33ステップで、さらに指定位置P3から指定位置P6まで指定位置3個分だけ右方向に進み、指定位置P6のコントラスト値を求める。次に、第34ステップで、指定位置P6から指定位置P1まで指定位置5個分だけ左方向に戻り、指定位置P1のコントラスト値を求める。第35ステップでは、指定位置P1から指定位置P4まで指定位置3個分だけ右方向に進み、指定位置P4のコントラスト値を求める。以下同様にして、フォーカスレンズ14は2回の前進と1回の後退を交互に繰り返しながら、第40ステップで指定位置P3に戻る。   First, after obtaining the contrast value at the designated position P0 in the thirty-first step, the process proceeds to the right by three designated positions from the designated position P0 to the designated position P3 in the thirty-second step to obtain the contrast value at the designated position P3. . In a thirty-third step, the process proceeds further to the right by three designated positions from the designated position P3 to the designated position P6, and the contrast value at the designated position P6 is obtained. Next, in a thirty-fourth step, the process returns to the left by five designated positions from the designated position P6 to the designated position P1, and the contrast value at the designated position P1 is obtained. In a thirty-fifth step, the process proceeds rightward by three designated positions from the designated position P1 to the designated position P4, and the contrast value at the designated position P4 is obtained. Similarly, the focus lens 14 returns to the designated position P3 in the 40th step while alternately repeating two forwards and one backward.

しかし、すでに第32ステップで、フォーカスレンズ14を指定位置P3に移動させて、指定位置P3のコントラスト値を求めている。このため、第40ステップで指定位置P3のコントラスト値を再び求める必要はない(黒丸で表示、以下同じ)。そこで、第41ステップで、指定位置P3から指定位置3個分だけ右方向に進み、指定位置P6に移動する。しかし、指定位置P6のコントラスト値もすでに第33ステップで求めているので、第41ステップでも指定位置P6のコントラスト値を求める必要はない。以下同様にして、第43ステップで移動した指定位置P4のコントラスト値および第44ステップで移動した指定位置P7のコントラスト値も求める必要はない。そして、第45ステップで指定位置P10に進み、指定位置P10のコントラスト値を求める。この動作により、フォーカスレンズ14は指定位置P0から指定位置P10のすべての指定位置に停止するので、すべての指定位置でのコントラスト値を求めることができる。   However, in the thirty-second step, the focus lens 14 is moved to the designated position P3, and the contrast value at the designated position P3 is obtained. For this reason, it is not necessary to obtain the contrast value at the designated position P3 again in the 40th step (displayed by a black circle, the same applies hereinafter). Therefore, in the forty-first step, the robot advances rightward by three designated positions from the designated position P3 and moves to the designated position P6. However, since the contrast value of the designated position P6 has already been obtained in the 33rd step, it is not necessary to obtain the contrast value of the designated position P6 even in the 41st step. Similarly, it is not necessary to obtain the contrast value of the designated position P4 moved in the 43rd step and the contrast value of the designated position P7 moved in the 44th step. In step 45, the process proceeds to the designated position P10, and the contrast value at the designated position P10 is obtained. By this operation, the focus lens 14 stops at all the designated positions from the designated position P0 to the designated position P10, so that the contrast values at all the designated positions can be obtained.

次に、指定位置P0から指定位置P10の各指定位置のコントラスト値同士を比較し、コントラスト値が最大となる指定位置を確定する。このコントラスト値が最大となる指定位置が合焦位置であるので、リニアモータ42を駆動してフォーカスレンズ14をその合焦位置に移動させて、フォーカスレンズ14を被写体に合焦させる。   Next, the contrast values at the designated positions from the designated position P0 to the designated position P10 are compared with each other, and the designated position having the maximum contrast value is determined. Since the designated position where the contrast value is maximized is the focus position, the linear motor 42 is driven to move the focus lens 14 to the focus position, and the focus lens 14 is focused on the subject.

次に、コンピュータ36は、図11〜図13に示すフローに従ってフォーカスレンズ14を移動させて、各指定位置のコントラスト値を求め、合焦位置にフォーカスレンズ14を移動させる処理を実行する。最初のステップS1からステップS11までは、図5に示されたステップS1からステップS11と同一であるため、同じ番号を付してその説明を省略する。   Next, the computer 36 moves the focus lens 14 according to the flow shown in FIGS. 11 to 13 to obtain the contrast value at each designated position, and executes processing for moving the focus lens 14 to the in-focus position. Since the first step S1 to step S11 are the same as the step S1 to step S11 shown in FIG. 5, the same numbers are given and the description thereof is omitted.

ステップS61では変数nを(n+3)とし、ステップS63では、リニアモータ42を駆動してフォーカスレンズ14を指定位置3個分だけ右方向に進ませて、指定位置Pnに移動させる。なお、この実施例では変数nは正の整数である。ステップS65では、指定位置Pnのコントラスト値がすでにメモリ38に書き込まれているか否かを判定する。その結果、“YES”と判定した場合は後述のステップS73に進む。一方、“NO”と判定した場合、すなわち指定位置Pnのコントラスト値がメモリ38に書き込まれていない場合は、ステップS67で、ステップS9の場合と同様にして、被写体の画像信号から指定位置Pnのコントラスト値を求める。そして、ステップS69で、指定位置Pnのコントラスト値をメモリ38に書き込む。ステップS71で、変数nが10か否かを判定する。この判定は、ステップS69でPnのコントラスト値をメモリ38に書き込んだ場合だけ行い、ステップS65で“YES”と判定された場合、変数nは10ではないので行わない。その結果、“YES”と判定した場合は後述ステップS97に進む。一方、“NO”と判定した場合、すなわち変数nが10ではない場合、最後に到達すべき指定位置P10にはまだ到達していないと判定してステップS73に進む。   In step S61, the variable n is set to (n + 3). In step S63, the linear motor 42 is driven to move the focus lens 14 rightward by three designated positions and move to the designated position Pn. In this embodiment, the variable n is a positive integer. In step S65, it is determined whether or not the contrast value at the designated position Pn has already been written in the memory 38. As a result, if "YES" is determined, the process proceeds to step S73 described later. On the other hand, when it is determined as “NO”, that is, when the contrast value at the designated position Pn is not written in the memory 38, in the same manner as in the case of Step S9, in step S67, the image of the designated position Pn is obtained. Find the contrast value. In step S69, the contrast value at the designated position Pn is written in the memory 38. In step S71, it is determined whether or not the variable n is 10. This determination is performed only when the contrast value of Pn is written in the memory 38 in step S69, and when it is determined “YES” in step S65, the variable n is not 10, so it is not performed. As a result, if "YES" is determined, the process proceeds to step S97 described later. On the other hand, if “NO” is determined, that is, if the variable n is not 10, it is determined that the designated position P10 to be reached last is not reached yet, and the process proceeds to step S73.

ステップS73で、再び変数nを(n+3)とし、ステップS75では、リニアモータ42を駆動してフォーカスレンズ14をさらに指定位置3個分だけ右方向に進ませて、指定位置Pnに移動させる。ステップS79では、指定位置Pnのコントラスト値がすでにメモリ38に書き込まれているか否かを判定する。その結果、“YES”と判定した場合は後述のステップS87に進む。一方、“NO”と判定した場合、すなわち指定位置Pnのコントラスト値がメモリ38に書き込まれていない場合は、ステップS81で、ステップS9の場合と同様にして、被写体の画像信号から指定位置Pnのコントラスト値を求める。そして、ステップS83で、指定位置Pnのコントラスト値をメモリ38に書き込む。   In step S73, the variable n is set to (n + 3) again. In step S75, the linear motor 42 is driven to further move the focus lens 14 rightward by three designated positions and move to the designated position Pn. . In step S79, it is determined whether or not the contrast value at the designated position Pn has already been written in the memory 38. As a result, if "YES" is determined, the process proceeds to step S87 described later. On the other hand, when it is determined as “NO”, that is, when the contrast value at the designated position Pn is not written in the memory 38, in the same manner as in step S9, in step S81, the image of the designated position Pn is obtained from the subject image signal. Find the contrast value. In step S83, the contrast value at the designated position Pn is written in the memory 38.

ステップS85で、変数nが10か否かを判定する。この判定は、ステップS83で指定位置Pnのコントラスト値を書き込んだ場合だけ行い、ステップS79で“YES”と判定された場合、変数nは10ではないので行わない。その結果、“YES”と判定した場合は後述する。一方、“NO”と判定した場合、すなわち変数nが10ではない場合、最後に到達すべき指定位置P10にはまだ到達していないと判定してステップS87に進む。   In step S85, it is determined whether the variable n is 10. This determination is performed only when the contrast value at the designated position Pn is written in step S83, and when it is determined “YES” in step S79, the variable n is not 10, so it is not performed. As a result, if “YES” is determined, it will be described later. On the other hand, if “NO” is determined, that is, if the variable n is not 10, it is determined that the designated position P10 to be reached last is not reached yet, and the process proceeds to step S87.

次に、ステップS87では、変数nを(n−5)とし、ステップS89では、リニアモータ42を駆動してフォーカスレンズ14を指定位置5個分だけ左方向に後退させて、指定位置Pnに移動させる。そして、ステップS91では、指定位置Pnのコントラスト値がすでにメモリ38に書き込まれているか否かを判定する。その結果、“YES”と判定した場合は前述のステップS61に戻る。一方、“NO”と判定した場合、すなわち指定位置Pnのコントラスト値がメモリ38に書き込まれていない場合は、ステップS93で、ステップS9の場合と同様にして、被写体の画像信号から指定位置Pnのコントラスト値を求める。そして、ステップS95で、指定位置Pnのコントラスト値をメモリ38に書き込み、ステップS61に戻る。   Next, in step S87, the variable n is set to (n-5), and in step S89, the linear motor 42 is driven to move the focus lens 14 backward by five designated positions and move to the designated position Pn. Let In step S91, it is determined whether or not the contrast value at the designated position Pn has already been written in the memory 38. As a result, if “YES” is determined, the process returns to step S61 described above. On the other hand, if it is determined as “NO”, that is, if the contrast value at the designated position Pn is not written in the memory 38, in the same manner as in step S9, in step S93, the image of the designated position Pn is obtained from the subject image signal. Find the contrast value. In step S95, the contrast value at the designated position Pn is written in the memory 38, and the process returns to step S61.

また、ステップS71およびステップS85において、“YES”と判定された場合、すなわち最後に到達すべき指定位置P10に到達してコントラスト値を求めた場合、ステップS97に進む。ステップS97では、ステップS9、ステップS67、ステップS81およびステップS93で求めた、指定位置P0から指定位置P10のすべての指定位置のコントラスト値をメモリ38から読み出す。   If “YES” is determined in step S71 and step S85, that is, if the contrast value is obtained by reaching the last-specified position P10, the process proceeds to step S97. In step S97, the contrast values of all the specified positions from the specified position P0 to the specified position P10 obtained in steps S9, S67, S81, and S93 are read from the memory 38.

次のステップS33から最後のステップS37までは、図6に示されたステップS33からステップS37と同一であるため、同じ番号を付してその説明を省略する。   Since the next step S33 to the last step S37 are the same as the step S33 to step S37 shown in FIG. 6, the same numbers are given and the description thereof is omitted.

この実施例では、すでにコントラスト値を求めた指定位置にフォーカスレンズ14が再び停止する場合、その指定位置でコントラスト値を再度求めることなく、フォーカスレンズ14を次の指定位置に移動させる。このため、合焦位置を求めるまでの時間を短縮することができる。   In this embodiment, when the focus lens 14 stops again at the designated position where the contrast value has already been obtained, the focus lens 14 is moved to the next designated position without obtaining the contrast value again at the designated position. For this reason, the time until the in-focus position is obtained can be shortened.

また、前進する場合は2回に分けて、それぞれ指定位置3個分だけ右方向に進み、後退する場合は常に指定位置5個分だけ左方向に戻る。このため、コントラスト値を求める指定位置間に複数の指定位置が含まれているので、フォーカスレンズ14の移動距離が長くなる。したがって、リニアモータ42によるフォーカスレンズ14を加速/減速する時間、およびリニアモータ42の出力の制御が容易となり、コンピュータ36の能力が低くてもフォーカスレンズ14の停止位置と目標とする指定位置との誤差を小さくすることができる。   Further, when moving forward, it is divided into two times, each proceeding to the right by three specified positions, and when moving backward, it always returns to the left by five specified positions. For this reason, since a plurality of designated positions are included between the designated positions for obtaining the contrast value, the moving distance of the focus lens 14 becomes long. Therefore, it becomes easy to control the time for accelerating / decelerating the focus lens 14 by the linear motor 42 and the output of the linear motor 42, and the stop position of the focus lens 14 and the target designated position can be controlled even if the computer 36 has low capability. The error can be reduced.

さらに、前進する場合の移動量はいずれも指定位置3個分と同じであるため、前進の
移動プロファイルを共通にすることができる。したがって、必要な移動プロファイルの数を減らすことができるので、コンピュータ36の負担を軽減することができる。しかし、例えば、1回目の前進は指定位置3個分だけ右方向に進み、2回目の前進は指定位置2個分だけ右方向に進むというように、その移動量を変えてもよい。また、前進する場合の移動回数も2回に限らず、3回またはそれ以上であってもよい。さらに、前進する場合だけでなく、後退する場合についても同様に移動量、移動回数を変えてもよい。
Furthermore, since the amount of movement when moving forward is the same as that for three designated positions, the moving profile for forward movement can be made common. Therefore, since the number of necessary movement profiles can be reduced, the burden on the computer 36 can be reduced. However, for example, the amount of movement may be changed such that the first advancement proceeds rightward by three designated positions and the second advancement proceeds right by two designated positions. Further, the number of times of movement when moving forward is not limited to two, and may be three or more. Furthermore, not only when moving forward, but also when moving backward, the amount of movement and the number of movements may be changed.

この発明の第1実施例のカメラ制御回路の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the camera control circuit of 1st Example of this invention. 光学ユニットの構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of an optical unit. リニアモータの駆動電流およびフォーカスレンズの移動速度を示す図解図である。It is an illustration figure which shows the drive current of a linear motor, and the moving speed of a focus lens. 第1実施例におけるフォーカスレンズの移動順序を示す図解図である。It is an illustration figure which shows the movement order of the focus lens in 1st Example. 第1実施例のコンピュータの動作の一部を示すフロー図である。It is a flowchart which shows a part of operation | movement of the computer of 1st Example. 第1実施例のコンピュータの動作の他の一部を示すフロー図である。It is a flowchart which shows a part of other operation | movement of the computer of 1st Example. 第2実施例におけるフォーカスレンズの移動順序を示す図解図である。It is an illustration figure which shows the movement order of the focus lens in 2nd Example. 第2実施例のコンピュータの動作の一部を示すフロー図である。It is a flowchart which shows a part of operation | movement of the computer of 2nd Example. 第2実施例のコンピュータの動作の他の一部を示すフロー図である。It is a flowchart which shows another part of operation | movement of the computer of 2nd Example. 第3実施例におけるフォーカスレンズの移動順序を示す図解図である。It is an illustration figure which shows the movement order of the focus lens in 3rd Example. 第3実施例のコンピュータの動作の一部を示すフロー図である。It is a flowchart which shows a part of operation | movement of the computer of 3rd Example. 第3実施例のコンピュータの動作の他の一部を示すフロー図である。It is a flowchart which shows a part of other operation | movement of the computer of 3rd Example. 第3実施例のコンピュータの動作のその他の一部を示すフロー図である。It is a flowchart which shows a part of others of operation | movement of the computer of 3rd Example.

符号の説明Explanation of symbols

10…カメラ制御回路
16…CCD
24…液晶ディスプレイ
34…オートフォーカス信号検出回路
36…コンピュータ
38…メモリ
40…モータ駆動回路
42…リニアモータ
44…位置センサ
10 ... Camera control circuit 16 ... CCD
24 ... Liquid crystal display 34 ... Autofocus signal detection circuit 36 ... Computer 38 ... Memory 40 ... Motor drive circuit 42 ... Linear motor 44 ... Position sensor

Claims (11)

フォーカスレンズの駆動範囲を等間隔に分割した複数個の指定位置に、リニアモータによって駆動される前記フォーカスレンズを停止させてコントラスト値を求めることにより合焦位置を検出する、自動焦点調節装置において、
前記フォーカスレンズを第1方向の少なくとも2個以上先の前記指定位置まで移動させる第1移動手段、
前記フォーカスレンズを前記第1方向とは逆の第2方向に、少なくとも2個以上先の前記指定位置まで移動させる第2移動手段、
前記指定位置ごとに被写体の画像信号からコントラスト値を求めるコントラスト値取得手段、
前記コントラスト値取得手段によって求められた前記コントラスト値から最大コントラスト値を選定する選定手段、および
前記最大コントラスト値を示す前記指定位置に前記フォーカスレンズを移動させて前記被写体に合焦させる合焦手段を備えることを特徴とする、自動焦点調節装置。
In an automatic focus adjustment apparatus that detects a focus position by stopping the focus lens driven by a linear motor and obtaining a contrast value at a plurality of designated positions obtained by dividing the drive range of the focus lens at equal intervals.
First moving means for moving the focus lens to the designated position at least two or more ahead in the first direction;
Second moving means for moving the focus lens in the second direction opposite to the first direction to the designated position at least two or more ahead;
Contrast value obtaining means for obtaining a contrast value from an image signal of a subject for each designated position;
Selecting means for selecting a maximum contrast value from the contrast value obtained by the contrast value acquiring means; and focusing means for moving the focus lens to the designated position indicating the maximum contrast value to focus on the subject. An automatic focusing device, comprising:
前記第1移動手段と前記第2移動手段とを交互に動作させることによって前記フォーカスレンズを前記第1方向と前記第2方向に交互に移動させる、請求項1記載の自動焦点調節装置。   2. The automatic focus adjustment apparatus according to claim 1, wherein the focus lens is alternately moved in the first direction and the second direction by operating the first movement unit and the second movement unit alternately. 3. 前記第1方向の移動距離はすべて同じ距離であり、前記第2方向の移動距離は前記第1方向の移動プロファイルとは異なるかつすべて同じ距離である、請求項1または2記載の自動焦点調節装置。   3. The automatic focusing apparatus according to claim 1, wherein the moving distances in the first direction are all the same distance, and the moving distances in the second direction are different from the moving profile in the first direction and are all the same distance. . 前記指定位置の個数が奇数(2n−1:nは3以上の整数)のときも偶数(2n:nは3以上の整数)のときも、前記第1方向の移動距離はn個先の前記指定位置までの距離であり、前記第2方向の移動距離は(n−1)個先の前記指定位置までの距離である、請求項3記載の自動焦点調節装置。   Whether the number of designated positions is odd (2n-1: n is an integer greater than or equal to 3) or even (2n: n is an integer greater than or equal to 3), the moving distance in the first direction is n ahead. 4. The automatic focus adjustment apparatus according to claim 3, wherein the distance is a distance to a designated position, and the moving distance in the second direction is a distance to the designated position that is (n−1) ahead. 5. メモリ、
前記コントラスト値取得手段によって求められた前記コントラスト値を前記メモリに書き込む書き込み手段、
前記第1移動手段および前記第2移動手段のいずれかにより前記指定位置に移動後に、前記指定位置の前記コントラスト値が前記メモリに書き込まれているか否かを確認する確認手段、および
前記確認手段によって前記指定位置の前記コントラスト値が前記メモリに書き込まれていることを確認した場合、前記指定位置の前記コントラスト値を求めることなく次の指定位置に前記フォーカスレンズを移動させる第3移動手段をさらに備える、請求項1ないし4のいずれかに記載の自動焦点調節装置。
memory,
Writing means for writing the contrast value obtained by the contrast value obtaining means into the memory;
After moving to the designated position by either the first moving means or the second moving means, confirmation means for confirming whether the contrast value at the designated position is written in the memory, and by the confirmation means When it is confirmed that the contrast value at the designated position is written in the memory, a third moving unit is further provided for moving the focus lens to the next designated position without obtaining the contrast value at the designated position. 5. An automatic focusing apparatus according to any one of claims 1 to 4.
前記第1移動手段および前記第2移動手段のいずれかによって前記フォーカスレンズを移動させているときに前記フォーカスレンズの位置情報を所定の時間間隔で検出する位置検出手段、および
前記位置検出手段によって検出された前記位置情報に基づき、前記第1移動手段および前記第2移動手段を制御する制御手段をさらに備える、請求項1ないし5のいずれかに記載の自動焦点調節装置。
Position detecting means for detecting position information of the focus lens at a predetermined time interval when the focus lens is moved by any one of the first moving means and the second moving means; and detected by the position detecting means. 6. The automatic focus adjusting apparatus according to claim 1, further comprising a control unit that controls the first moving unit and the second moving unit based on the position information that has been set.
ディスプレイ、
前記被写体のプレビュー画像を前記ディスプレイに表示する表示手段、および
前記フォーカスレンズの移動開始前から前記合焦手段による前記フォーカスレンズの移動終了まで前記表示手段を不能化する不能化手段をさらに備える、請求項1ないし6のいずれかに記載の自動焦点調節装置。
display,
Display means for displaying a preview image of the subject on the display; and disabling means for disabling the display means from the start of movement of the focus lens to the end of movement of the focus lens by the focusing means. Item 7. The automatic focusing apparatus according to any one of Items 1 to 6.
フォーカスレンズの駆動範囲を等間隔に分割した複数個の前記指定位置に、リニアモータによって駆動される前記フォーカスレンズを停止させてコントラスト値を求めることにより合焦位置を検出する自動焦点調節装置の調節方法において、
前記フォーカスレンズを第1方向の少なくとも2個以上先の前記指定位置まで移動させ、
前記フォーカスレンズを前記第1方向とは逆の第2方向の少なくとも2個以上先の前記指定位置まで移動させ、
前記指定位置ごとに被写体の画像信号からコントラスト値を求め、
求められた前記コントラスト値から最大コントラスト値を選定し、および
前記最大コントラスト値を示す前記指定位置に前記フォーカスレンズを移動させて前記被写体に合焦させることを特徴とする、自動焦点調節装置の調節方法。
Adjustment of an automatic focus adjustment device that detects a focus position by obtaining a contrast value by stopping the focus lens driven by a linear motor at a plurality of designated positions obtained by dividing the drive range of the focus lens at equal intervals. In the method
Moving the focus lens to the designated position at least two or more points in the first direction;
Moving the focus lens to the specified position at least two or more ahead in a second direction opposite to the first direction;
Obtain a contrast value from the image signal of the subject for each specified position,
An automatic focus adjustment apparatus, wherein a maximum contrast value is selected from the obtained contrast values, and the focus lens is moved to the designated position indicating the maximum contrast value to focus on the subject. Method.
前記コントラスト値をメモリに書き込み、
前記第1方向への移動および前記第2方向への移動のいずれかに基づいて前記フォーカスレンズを前記指定位置に移動後に、前記指定位置の前記コントラスト値が前記メモリに書き込まれているか否かを確認し、および
前記指定位置の前記コントラスト値が前記メモリに書き込まれていることを確認した場合、前記指定位置の前記コントラスト値を求めることなく次の指定位置に前記フォーカスレンズを移動させることをさらに備える、請求項8記載の自動焦点調節装置の調節方法。
Write the contrast value into the memory;
Whether or not the contrast value at the designated position is written in the memory after the focus lens is moved to the designated position based on either the movement in the first direction or the movement in the second direction. And confirming that the contrast value at the designated position is written in the memory, further moving the focus lens to the next designated position without obtaining the contrast value at the designated position. The adjustment method of the automatic focus adjustment apparatus of Claim 8 provided.
前記フォーカスレンズを前記第1方向および前記第2方向のいずれかに移動させているときに前記フォーカスレンズの位置情報を所定の時間間隔で検出し、および
前記位置情報に基づき、前記フォーカスレンズの移動を制御することをさらに備える、請求項8または9記載の自動焦点調節装置の調節方法。
The position information of the focus lens is detected at a predetermined time interval when the focus lens is moved in either the first direction or the second direction, and the focus lens is moved based on the position information. The method of adjusting an automatic focusing apparatus according to claim 8 or 9, further comprising controlling
前記被写体のプレビュー画像をディスプレイに表示し、および
前記フォーカスレンズの移動開始前から前記フォーカスレンズの前記合焦位置への移動終了まで前記プレビュー画像を前記ディスプレイに表示しないようにすることをさらに備える、請求項8ないし10のいずれかに記載の自動焦点調節装置の調節方法。
Further comprising: displaying a preview image of the subject on a display; and not displaying the preview image on the display from the start of movement of the focus lens until the end of movement of the focus lens to the in-focus position. The adjustment method of the automatic focus adjustment apparatus in any one of Claims 8 thru | or 10.
JP2006277161A 2006-10-11 2006-10-11 Automatic focusing device and adjustment method therefor Withdrawn JP2008096610A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006277161A JP2008096610A (en) 2006-10-11 2006-10-11 Automatic focusing device and adjustment method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006277161A JP2008096610A (en) 2006-10-11 2006-10-11 Automatic focusing device and adjustment method therefor

Publications (1)

Publication Number Publication Date
JP2008096610A true JP2008096610A (en) 2008-04-24

Family

ID=39379537

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006277161A Withdrawn JP2008096610A (en) 2006-10-11 2006-10-11 Automatic focusing device and adjustment method therefor

Country Status (1)

Country Link
JP (1) JP2008096610A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104641627A (en) * 2013-09-17 2015-05-20 奥林巴斯株式会社 Shooting apparatus, shooting method and shooting display program
KR20160062936A (en) * 2014-11-26 2016-06-03 에이치디씨 주식회사 Integrated control method of pan tilt zoom focusing of closed circuit television camera

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104641627A (en) * 2013-09-17 2015-05-20 奥林巴斯株式会社 Shooting apparatus, shooting method and shooting display program
KR20160062936A (en) * 2014-11-26 2016-06-03 에이치디씨 주식회사 Integrated control method of pan tilt zoom focusing of closed circuit television camera
KR101698917B1 (en) 2014-11-26 2017-01-23 에이치디씨 주식회사 Integrated control method of pan tilt zoom focusing of closed circuit television camera

Similar Documents

Publication Publication Date Title
US8724012B2 (en) Camera body and camera system using driving method information indicating capability of controlling focus lens
JP4795155B2 (en) Optical device, imaging device, and control method thereof
JP5967544B2 (en) Lens barrel, imaging device, and camera
JP5521786B2 (en) Image processing apparatus, image processing method, and program
CN100376913C (en) Camera, Control method and program for said camera
JP5868109B2 (en) Optical apparatus, lens barrel, and automatic focusing method
JP2009145645A (en) Optical device
JP2011048341A (en) Image capturing apparatus
JP6727453B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND IMAGING DEVICE CONTROL PROGRAM
JP2007133265A (en) Imaging apparatus and imaging method
JP5744501B2 (en) Focus adjustment apparatus, control method thereof, and program
JP2008096610A (en) Automatic focusing device and adjustment method therefor
US10979619B2 (en) Image capturing apparatus capable of highly-accurate autofocus calibration and control method thereof, and storage medium
JP2007060520A (en) Imaging apparatus
JP2882108B2 (en) Auto focus device
JP2002287012A (en) Image pickup device with automatic focusing function
JP2002333568A (en) Imaging device
JPH11136562A (en) Image pickup device
JP2007067827A (en) Imaging apparatus and zoom control method
JP3216285B2 (en) Optical equipment
JP2008294667A (en) Imaging apparatus, and control method, program, and storage medium thereof
JP2013098905A (en) Imaging device and control method of imaging device
JP2006171292A (en) Imaging apparatus
JPH05134163A (en) Focus control device
JPH11275448A (en) Image pickup device and storage medium readable by computer

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20100105