JP2008113237A - Flicker detecting method and device in imaging apparatus - Google Patents

Flicker detecting method and device in imaging apparatus Download PDF

Info

Publication number
JP2008113237A
JP2008113237A JP2006294939A JP2006294939A JP2008113237A JP 2008113237 A JP2008113237 A JP 2008113237A JP 2006294939 A JP2006294939 A JP 2006294939A JP 2006294939 A JP2006294939 A JP 2006294939A JP 2008113237 A JP2008113237 A JP 2008113237A
Authority
JP
Japan
Prior art keywords
flicker
flicker detection
detection
correction
frequency
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
JP2006294939A
Other languages
Japanese (ja)
Inventor
Yusuke Suzuki
裕介 鈴木
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.)
Kyocera Corp
Original Assignee
Kyocera 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 Kyocera Corp filed Critical Kyocera Corp
Priority to JP2006294939A priority Critical patent/JP2008113237A/en
Publication of JP2008113237A publication Critical patent/JP2008113237A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a flicker detecting method and device in an imaging apparatus capable of performing accurate flicker correction by using an imaging apparatus having an image pickup element for storing electric charges in respective pixels arrayed in a matrix as in a CMOS (complementary metal oxide semiconductor) and reading a frame by scanning in a pixel row unit and making it possible to judge whether a detected flicker frequency is correct under any photographing condition. <P>SOLUTION: New flicker detection processing is executed during executing flicker correction processing, when flicker is detected by the new flicker detection processing, a flicker frequency detected during flicker detection processing before executing the new flicker detection processing is judged as erroneous detection, and the frequency judged as erroneous detection is changed to continue the flicker correction processing. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、撮像装置におけるフリッカ検出方法と装置に関わり、特に、個々の撮像素子における画像データとしての電荷の蓄積と読み出しを画素行単位の走査で行う撮像装置を有し、例えば蛍光灯のように、電源周波数に起因して明るさが変化する光源で照明した被写体を撮像したときに画像に生じるフリッカを検出してフリッカ補正を行うと共に、フリッカ検出結果が正しいか否か判定して正しいフリッカ補正を出来るようにした、撮像装置におけるフリッカ検出方法と装置に関するものである。   The present invention relates to a flicker detection method and apparatus in an image pickup apparatus, and in particular, has an image pickup apparatus that stores and reads out charges as image data in individual image pickup elements by scanning in units of pixel rows, such as a fluorescent lamp. In addition, flicker correction is performed by detecting flicker that occurs when an object illuminated by a light source whose brightness changes due to the power supply frequency is captured, and flicker correction is performed, and whether the flicker detection result is correct is determined. The present invention relates to a flicker detection method and apparatus in an image pickup apparatus that can be corrected.

ビデオカメラやデジタルカメラの撮像装置を構成する撮像素子には、従来から、CCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconducter)が用いられている。このうちCMOSを用いた撮像素子は、CCDを用いた撮像素子に較べてLSIと同様の製造プロセスが使用できるために量産性に優れ、増幅器を始め様々な機能を画素毎に設けることも可能で、回路全体のサイズを小さくできると共にコスト的にも有利になる。また、電源が低電圧の単一電源で済み、CCDでは問題となるスミアが無視できるほど小さい上に、データの読み出しが高速に行える等の利点がある。   Conventionally, CCDs (Charge Coupled Devices) and CMOSs (Complementary Metal Oxide Semiconductors) have been used as imaging elements that constitute imaging devices of video cameras and digital cameras. Of these, CMOS-based image sensors can be used in the same manufacturing process as LSIs compared to CCD-based image sensors, making them more mass-productive and providing various functions for each pixel, including amplifiers. The size of the entire circuit can be reduced, and the cost is advantageous. In addition, a single power source with a low voltage is sufficient, and there is an advantage that smear, which is a problem in the CCD, is so small that it can be ignored, and that data can be read at high speed.

しかしながらCMOSを用いた撮像素子は、ノイズが多いということと、マトリクス状に配列された各画素を構成する撮像素子からの撮像データを、CCDとは異なって画素行単位の走査で取り出すため、撮像に際し、電荷露光を行うタイミングがライン毎に異なると共に画像データを時系列に読み出すことになり、走査線ごとに走査に要する時間だけ蓄積時間がずれてしまう、という欠点がある。この欠点のため、CMOSを用いた撮像装置では、高速で動いている被写体を撮像した場合に走査方向に曲がった画像が出力されたり、被写体の照明に、例えば蛍光灯のように電源周波数に起因して明るさが変化する光源を用いた場合、図7に誇張して示したようにフリッカと呼ばれる画像に明暗のある縞模様が発生する。   However, the image pickup device using CMOS has a lot of noise, and the image pickup data from the image pickup device constituting each pixel arranged in a matrix is taken out by scanning in units of pixel rows, unlike the CCD. At this time, the timing of performing the charge exposure is different for each line, and the image data is read in time series, so that the accumulation time is shifted by the time required for scanning for each scanning line. Due to this drawback, in an imaging device using CMOS, when a subject moving at high speed is imaged, an image bent in the scanning direction is output, or the illumination of the subject is caused by the power supply frequency such as a fluorescent lamp. When a light source whose brightness changes is used, a bright and dark striped pattern is generated in an image called flicker as exaggerated in FIG.

このフリッカは、電源周波数によって蛍光灯が1秒間に100回(50Hzの場合)、あるいは120回(60Hzの場合)点滅を繰り返すことにより生じるもので、例えば撮像装置のフレームレートを15回/秒とすると、1フレーム中にこの点滅が50Hzの場合で約6.7回、60Hzの場合は8回起こることになり、各撮像素子における電荷蓄積時間がこの光源の点滅周期の整数倍でない場合、図7に示したような縞模様が画像に発生するわけである。   This flicker occurs when the fluorescent lamp repeats blinking 100 times per second (in the case of 50 Hz) or 120 times (in the case of 60 Hz) depending on the power supply frequency. For example, the frame rate of the imaging device is set to 15 times / second. Then, this blinking occurs in one frame about 6.7 times at 50 Hz, and 8 times at 60 Hz. If the charge accumulation time in each image sensor is not an integral multiple of the blinking period of this light source, The stripe pattern as shown in FIG. 7 is generated in the image.

それに対してCCDでは、光の照射によって同一時刻に蓄積した電荷をそのままの状態で転送機能を用いて増幅器に運ぶため、データ全体の読み出しはCMOSに較べて遅くなるが画面内に明暗のムラが生じるといったことはなく、また、CCD自体の感度がCMOSに対して高い上にノイズも少ない。   On the other hand, in the CCD, since the charge accumulated at the same time by light irradiation is conveyed to the amplifier using the transfer function as it is, the reading of the entire data is slower than the CMOS, but unevenness of light and dark in the screen. It does not occur, the sensitivity of the CCD itself is higher than that of CMOS, and there is little noise.

しかしながら、例えば一眼レフ型のデジタルカメラなどにおいてはセンサのサイズを大きくできるため、感度やノイズの改善が容易である。さらにCMOSを用いた撮像素子は、その高速性によって一眼レフ型のデジタルカメラ等に要求される連写機能を容易に実現することができ、前記したCMOSを用いた撮像素子の利点と相俟って、最近の一眼レフ型デジタルカメラではこのCMOSを用いた撮像素子を備えたものが多くなっている。また、前記したフリッカの問題についても、シャッタ時間、すなわちCMOSにおける個々の撮像素子の電荷蓄積時間を明暗の生じる間隔、すなわち電源周波数による光源の点滅周期の倍数とすることで防ぐことができる。   However, for example, in a single-lens reflex digital camera, the size of the sensor can be increased, so that the sensitivity and noise can be easily improved. Furthermore, an image sensor using CMOS can easily realize the continuous shooting function required for a single-lens reflex digital camera or the like due to its high speed, and this is combined with the advantages of the image sensor using CMOS described above. Many recent single-lens reflex digital cameras are equipped with an image sensor using this CMOS. The above-mentioned flicker problem can also be prevented by setting the shutter time, that is, the charge accumulation time of each image pickup device in the CMOS, to a multiple of the interval of light and dark, that is, the blinking cycle of the light source depending on the power supply frequency.

しかしながら前記したように、フリッカによる縞模様を無くすか目立たないようにするためには、電源周波数に起因する光源の点滅周期を正確に検出する必要がある。こういった技術に関しては例えば特許文献1に、フォトダイオードと100Hzの帯域通過フィルタ、及び全波整流回路とコンパレータとが直列になった回路と、同じフォトダイオードに120Hzの帯域通過フィルタ、及び全波整流回路とコンパレータとが直列になった回路とを用意し、蛍光灯の点滅周期を検知してフリッカを防止するようにした回路が示されている。   However, as described above, it is necessary to accurately detect the blinking cycle of the light source caused by the power supply frequency in order to eliminate or make the stripe pattern due to flicker disappear or inconspicuous. With regard to such technology, for example, Patent Document 1 discloses a circuit in which a photodiode and a 100 Hz band-pass filter and a full-wave rectifier circuit and a comparator are connected in series, a 120 Hz band-pass filter and a full-wave filter in the same photodiode. A circuit in which a rectifier circuit and a circuit in which a comparator are connected in series is prepared and flickering is prevented by detecting the blinking cycle of a fluorescent lamp is shown.

また特許文献2には、動画と静止画の両方を撮像できるようにしたCCDを用いた撮像装置において、マイコンを備えたフリッカ検出部に撮像信号を入力し、周期的に変動しているかどうかを見てフリッカが生じているどうかを判定する方法(段落0077参照)や、照明光の周期的変化を検出するセンサを別に設け、そのセンサからの信号をマイコンに取り込んでフリッカが発生するか否かを判別すること(段落0082参照)が示されている。   In Patent Document 2, in an imaging apparatus using a CCD that can capture both a moving image and a still image, an imaging signal is input to a flicker detection unit provided with a microcomputer, and whether or not it fluctuates periodically. A method for determining whether flicker is observed (see paragraph 0077) and a sensor for detecting a periodic change in illumination light are separately provided, and whether a flicker is generated by taking a signal from the sensor into a microcomputer. Is shown (see paragraph 0082).

さらに特許文献3には、被写体の動きなどにより映像信号の輝度レベルに変動があった場合でも正確にフリッカを検出するため、映像信号の画素レベルを1ライン毎に積算する積算手段1と、複数フレームまたはフィールドにおける同一の画像位置のラインに対し、積算手段1の出力を平均化する平均化手段3と、積算手段1の出力を用いて画像の静止部分を抽出する静止部分抽出手段4と、静止部分抽出手段4で抽出された静止部分に対し、積算手段1の1ライン毎の積算結果を平均化手段3の1ライン毎の平均化結果で除算する除算手段5と、除算手段5の除算結果を周波数分析してフリッカの有無を判定するフリッカ判定手段6とを備えた、フリッカ検出・補正方法が示されている。   Further, Patent Document 3 discloses that a plurality of integrating means 1 for integrating the pixel levels of the video signal for each line in order to accurately detect flicker even when the luminance level of the video signal is fluctuated due to the movement of the subject, etc. An averaging unit 3 that averages the output of the integrating unit 1 with respect to lines at the same image position in a frame or a field; a stationary part extracting unit 4 that extracts a static part of the image using the output of the integrating unit 1; Dividing means 5 for dividing the integration result for each line of the integrating means 1 by the averaging result for each line of the averaging means 3 with respect to the static part extracted by the static part extracting means 4, and the division of the dividing means 5 A flicker detection / correction method including a flicker determination means 6 for determining the presence / absence of flicker by frequency analysis of the result is shown.

また、特許文献4には、画像を垂直走査方向に分割して複数のフリッカ検波枠を設定すると共に、各フリッカ検波枠毎に輝度データの検波を行ない、さらに各フリッカ検波枠毎に前後の2つのフレームの輝度データとの差分をとってフリッカ成分を抽出することで、フリッカの周波数を算出する方法が示されている。なお、この特許文献4に示されたフリッカ検出方法では、前後のフレームの差分をとった場合にフリッカ成分が消えないよう、撮像信号のフレームレートとフリッカ周波数とを同期させないように調整している。   In Patent Document 4, a plurality of flicker detection frames are set by dividing an image in the vertical scanning direction, luminance data is detected for each flicker detection frame, and the front and rear 2 frames are detected for each flicker detection frame. A method of calculating a flicker frequency by extracting a flicker component by taking a difference from luminance data of one frame is shown. In the flicker detection method disclosed in Patent Document 4, adjustment is made so that the frame rate of the imaging signal and the flicker frequency are not synchronized so that the flicker component does not disappear when the difference between the previous and subsequent frames is taken. .

特開昭64−81580号公報JP-A-64-81580 特開平9−51481号公報JP-A-9-51481 特開2001−119708号公報JP 2001-119708 A 特開2003−189129号公報JP 2003-189129 A

しかしながら、特許文献1示されたフリッカ回路では、フリッカ検出だけのためにフォトダイオードと100Hz、120Hzの帯域通過フィルタ、及び全波整流回路とコンパレータ等を用意せねばならず、回路が複雑化すると共に不経済である。また特許文献2に示された撮像装置はCCDを使った撮像装置であり、CCDの場合はCMOSの場合と異なり、フリッカによって図7に示したような縞模様は現れないから、ここに示された技術をそのまま使うことはできない。   However, in the flicker circuit disclosed in Patent Document 1, a photodiode, 100 Hz and 120 Hz band pass filters, a full-wave rectifier circuit, a comparator, and the like must be prepared only for flicker detection, and the circuit becomes complicated. It is uneconomical. The image pickup apparatus disclosed in Patent Document 2 is an image pickup apparatus using a CCD. Unlike a CMOS, the image pickup apparatus shown in FIG. 7 does not show a stripe pattern as shown in FIG. 7 due to flicker. The technology cannot be used as it is.

一方、特許文献3や特許文献4に示された方法は、現在のフレーム画像と前フレームの画像との差分をとり、フリッカ成分を抽出した後にバンドパスフィルタ(BPF)やフーリエ変換、フリッカ成分の山と谷を数えるなどを行い、フリッカの周波数成分を検出するため、CMOSを用いた撮像装置におけるフリッカ周波数検出に有効ではある。   On the other hand, the methods disclosed in Patent Document 3 and Patent Document 4 take the difference between the current frame image and the previous frame image, extract the flicker component, and then extract the bandpass filter (BPF), Fourier transform, and flicker component. Counting peaks and valleys and detecting flicker frequency components are effective in detecting flicker frequency in an imaging apparatus using CMOS.

しかしながら、この特許文献3や特許文献4に示された方法でも、例えば動きのある物体が画像データに含まれていたり、手振れなどで前フレームの画像データとの差分が大きかったり、さらに、シャッター速度(露光時間)が長くなってフリッカによる光量変化が小さくなり、検出精度が悪くなったりすると、正しくフリッカ成分を抽出することができず、誤判定を生じることがある。   However, even in the methods disclosed in Patent Document 3 and Patent Document 4, for example, a moving object is included in the image data, the difference from the image data of the previous frame is large due to camera shake, and the shutter speed is further increased. If the (exposure time) becomes longer and the change in the amount of light due to flicker becomes smaller and the detection accuracy becomes worse, the flicker component cannot be extracted correctly and erroneous determination may occur.

すなわち、動きのある物体が画像データに含まれていたり、手振れなどで前フレームの画像データとの差分が大きかったりすると、現在のフレーム画像と前フレームの画像の差分を取ったときに画像が動いた分だけ差が大きくなったり小さくなったりし、フリッカによる縞模様が正確に抽出されずに、例えば50Hzを60Hzと誤って判定したり、その逆に60Hzを50Hzと誤って判定したり、フリッカの有無自体を誤って判定するということが生じる。   That is, if a moving object is included in the image data, or if the difference between the previous frame image data is large due to camera shake or the like, the image moves when the difference between the current frame image and the previous frame image is taken. For example, 50 Hz is erroneously determined to be 60 Hz, and vice versa, 60 Hz is erroneously determined to be 50 Hz, or flicker is not accurately extracted. It may happen that the presence / absence of the error itself is erroneously determined.

そのために特許文献3にあるように、画像の静止部分を抽出する静止部分抽出手段4と、静止部分抽出手段4で抽出された静止部分に対し、積算手段1の1ライン毎の積算結果を平均化手段3の1ライン毎の平均化結果で除算する除算手段5等を設け、それによって検出方法の精度を上げることもできるが、非常に複雑な処理が必要であると共に、手振れのように静止部分が生じない場合には誤判定を完全に無くすことはできない。   Therefore, as disclosed in Patent Document 3, the static part extraction means 4 for extracting the static part of the image, and the integration result for each line of the integration means 1 for the static part extracted by the static part extraction means 4 is averaged. Although the dividing means 5 etc. for dividing by the averaged result for each line of the converting means 3 can be provided, thereby improving the accuracy of the detection method, it requires very complicated processing and is still like a hand shake. If the part does not occur, the misjudgment cannot be completely eliminated.

そのため本発明においては、CMOSのようにマトリクス状に配列された各画素への電荷の蓄積及びフレームの読み出しを画素行単位の走査で行う撮像素子を有する撮像装置を用い、どのような撮影条件下においても検出したフリッカ周波数が正しいか否かを判定できるようにし、正確なフリッカ補正ができるようにした、撮像装置におけるフリッカ検出方法と装置を提供することが課題である。   For this reason, in the present invention, an imaging device having an imaging element that performs charge accumulation and frame reading in each pixel array arranged in a matrix like a CMOS and scanning in units of pixel rows is used, and under any imaging conditions. It is also an object to provide a flicker detection method and apparatus in an image pickup apparatus that can determine whether or not the detected flicker frequency is correct and can perform accurate flicker correction.

上記課題を解決するため本発明になる撮像装置におけるフリッカ検出方法は、
点滅する光源下で発生する撮像画像におけるフリッカの有無とフリッカ周波数を検出するフリッカ検出処理を実施し、該検出結果に基づき、フリッカ補正処理を実施する撮像装置におけるフリッカ検出方法であって、
前記フリッカ補正処理を実施中に新たなフリッカ検出処理を実施し、該新たなフリッカ検出処理によってフリッカが検出された場合、前記フリッカ補正処理を前記フリッカ周波数と異なる周波数に対応させることを特徴とする。
In order to solve the above problems, a flicker detection method in an imaging apparatus according to the present invention is as follows.
A flicker detection method in an imaging apparatus that performs flicker detection processing that detects flicker presence and absence and flicker frequency in a captured image generated under a blinking light source, and performs flicker correction processing based on the detection result,
A new flicker detection process is performed during the flicker correction process, and when flicker is detected by the new flicker detection process, the flicker correction process is made to correspond to a frequency different from the flicker frequency. .

また、この方法を実施する撮像装置におけるフリッカ検出装置は、
各画素がマトリクス状に配列され、電荷の蓄積及びフレームの読み出しを画素行単位の走査で行う撮像素子を備えた撮像装置を有し、該撮像装置からの画像データに含まれる点滅する光源下で発生するフリッカの有無と周波数とを検出するフリッカ検出において、時間的に連続する複数フレーム間の蓄積電荷量の差分を取り、フリッカ成分を検出してフリッカ補正処理を実施するフリッカ検出/補正部からなる撮像装置のフリッカ検出装置において、
前記フリッカ検出/補正部は、前記フリッカ補正処理実施状態において新たなフリッカ検出処理を実施し、該新たなフリッカ検出処理実施時にフリッカ発生状態である場合、前記フリッカ補正処理を前記フリッカ周波数と異なる周波数に対応させる機能を有していることを特徴とする。
In addition, the flicker detection apparatus in the imaging apparatus that implements this method is:
Each pixel is arranged in a matrix, and has an imaging device having an imaging device that performs charge accumulation and frame readout by scanning in units of pixel rows, and under a blinking light source included in image data from the imaging device In flicker detection for detecting presence / absence and frequency of flicker that occurs, a flicker detection / correction unit that performs a flicker correction process by taking a difference in accumulated charge amount between a plurality of temporally continuous frames and detecting a flicker component In the flicker detection device of the imaging device
The flicker detection / correction unit performs a new flicker detection process in the flicker correction process execution state, and if the flicker generation state is present when the new flicker detection process is executed, the flicker correction process is performed at a frequency different from the flicker frequency. It has the function to respond | correspond to.

このように、フリッカ補正処理を実施中に新たなフリッカ検出処理を実施し、それによってフリッカが検出された場合、最初のフリッカ検出処理時に検出したフリッカ周波数は誤りだったことになるから、その場合は単にフリッカ周波数を変更してフリッカ補正を行う、という簡単な処理で、簡単に、正確で正しいフリッカ補正を行わせるようにすることができる。   In this way, when a new flicker detection process is performed during the flicker correction process and flicker is detected as a result, the flicker frequency detected during the first flicker detection process is an error. The simple flicker correction is performed by simply changing the flicker frequency, so that accurate and correct flicker correction can be performed easily.

そして、マトリクス状に配列された各画素への電荷の蓄積及びフレームの読み出しを画素行単位の走査で行う撮像素子を備え、前記フリッカ検出処理は、時間的に連続する複数フレーム間の蓄積電荷量の差分を取って行うことで、光源の点滅によるフリッカを反映したデータが得られ、フリッカを高い精度で検出できる。   The image pickup device includes an image sensor that performs charge accumulation and frame reading in each pixel arranged in a matrix by scanning in units of pixel rows, and the flicker detection processing includes a stored charge amount between a plurality of temporally continuous frames. By taking this difference, data reflecting flicker due to blinking of the light source can be obtained, and flicker can be detected with high accuracy.

また、前記フリッカ検出処理を連続して実施し、検出結果が所定回数変化しなかった場合は前記フリッカ検出処理を停止することで、再度誤った判定をすることなく、正確なフリッカ補正を実施することができる。   Further, the flicker detection process is continuously performed, and when the detection result does not change a predetermined number of times, the flicker detection process is stopped, so that an accurate flicker correction is performed without making a wrong determination again. be able to.

さらに、前記フリッカの検出処理を停止した状態において、被写体の明るさが所定量以上変化した場合、前記フリッカ検出処理を再開することで、例えば照明が蛍光灯から白熱灯に変化したり屋外に移ったりした場合、フリッカは生じなくなるからフリッカ補正処理は不要となり、無駄なフリッカ補正をしなくて済む。   Further, when the brightness of the subject changes by a predetermined amount or more in a state where the flicker detection process is stopped, the flicker detection process is resumed, for example, the lighting changes from a fluorescent lamp to an incandescent lamp or moves to the outdoors. In such a case, flicker is not generated, and flicker correction processing is not necessary, and unnecessary flicker correction is not required.

さらに、被写体の明るさが予め定められた値を上回った場合は前記フリッカ検出/補正処理を停止することで、例えば明るさ検出手段として撮像装置からの画像データ、若しくは別途設けた測光センサなどを用い、その出力で被写体の明るさ、すなわち照度が一般的な蛍光灯の照度(約300Luxから700Lux)の場合はフリッカ検出処理を実施し、また、この照度よりも明らかに大きくなったときは、フリッカ補正を実施している場合は停止することで、さらに誤検出を防ぐことができる。   Furthermore, when the brightness of the subject exceeds a predetermined value, the flicker detection / correction process is stopped, so that, for example, image data from the imaging apparatus or a separately provided photometric sensor is used as the brightness detection means. When the brightness of the subject at the output, that is, the illuminance is the illuminance of a general fluorescent lamp (about 300 Lux to 700 Lux), flicker detection processing is performed, and when the illuminance is clearly larger than this, If flicker correction is performed, stopping the detection can further prevent erroneous detection.

本発明によれば、簡単な構成と方法で、CMOSのように各画素への電荷の蓄積及びフレームの読み出しを画素行単位の走査で行う撮像素子を有する撮像装置を用いても、検出したフリッカ周波数を正しいものとすることができ、常に正確なフリッカ補正ができる、撮像装置におけるフリッカ検出方法と装置を提供することができる。   According to the present invention, even if an image pickup apparatus having an image pickup element that performs charge accumulation in each pixel and frame readout by scanning in units of pixel rows, as in a CMOS, with a simple configuration and method, the detected flicker is detected. It is possible to provide a flicker detection method and apparatus in an imaging apparatus that can correct the frequency and always perform accurate flicker correction.

以下、図面を参照して本発明の好適な実施例を例示的に詳しく説明する。但しこの実施例に記載されている構成等は、この発明の範囲をそれに限定する趣旨ではなく、単なる説明例に過ぎない。   Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. However, the configuration described in this embodiment is merely an illustrative example, and is not intended to limit the scope of the present invention.

図1は、本発明になるフリッカ検出装置を有する撮像装置における一実施形態の概略構成を示すブロック図である。図中10は、被写体を撮像するための電荷蓄積素子がマトリクス状に配列されて、各画素への電荷の蓄積及びフレームの読み出しを画素行単位の走査で行うCMOSなどの撮像素子が用いられ、その撮像素子からの出力信号を増幅するゲインアンプや、アナログ画像信号をデジタルの画像信号に変換するA/Dコンバータなどを有し、撮像した画像の信号を出力する撮像部、11は画像処理部12、輝度信号処理部13、画像メモリ部14、フリッカ検出/補正部15などを有するカメラ信号処理部である。   FIG. 1 is a block diagram showing a schematic configuration of an embodiment of an imaging apparatus having a flicker detection apparatus according to the present invention. In the figure, reference numeral 10 denotes an image sensor such as a CMOS in which charge storage elements for imaging a subject are arranged in a matrix and charges are stored in each pixel and a frame is read out by scanning in units of pixel rows. An image pickup unit that has a gain amplifier that amplifies an output signal from the image pickup device, an A / D converter that converts an analog image signal into a digital image signal, and the like, and 11 outputs an image signal. 12, a camera signal processing unit having a luminance signal processing unit 13, an image memory unit 14, a flicker detection / correction unit 15, and the like.

このカメラ信号処理部11における画像処理部12では、撮像部10から送られてくる画像信号に対し、色補間、ノイズ除去、輪郭強調、画像形式変更などの画像処理を行ない、輝度信号処理部13ではオートフォーカス(AF)、自動露光(AE)、ホワイトバランス補正(AWB)などに必要な信号処理を行って、処理の済んだ画像データが画像メモリ部14に保存される。そしてその画像メモリ部14に保存された画像データから、フリッカ検出/補正部15でフリッカ成分の抽出、検出、そしてその検出結果が正しいか否かの判定が行なわれ、判定結果によって正しいフリッカ周波数に基づくフリッカ補正が行なわれる。   The image processing unit 12 in the camera signal processing unit 11 performs image processing such as color interpolation, noise removal, contour enhancement, and image format change on the image signal transmitted from the imaging unit 10, and the luminance signal processing unit 13. Then, signal processing necessary for autofocus (AF), automatic exposure (AE), white balance correction (AWB), and the like is performed, and the processed image data is stored in the image memory unit 14. The flicker detection / correction unit 15 extracts and detects flicker components from the image data stored in the image memory unit 14, and determines whether the detection result is correct. Based on the flicker correction.

フリッカ検出/補正部15では、後記するように、例えば連続する複数フレーム間の蓄積電荷量の差分を取ってフリッカ周波数を判定するため、1フレームの画像信号を垂直方向に複数の枠に分割し、枠毎の平均輝度を算出して連続するフレームにおける対応する枠の平均輝度の差分を取る、平均輝度と差分の算出手段、及び算出結果の記憶装置などを有している。また、フリッカの検出以外に撮像部10から送られてくる画像信号中の輝度信号を用いたり、別途設けた測光センサなどを用い、被写体の明るさを検出してその明るさ、すなわち照度が一般的な蛍光灯の照度(約300Luxから700Lux)よりも明らかに大きいと判断されたきは屋外と判断し、フリッカ検出を行われないようにする機能も有している。   As will be described later, the flicker detection / correction unit 15 divides an image signal of one frame into a plurality of frames in the vertical direction in order to determine the flicker frequency by taking the difference of the accumulated charge amount between a plurality of consecutive frames, for example. And calculating means for calculating the average brightness for each frame and calculating the difference between the average brightness of the corresponding frames in consecutive frames, and a storage device for the calculation result and the like. In addition to detecting flicker, a luminance signal in an image signal sent from the image pickup unit 10 is used, or a photometric sensor provided separately is used to detect the brightness of a subject and the brightness, that is, the illuminance is generally When it is judged that the illumination intensity of a typical fluorescent lamp is clearly larger than the illuminance (about 300 Lux to 700 Lux), it is judged to be outside and has a function of preventing flicker detection.

本発明になるフリッカ検出/補正部15を有する撮像装置は、フリッカ検出を行わない通常の状態では、撮像部10で撮像素子からの画像信号をゲインアンプで増幅した後、このアナログ画像信号をA/Dコンバータでデジタル画像信号に変換し、カメラ信号処理部11の画像処理部12で色補間、ノイズ除去、輪郭強調、画像形式変更などの画像処理を行ない、輝度信号処理部13でオートフォーカス(AF)、自動露光(AE)、ホワイトバランス補正(AWB)などに必要な信号処理を行って、処理の済んだ画像データを画像メモリ部14に保存し、図示していない表示装置に表示したり、図示していないシャッタを開閉して撮像し、これも図示していない外部メモリなどに画像を記録する。   In the normal state in which flicker detection is not performed, the image pickup apparatus having the flicker detection / correction unit 15 according to the present invention amplifies the image signal from the image pickup device by the gain amplifier in the image pickup unit 10 and then converts the analog image signal to A The digital signal is converted by the / D converter, the image processing unit 12 of the camera signal processing unit 11 performs image processing such as color interpolation, noise removal, contour enhancement, and image format change, and the luminance signal processing unit 13 performs autofocus ( AF), automatic exposure (AE), white balance correction (AWB), and the like are performed, and the processed image data is stored in the image memory unit 14 and displayed on a display device (not shown). The shutter (not shown) is opened and closed to pick up an image, and this is also recorded in an external memory (not shown).

このように構成された撮像装置において、被写体が電源周波数などに起因する光量変化を有する光源で照明されたことで、前記したように被写体の明るさが予め定められた値を下回ってフリッカを生じる可能性があると判断された場合、フリッカの有無、フリッカ周波数の判定が行われる。本発明は、そのフリッカ周波数が正しいか否かを判定するものであるが、本発明の説明に先立ち、通常のフリッカ判定のルーチンを簡単に説明する。   In the imaging apparatus configured as described above, when the subject is illuminated with a light source having a light amount change caused by a power supply frequency or the like, the brightness of the subject falls below a predetermined value as described above, thereby causing flicker. When it is determined that there is a possibility, the presence / absence of flicker and the flicker frequency are determined. The present invention determines whether or not the flicker frequency is correct. Prior to the description of the present invention, a normal flicker determination routine will be briefly described.

図4は、フリッカ検出/補正部15におけるフリッカ検出の概略を説明するための図であり、(A)はフリッカ検出を行うときに1フレーム分の画像データを分割した状態を示した図、(B)は(A)のように分割した各枠内における輝度信号の平均値を示した図、(C)はフリッカの周波数を検出するためのバンドパスフィルタ(BPF)を示した図、図5はCMOSを用いた撮像素子におけるフリッカ検出に際し、電荷蓄積時間を短くすることで、画像上にフリッカにより生じる縞模様が明確に現れるようにすることを説明するための図である。   FIG. 4 is a diagram for explaining the outline of flicker detection in the flicker detection / correction unit 15. FIG. 4A is a diagram showing a state in which image data for one frame is divided when flicker detection is performed. (B) is a diagram showing the average value of the luminance signal in each frame divided as in (A), (C) is a diagram showing a band-pass filter (BPF) for detecting the flicker frequency, and FIG. FIG. 4 is a diagram for explaining that a stripe pattern caused by flicker appears clearly on an image by shortening the charge accumulation time when detecting flicker in an image pickup device using CMOS.

まず、図1の撮像部10から送られ、前記したような処理が加えられて画像メモリ部14に記憶された1フレーム分の画像データが、フリッカ検出/補正部15で図4(A)に示したように検出枠[0]、検出枠[1]、……、検出枠[15]と垂直方向に等分割される。この1フレーム分の画像データの分割数は、それぞれの枠内の走査に要する合計時間が検出対象とすべき光源点滅周期より短くなるようにする。すなわち、例えば撮像部10のフレームレートを15回/秒とすると、1フレーム中にこの点滅が50Hzの場合で約6.7回、60Hzの場合は8回起こることになるから、最小輝度部と最大輝度部を別々の枠とするためは、少なくとも16分割以上にする必要がある。枠の分割数はより大きい方が周波数検出精度に対しては有利となるが、演算処理の負荷が増大することになるので、その点を考慮して決める。なお、以下の説明では、一例として1フレーム分の画像データを16分割した場合を例に説明するが、これは16分割に限らず、上記した16分割以上であれば任意の数に分割しても良いことは自明である。   First, one frame of image data sent from the imaging unit 10 of FIG. 1 and subjected to the above-described processing and stored in the image memory unit 14 is converted into a flicker detection / correction unit 15 in FIG. As shown, detection frame [0], detection frame [1],..., And detection frame [15] are equally divided in the vertical direction. The number of divisions of image data for one frame is set so that the total time required for scanning within each frame is shorter than the light source blinking cycle to be detected. That is, for example, if the frame rate of the imaging unit 10 is 15 times / second, this blinking occurs approximately 6.7 times in the case of 50 Hz and 8 times in the case of 60 Hz in one frame. In order to make the maximum luminance part a separate frame, it is necessary to have at least 16 divisions. A larger number of frame divisions is advantageous for frequency detection accuracy, but the calculation processing load increases, and is determined in consideration of this point. In the following description, a case where image data for one frame is divided into 16 as an example will be described as an example. However, this is not limited to 16 divisions. It is obvious that it is good.

そして次に、撮像部10を構成するCMOSを用いた撮像素子の電荷蓄積時間が図5に33で示したように、フリッカによる明暗が明確に現れるような値に設定され、それによる蓄積電荷量の低下を、撮像部10が有するアンプのゲインを上げて補う指示が、フリッカ補正に伴う信号として信号線16を通して撮像部10に送られる。なお、この図5において31は垂直同期信号であり、32は電源周波数による光源の明るさの変化状態を示したもの、33はそれぞれの黒線がCMOSを用いた撮像素子の各水平行毎の電荷蓄積時間の長さを示したもの、34は撮像された画像データによって生じるフリッカによる明暗を表している。   Then, as shown by 33 in FIG. 5, the charge accumulation time of the image pickup device using the CMOS constituting the image pickup unit 10 is set to a value that clearly shows the light and darkness due to flicker, and the amount of charge accumulated thereby An instruction to compensate for this decrease by increasing the gain of the amplifier of the imaging unit 10 is sent to the imaging unit 10 through the signal line 16 as a signal accompanying flicker correction. In FIG. 5, reference numeral 31 denotes a vertical synchronizing signal, 32 denotes a change in brightness of the light source depending on the power supply frequency, and 33 denotes a black line corresponding to each horizontal line of the image sensor using CMOS. The length of charge accumulation time 34 indicates the light and darkness caused by flicker generated by the captured image data.

この図5からわかるように、フリッカ検出処理において、撮像部10を構成するCMOSを用いた撮像素子の電荷蓄積時間33を短くする程、各水平素子間の光量積分値の相対比が大きくなる。この場合は、34で示したようにフリッカによる明るさの変化が顕著に現れたデータが得られるため、フリッカ検出の精度が高くなる。また、電荷蓄積時間33を短くしたことにより、被写体ブレや手ブレに対しても画像データに対する影響が少なくなり、より効果的にフリッカ検出を行うことができる。   As can be seen from FIG. 5, in the flicker detection process, as the charge accumulation time 33 of the image sensor using the CMOS constituting the image capturing unit 10 is shortened, the relative ratio of the light amount integral values between the horizontal elements increases. In this case, as shown at 34, data in which the brightness change due to flicker appears remarkably is obtained, and therefore the accuracy of flicker detection is increased. In addition, since the charge accumulation time 33 is shortened, the influence of the image data on the subject blur and camera shake is reduced, and flicker detection can be performed more effectively.

それに反し、図6に示したように撮像部10を構成するCMOSを用いた撮像素子の電荷蓄積時間を、光源の明るさの変化周期32よりも51のように長くすると、各素子は、被写体におけるフリッカにより変化した明るさを積分して撮像するから、得られる画像データは、被写体を照明する光源の明るさ変化を平均した値が記録されることになり、52に示したように、フリッカによる画像への影響は比較的小さなものとなる。従って、この場合はフリッカ検出が困難になる。   On the other hand, as shown in FIG. 6, when the charge accumulation time of the image pickup device using the CMOS constituting the image pickup unit 10 is made longer than the light source brightness change period 32 by 51, each device becomes a subject. Since the image data obtained by integrating the brightness changed due to the flicker in the image is obtained, the average value of the brightness change of the light source that illuminates the subject is recorded as the obtained image data. The effect on the image due to is relatively small. Therefore, in this case, flicker detection becomes difficult.

そして、撮像部10からカメラ信号処理部11に送られ、画像メモリ部14に記憶されたフレーム分の画像データを、図4(A)に示したように検出枠[0]、検出枠[1]、……、検出枠[15]と垂直方向に等分割し、それぞれの枠内における輝度信号の平均値を図4(B)に、Y[0]、Y[1]、……、Y[15]で示したように算出して記憶する。   Then, as shown in FIG. 4A, the image data for the frames sent from the imaging unit 10 to the camera signal processing unit 11 and stored in the image memory unit 14 are detected frames [0] and [1]. ],... Equally divided in the vertical direction with the detection frame [15], and the average value of the luminance signal in each frame is shown in FIG. 4B as Y [0], Y [1],. Calculate and store as shown in [15].

次にフリッカ検出/補正部15は、次に画像メモリ部14に記憶されたフレームを同様に検出枠[0]、検出枠[1]、……、検出枠[15]に分割すると共に、それぞれの枠内における輝度信号の平均値を図4(B)に、Y[0]、Y[1]、……、Y[15]で示したように算出し、さらに、先に記憶した最初のフレームの輝度信号の平均値との差分を算出させる。   Next, the flicker detection / correction unit 15 similarly divides the frame stored in the image memory unit 14 into detection frames [0], detection frames [1],..., And detection frames [15]. The average value of the luminance signal in the frame of is calculated as indicated by Y [0], Y [1],..., Y [15] in FIG. The difference from the average value of the luminance signal of the frame is calculated.

この差分算出処理は、画像データに含まれる被写体のデータ分を消去し、フリッカによる明暗の縞模様(フリッカ成分)だけを抽出するためである。またこのとき、フリッカによる明暗だけが残るようにするため、差を取る2つのフレームにおけるフリッカの現れる位置を異ならせおく。そうしないと、フレームレートとフリッカ周波数(蛍光灯の電源周波数)とが同期することにより、フリッカが発生する位置が画面上で固定されてしまうこととなり、差分を取った時にフリッカ成分も消えてしまうからである。   This difference calculation process is for erasing the subject data included in the image data and extracting only the light and dark stripe pattern (flicker component) due to flicker. At this time, in order to leave only the light and dark due to the flicker, the positions where the flicker appears in the two frames that are different are made different. Otherwise, the frame rate and the flicker frequency (the power supply frequency of the fluorescent lamp) are synchronized, so the position where the flicker occurs is fixed on the screen, and the flicker component disappears when the difference is taken. Because.

フリッカ周波数と同期してしまうフレームレートは、蛍光灯の電源周波数を正整数で割った値、若しくは正整数倍した値であり、例えば電源周波数が50Hzの場合、100フレーム/秒、50フレーム/秒、25フレーム/秒、………となり、60Hzの場合、120フレーム/秒、60フレーム/秒、30フレーム/秒、………となる。そこで、それを回避するため、フレームレートがこのフリッカ周波数と同期する値より遅くなった値、又は早くなった値となるよう、水平同期周期を長く又は短くとるようにし、フリッカ成分が浮き上がるようにする。   The frame rate synchronized with the flicker frequency is a value obtained by dividing the power supply frequency of the fluorescent lamp by a positive integer or a value obtained by multiplying the positive integer by a positive integer. For example, when the power supply frequency is 50 Hz, 100 frames / second, 50 frames / second 25 frames / second,..., And in the case of 60 Hz, 120 frames / second, 60 frames / second, 30 frames / second,. Therefore, in order to avoid this, the horizontal synchronization period is set to be longer or shorter so that the frame rate becomes a value slower or faster than the value synchronized with the flicker frequency so that the flicker component rises. To do.

こうしてフリッカ成分が抽出されると、このフリッカ成分を含む図4(B)にY[0]、Y[1]、……、Y[15]で示した輝度信号平均値を、図4(C)に示したバンドパスフィルタにおける輝度信号平均値入力端子21に入力する。バンドパスフィルタ22、23は、フリッカの原因となる被写体を照明する光源の点滅周波数を検出するためのもので、光源の明るさは電源周波数の2倍のサイクルで変化するため、22は100Hzに対応させ、23は120Hzに対応させて設けられている。   When the flicker component is extracted in this way, the luminance signal average values indicated by Y [0], Y [1],..., Y [15] in FIG. The luminance signal average value input terminal 21 in the bandpass filter shown in FIG. The bandpass filters 22 and 23 are for detecting the blinking frequency of the light source that illuminates the subject that causes flicker. Since the brightness of the light source changes in a cycle that is twice the power frequency, 22 is set to 100 Hz. Correspondingly, 23 is provided corresponding to 120 Hz.

そのため、このバンドパスフィルタ22、23からは、入力した輝度信号平均値の周波数に対応した周波数の波が出力されるから、出力端子24、25に出た出力により、フリッカの有無、周波数の判定を行う。そして、フリッカが検出されない場合は撮像素子の電荷蓄積時間をフリッカ検出用設定前の値に再設定し、フリッカが有る場合は検出したフリッカ周波数に基づき、撮像部10におけるCMOSを用いた撮像素子の電荷蓄積時間(シャッタ時間)を、フリッカ間隔の整数倍とするフリッカ対応蓄積時間に設定するよう、図1におけるフリッカ補正信号16を撮像部10に送り、フリッカのない画像が得られるようにする。   Therefore, since the band-pass filters 22 and 23 output a wave having a frequency corresponding to the frequency of the input luminance signal average value, the output from the output terminals 24 and 25 determines the presence / absence of flicker and the frequency. I do. If no flicker is detected, the charge accumulation time of the image sensor is reset to the value before the setting for flicker detection. If there is flicker, the image sensor using the CMOS in the imaging unit 10 is based on the detected flicker frequency. The flicker correction signal 16 in FIG. 1 is sent to the imaging unit 10 so as to obtain an image without flicker so that the charge accumulation time (shutter time) is set to a flicker-corresponding accumulation time that is an integral multiple of the flicker interval.

なお、このフリッカの有無、周波数の判定は、図4(B)に示した輝度信号平均値によって行っても良い。すなわち、フリッカは、図4(B)に示した各枠の輝度信号平均値に差が生じている場合にフリッカがあると判定できるから、1つの枠における輝度をその隣、1つ置いた更に隣、更にその隣……と比較することを全ての枠の輝度信号平均値について行い、明暗の差が一定間隔で生じている場合にフリッカがあると判定し、さらにその間隔により、フリッカ周波数を算出する。つまり前記したように、撮像部のフレームレートを15回/秒とすると、1フレーム中にこの点滅が50Hzの場合で約6.7回、60Hzの場合は8回起こることになるから、分割数を16とした場合、50Hzの場合で2つか3つおきに、60Hzの場合は2つおきに暗部、または明部が来ることになるから、それによって周波数を決定すればよい。   The determination of the presence / absence of flicker and the frequency may be performed based on the average luminance signal value shown in FIG. In other words, flicker can be determined to be flicker when there is a difference in the luminance signal average value of each frame shown in FIG. 4B, so that one luminance is placed next to one frame. Next, it is compared with the next to the luminance signal average value of all the frames, and it is determined that there is flicker when a difference in brightness occurs at a constant interval. Further, the flicker frequency is determined by the interval. calculate. In other words, as described above, if the frame rate of the imaging unit is 15 times / second, this blinking will occur approximately 6.7 times in the case of 50 Hz and 8 times in the case of 60 Hz in one frame. When 16 is set to 16, a dark portion or a bright portion comes every two or three in the case of 50 Hz, and every two in the case of 60 Hz.

このようにして、フリッカを検出すると共にシャッタ時間を調整することでフリッカのない画像が得られるわけであるが、以上の処理によっても前記したように、動きのある物体が画像データに含まれていたり、手振れなどで前フレームの画像データとの差分が大きかったり、さらに、シャッター速度(露光時間)が長くなってフリッカによる光量変化が小さくなり、検出精度が悪くなったりすると、正しくフリッカ成分を抽出することができず、例えば50Hz地域において蛍光灯で照明されている被写体画像から60Hzのフリッカが生じていると判定したり、逆に、60Hz地域において蛍光灯で照明されている被写体画像から50Hzのフリッカが生じていると判定する、誤判定を生じることがある。そのため本発明においては、図2に示したフロー図に基づくフリッカ検出結果の判定処理を行い、誤検出によってフリッカ周波数を誤判定した場合にその補正ができるようにした。   In this way, an image without flicker can be obtained by detecting flicker and adjusting the shutter time. As described above, a moving object is included in the image data as described above. If the difference from the image data of the previous frame is large due to camera shake, etc., or if the shutter speed (exposure time) is long and the change in the amount of light due to flicker is small and the detection accuracy is poor, the flicker component is correctly extracted. For example, it is determined that 60 Hz flicker is generated from a subject image illuminated with a fluorescent lamp in a 50 Hz region, or conversely, 50 Hz from a subject image illuminated with a fluorescent lamp in a 60 Hz region. An erroneous determination may be made in which it is determined that flicker has occurred. Therefore, in the present invention, the determination process of the flicker detection result based on the flowchart shown in FIG. 2 is performed so that the correction can be made when the flicker frequency is erroneously determined due to erroneous detection.

まず、ステップS20で処理がスタートすると、最初にステップS21でフリッカモードが確定しているか否かが判断される。このフリッカモードの確定状態とは、以下の状態を言う。   First, when the process starts in step S20, it is first determined in step S21 whether or not the flicker mode is confirmed. The final state of the flicker mode means the following state.

すなわち、通常フリッカの検出は、前記したようにフリッカ検出/補正部15により、撮像部10から送られてくる画像信号中の輝度信号や別途設けた測光センサなどを用い、被写体の明るさを検出してその明るさ、すなわち照度が、一般的な蛍光灯の照度(約300Luxから700Lux程度)であると判断されたときに行う(但しこれは一例で、常時行うようにしても良い)。しかし、そのフリッカ検出を行わねばならない照明条件下においても、この図2に示したフロー図に従ってフリッカ検出とその検出結果が正しいか否かの判定処理を複数回(図2のステップS25に示したフリッカ安定連続検出回数xだけ)行い、判定処理の結果、フリッカ周波数が連続して複数回正しいと判断された場合、以後のフリッカ検出を照明条件が変化するまで行わず、検出されたフリッカ周波数でフリッカ補正を行い続ける状態を、確定したフリッカモードと称している。   That is, the normal flicker is detected by the flicker detection / correction unit 15 as described above using the luminance signal in the image signal sent from the imaging unit 10 or a photometric sensor provided separately. Then, it is performed when it is determined that the brightness, that is, the illuminance is the illuminance of a general fluorescent lamp (about 300 Lux to 700 Lux) (however, this is an example, and it may be always performed). However, even under lighting conditions where flicker detection must be performed, flicker detection and a process for determining whether the detection result is correct are performed a plurality of times according to the flowchart shown in FIG. 2 (shown in step S25 in FIG. 2). If the flicker frequency is determined to be correct multiple times in succession, the subsequent flicker detection is not performed until the illumination condition changes, and the detected flicker frequency is detected. The state where the flicker correction is continuously performed is referred to as a confirmed flicker mode.

そのため、このステップS21でフリッカモードが確定状態であると判断された場合は、ステップS33に行って処理が終了し、確定していない場合は処理がステップS22に進む。そしてこのステップS22で前記したフリッカ検出処理が行われ、次のステップS23で、フリッカの有り無しが判断され、さらにフリッカがある場合はフリッカ周波数が判断される。フリッカが無しと判断された場合はステップS24に進み、フリッカ検出処理回数カウント値nが(n+1)され、さらにステップS25でこのnの値がフリッカ安定連続検出回数xと等しいか大きくなったかが判定され、Yesなら前記したフリッカモード確定となり、Noの場合はステップS33に進んで終了する。なお、このステップS25からステップS33に進んだ場合、被写体の照度が変化した場合、後記する図3のフロー図によりこの図2のフローに基づく処理を続けるか否かが判断される。   For this reason, if it is determined in step S21 that the flicker mode is in the finalized state, the process proceeds to step S33 and the process ends. If not, the process proceeds to step S22. In step S22, the flicker detection process described above is performed. In the next step S23, it is determined whether or not flicker is present. If there is further flicker, the flicker frequency is determined. If it is determined that there is no flicker, the process proceeds to step S24 where the flicker detection processing count value n is (n + 1), and it is further determined in step S25 whether the value of n is equal to or greater than the flicker stable continuous detection count x. If Yes, the flicker mode is determined, and if No, the process proceeds to step S33 and ends. When the process proceeds from step S25 to step S33, and the illuminance of the subject changes, it is determined whether or not to continue the process based on the flow of FIG. 2 according to the flowchart of FIG.

一方、ステップS23でフリッカが検出され、そのフリッカが50Hzに基づくフリッカと判断された場合は処理がステップS27に、60Hzと判断された場合は処理がステップS28に進む。そしてどちらの場合もステップS27、またはステップS28において、現在50Hz(ステップS27の場合)または60Hz(ステップS28の場合)に基づくフリッカの補正中であるかどうかが判断される。   On the other hand, if flicker is detected in step S23 and the flicker is determined to be flicker based on 50 Hz, the process proceeds to step S27. If the flicker is determined to be 60 Hz, the process proceeds to step S28. In either case, in step S27 or step S28, it is determined whether flicker correction is currently being performed based on 50 Hz (in the case of step S27) or 60 Hz (in the case of step S28).

これは、今回以前にフリッカ検出が行われているかどうかを判断するための処理で、前記したステップS22のフリッカ検出処理により、ステップS23でフリッカ有りと判断されたということは、今回初めてフリッカ検出を実施したか、前回検出したフリッカ周波数が間違っていて、フリッカを生じないように補正処理をしたにもかかわらず、フリッカが存在したままになっていることを示している。   This is a process for determining whether or not flicker detection has been performed before this time. The flicker detection process in step S22 described above determines that there is flicker in step S23. This indicates that the flicker is still present even though the flicker frequency detected previously is wrong and correction processing is performed so as not to generate flicker.

従って、ステップS23で例えば50Hzに基づくフリッカと判断され、ステップS27でさらに50Hzに基づくフリッカの補正中と判断された場合、過去の50Hzに基づくフリッカの補正と今回の判断(例えばフリッカ周波数50Hzという判断)は誤りであるからステップS31に進み、60Hzに基づくフリッカの補正を実行してステップS32でモードを60Hzフリッカ補正のモードとする。また、全く同様に、ステップS23で例えば60Hzに基づくフリッカと判断され、ステップS28でさらに60Hzに基づくフリッカの補正中と判断された場合、過去の60Hzに基づくフリッカの補正と今回の判断は誤りであるからステップS29に進み、50Hzに基づくフリッカの補正を実行してステップS30でモードを50Hzフリッカ補正のモードとする。   Therefore, if it is determined in step S23 that the flicker is based on 50 Hz, for example, and if it is determined in step S27 that the flicker is further corrected based on 50 Hz, the flicker correction based on the past 50 Hz and the current determination (for example, the flicker frequency is determined to be 50 Hz). ) Is an error, the process proceeds to step S31, flicker correction based on 60 Hz is executed, and the mode is changed to the 60 Hz flicker correction mode in step S32. In the same manner, if it is determined in step S23 that the flicker is based on 60 Hz, for example, and if it is determined in step S28 that the flicker is further corrected based on 60 Hz, the flicker correction based on the past 60 Hz and the current determination are incorrect. Therefore, the process proceeds to step S29, and flicker correction based on 50 Hz is executed. In step S30, the mode is set to the 50 Hz flicker correction mode.

また、ステップS23で例えば50Hzに基づくフリッカと判断され、ステップS27で現在50Hzに基づくフリッカの補正中ではない(すなわち60Hzに基づくフリッカの補正中)と判断された場合、ステップS29に進み、50Hzに基づくフリッカの補正を実行してステップS30でモードを50Hzフリッカ補正のモードとする。更に同様に、ステップS23で60Hzに基づくフリッカと判断され、ステップS28でさらに60Hzに基づくフリッカの補正中ではない(すなわち50Hzに基づくフリッカの補正中)と判断された場合、ステップS31に進み、60Hzに基づくフリッカの補正を実行してステップS32でモードを60Hzフリッカ補正のモードとする。   If it is determined in step S23 that the flicker is based on 50 Hz, for example, and if it is determined in step S27 that the flicker is not currently being corrected based on 50 Hz (that is, the flicker is being corrected based on 60 Hz), the process proceeds to step S29 to 50 Hz. Based on the flicker correction, the mode is changed to the 50 Hz flicker correction mode in step S30. Similarly, if it is determined in step S23 that the flicker is based on 60 Hz, and if it is determined in step S28 that the flicker is not being corrected based on 60 Hz (that is, the flicker is being corrected based on 50 Hz), the process proceeds to step S31. The flicker correction based on the above is executed, and the mode is changed to the 60 Hz flicker correction mode in step S32.

このように、前記した何らかの理由によってフリッカ周波数を誤って検出すると、その誤った検出結果によってフリッカ補正するとフリッカは残ったままとなるから、それを検出することで正しいフリッカ補正を行うことができ、撮影した画像にフリッカが生じていた、という問題を解決することができる。   In this way, if the flicker frequency is erroneously detected for some reason as described above, flicker remains when flicker correction is performed based on the erroneous detection result, so that correct flicker correction can be performed by detecting it. It is possible to solve the problem that flicker occurs in the photographed image.

以上が本発明になるフリッカ検出結果の正誤判定方法であるが、前記したようにこの図2に示したフリッカ検出結果の正誤判定は、フリッカが存在すると思われる照明条件下で、また、前記したようにフリッカモード確定まで行われるが、それを判断するのが図3に示したフロー図である。   The above is the flicker detection result correctness determination method according to the present invention. As described above, the flicker detection result correctness determination shown in FIG. 2 is performed under the illumination conditions in which flicker is considered to exist. The flicker mode is determined as described above, and this is determined by the flowchart shown in FIG.

この図3に示した処理は、基本的に画像取り込み毎に行うが、これは、被写体を照明している光源がフリッカ検出を必要とする光源から必要としない光源へ、また逆にフリッカ検出を必要としない光源から必要とする光源へ変化する可能性があるからであり、また、被写体の明るさを検出してフリッカ検出を実施するか否かを判断するのは、不要なフリッカ検出を実施することで誤検知が行われるのを防止するためである。しかしながら、前記したように、フリッカ検出をこのように被写体の明るさを検出して実施するか否か判断するのではなく、定期的に常時実施するようにしても良い。   The processing shown in FIG. 3 is basically performed every time an image is captured. This is because the light source that illuminates the subject changes from a light source that requires flicker detection to a light source that does not require flicker detection, and vice versa. This is because there is a possibility of changing from a light source that is not required to a light source that is required, and it is unnecessary to detect flicker by detecting the brightness of the subject. This is to prevent erroneous detection from being performed. However, as described above, the flicker detection may be performed regularly instead of determining whether or not the brightness of the subject is detected in this way.

まずステップS40で処理がスタートすると、ステップS41で前記図1に10で示した撮像部が画像を取り込み、画像処理部12、輝度信号処理部13で取り込んだ画像に対する処理が行われて画像メモリ部14に記憶される。そして記憶された画像の輝度(照度)が検出され、ステップS43で測光値が屋外光であることが明白な所定値以下かどうか、または、前記したように被写体照度が、一般的な蛍光灯の照度(約300Luxから700Lux)程度であるかどうかが判断される。   First, when the processing starts in step S40, the image capturing unit shown in FIG. 1 in FIG. 1 captures an image in step S41, and the image processing unit 12 and the luminance signal processing unit 13 perform processing on the captured image, and the image memory unit. 14 is stored. Then, the brightness (illuminance) of the stored image is detected, and whether or not the photometric value is not more than a predetermined value that clearly indicates that it is outdoor light in step S43, or the subject illuminance is that of a general fluorescent lamp as described above. It is determined whether the illuminance is about (approximately 300 Lux to 700 Lux).

この判断により、被写体の明るさが所定閾値より大きい場合は処理がステップS44に進み、現在フリッカ補正中か否かが判断され、フリッカ補正中でなければステップS52に行き、フリッカ補正中の場合はステップS45に進んでフリッカ補正を停止して、さらにステップS46でフリッカモード確定中の場合はそれをクリアし、ステップS52に進んで、前回測定した測光値を今回測定した測光値に置き換え、ステップS53に行って処理を終了する。   If it is determined that the brightness of the subject is greater than the predetermined threshold value, the process proceeds to step S44 to determine whether or not the flicker correction is currently being performed. If the flicker correction is not currently performed, the process proceeds to step S52. In step S45, the flicker correction is stopped, and if the flicker mode is determined in step S46, the flicker mode is cleared. In step S52, the previously measured photometric value is replaced with the currently measured photometric value. To finish the process.

一方、ステップS43で被写体の明るさが所定閾値より小さいと判断された場合、処理がステップS47に行ってこの測光が初回であるかどうかが判断され、初回の場合はステップS52に行って前記した処理が行われ、初回でなければステップS48に進む。そしてこのステップS48で、今回測光値と前回測光値との差分の絶対値が輝度変化量として算出され、ステップS49でこの輝度変化量が所定閾値以上かどうかが判定される。この判断は、例えば蛍光灯下のフリッカがある光源から白熱灯下のフリッカのない光源に移動したときなどのためであり、判断結果がNoの場合はステップS51へ、Yesの場合は処理がステップS50に進んでフリッカモード確定中の場合はそれがクリアされる。   On the other hand, if it is determined in step S43 that the brightness of the subject is smaller than the predetermined threshold value, the process proceeds to step S47 to determine whether or not this photometry is the first time, and in the case of the first time, the process proceeds to step S52. If the process is performed and the process is not the first time, the process proceeds to step S48. In step S48, the absolute value of the difference between the current photometric value and the previous photometric value is calculated as the luminance change amount. In step S49, it is determined whether the luminance change amount is greater than or equal to a predetermined threshold value. This determination is made when, for example, the light source having flicker under the fluorescent lamp is moved to a light source without flicker under the incandescent lamp. If the determination result is No, the process proceeds to step S51. If the process proceeds to S50 and the flicker mode is being determined, it is cleared.

そして処理がステップS51に進み、前記図2のフロー図に従ってフリッカ判断が行われ、それが済むとステップS52に行って前記した処理が行われ、ステップS53で終了する。なお、この図3のフロー図においては、例えば蛍光灯下でフリッカモード確定になり、同一照度の白熱灯下、または同一照度の戸外に移動することでフリッカ補正が不要になった場合でも、図2のステップS21でフリッカモード確定と判断されるから、フリッカモード確定は続いたままとなるが、例えばフリッカモード確定を5秒から10秒の間隔でクリアしてフリッカ検出を行うことで、こういった問題にも対処できる。   Then, the process proceeds to step S51, and flicker determination is performed according to the flowchart of FIG. 2, and when that is done, the process proceeds to step S52, where the above-described process is performed, and the process ends in step S53. In the flow chart of FIG. 3, even when the flicker mode is confirmed under a fluorescent lamp, for example, even when flicker correction becomes unnecessary by moving to an incandescent lamp with the same illuminance or outdoors with the same illuminance. In step S21 of step 2, it is determined that the flicker mode is confirmed, so the flicker mode is determined to continue. For example, by clearing the flicker mode at intervals of 5 to 10 seconds and performing flicker detection, the flicker mode is determined. Can deal with other problems.

このようにすることにより、CMOSのようにマトリクス状に配列された各画素への電荷の蓄積及びフレームの読み出しを画素行単位の走査で行う撮像素子を用いた撮像装置でも、どのような撮影条件下であっても検出したフリッカ周波数が正しいか否かを判定でき、正確なフリッカ補正を簡単な構成で実施できる。   In this way, any imaging condition using an imaging device that performs charge accumulation and frame readout by pixel row unit scanning in each pixel arranged in a matrix like a CMOS can be obtained. Even if it is below, it can be determined whether or not the detected flicker frequency is correct, and accurate flicker correction can be performed with a simple configuration.

本発明によれば、CMOSを用いた撮像素子を有する撮像装置であっても、フリッカを常に正しく補正した画像を得ることができ、撮像装置を高精度に構成することができる。   According to the present invention, even an image pickup apparatus having an image pickup element using CMOS can obtain an image in which flicker is always corrected correctly, and the image pickup apparatus can be configured with high accuracy.

本発明になるフリッカ検出装置を有する撮像装置における一実施形態の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of one Embodiment in the imaging device which has a flicker detection apparatus which becomes this invention. 本発明になるフリッカ検出結果の正誤判定方法のフロー図である。It is a flowchart of the flicker detection result correctness determination method according to the present invention. 本発明になるフリッカ検出結果の正誤判定方法における、フリッカ検出処理を行うか否かの判断をするためのフロー図である。It is a flowchart for determining whether or not to perform flicker detection processing in the flicker detection result correctness determination method according to the present invention. フリッカ検出/補正部15におけるフリッカ検出の概略を説明するための図であり、(A)はフリッカ検出を行うときに1フレーム分の画像データを分割した状態を示した図、(B)は(A)のように分割した各枠内における輝度信号の平均値を示した図、(C)はフリッカの周波数を検出するためのバンドパスフィルタ(BPF)を示した図である。4A and 4B are diagrams for explaining an outline of flicker detection in the flicker detection / correction unit 15. FIG. 4A is a diagram illustrating a state in which image data for one frame is divided when flicker detection is performed, and FIG. FIG. 6A is a diagram showing an average value of luminance signals in each frame divided as in FIG. 5A, and FIG. 6C is a diagram showing a band-pass filter (BPF) for detecting the flicker frequency. CMOSを用いた撮像素子におけるフリッカ検出に際し、電荷蓄積時間を短くすることで、画像上にフリッカにより生じる縞模様が明確に現れるようにすることを説明するための図である。It is a figure for demonstrating that the stripe pattern produced by a flicker appears clearly on an image by shortening charge accumulation time in the case of flicker detection in an imaging device using CMOS. 電荷蓄積時間を短くせず、フレームレートも上げなかった場合のフリッカにより生じる光量変化を表した図である。It is a figure showing the light quantity change which arises by flicker when not shortening charge accumulation time and raising a frame rate. CMOSを撮像素子として使い、被写体の照明に、電源周波数に起因して明るさが変化する光源を用いたことにより生じるフリッカを誇張して示した図である。It is a figure which exaggerated and showed the flicker which arises by using CMOS as an image pick-up element, and using the light source from which brightness changes according to a power supply frequency for illumination of a to-be-photographed object.

符号の説明Explanation of symbols

10 撮像部
11 カメラ信号処理部
12 画像処理部
13 輝度信号処理部
14 画像メモリ部
15 フリッカ検出/補正部
20 1フレームの画像信号
21 輝度信号平均値入力端子
22 100Hzに対応したバンドパスフィルタ
23 120Hzに対応したバンドパスフィルタ
24、25 検出出力の出力端子
DESCRIPTION OF SYMBOLS 10 Image pick-up part 11 Camera signal processing part 12 Image processing part 13 Luminance signal processing part 14 Image memory part 15 Flicker detection / correction part 20 One frame of image signal 21 Luminance signal average value input terminal 22 Band pass filter 23 corresponding to 100 Hz 120 Hz Bandpass filters 24 and 25 corresponding to the output terminal of the detection output

Claims (7)

点滅する光源下で発生する撮像画像におけるフリッカの有無とフリッカ周波数を検出するフリッカ検出処理を実施し、該検出結果に基づき、フリッカ補正処理を実施する撮像装置におけるフリッカ検出方法であって、
前記フリッカ補正処理を実施中に新たなフリッカ検出処理を実施し、該新たなフリッカ検出処理によってフリッカが検出された場合、前記フリッカ補正処理を前記フリッカ周波数と異なる周波数に対応させることを特徴とする撮像装置におけるフリッカ検出方法。
A flicker detection method in an imaging apparatus that performs flicker detection processing that detects flicker presence and absence and flicker frequency in a captured image generated under a blinking light source, and performs flicker correction processing based on the detection result,
A new flicker detection process is performed during the flicker correction process, and when flicker is detected by the new flicker detection process, the flicker correction process is made to correspond to a frequency different from the flicker frequency. Flicker detection method in imaging apparatus.
マトリクス状に配列された各画素への電荷の蓄積及びフレームの読み出しを画素行単位の走査で行う撮像素子を備え、前記フリッカ検出処理は、時間的に連続する複数フレーム間の蓄積電荷量の差分を取ることで行うことを特徴とする請求項1に記載した撮像装置におけるフリッカ検出方法。   An image pickup device that performs charge accumulation and frame readout in each pixel arranged in a matrix by scanning in units of pixel rows, and the flicker detection process includes a difference in accumulated charge amount between a plurality of temporally continuous frames. The flicker detection method in the imaging apparatus according to claim 1, wherein the flicker detection method is performed. 前記フリッカ検出処理を連続して実施し、検出結果が所定回数変化しなかった場合は前記フリッカ検出処理を停止することを特徴とする請求項1または2に記載した撮像装置におけるフリッカ検出方法。   The flicker detection method according to claim 1 or 2, wherein the flicker detection process is continuously performed, and the flicker detection process is stopped when a detection result does not change a predetermined number of times. 前記フリッカの検出処理を停止した状態において、被写体の明るさが所定量以上変化した場合、前記フリッカ検出処理を再開することを特徴とする請求項3に記載した撮像装置におけるフリッカ検出方法。   4. The flicker detection method for an imaging apparatus according to claim 3, wherein the flicker detection process is resumed when the brightness of the subject changes by a predetermined amount or more in a state where the flicker detection process is stopped. 被写体の明るさが予め定められた値を上回った場合は前記フリッカ検出/補正処理を停止することを特徴とする請求項1乃至4のいずれかに記載した撮像装置におけるフリッカ検出方法。   5. The flicker detection method for an image pickup apparatus according to claim 1, wherein the flicker detection / correction process is stopped when the brightness of the subject exceeds a predetermined value. 各画素がマトリクス状に配列され、電荷の蓄積及びフレームの読み出しを画素行単位の走査で行う撮像素子を備えた撮像装置を有し、該撮像装置からの画像データに含まれる点滅する光源下で発生するフリッカの有無と周波数とを検出するフリッカ検出において、時間的に連続する複数フレーム間の蓄積電荷量の差分を取り、フリッカ成分を検出してフリッカ補正処理を実施するフリッカ検出/補正部からなる撮像装置のフリッカ検出装置において、
前記フリッカ検出/補正部は、前記フリッカ補正処理実施状態において新たなフリッカ検出処理を実施し、該新たなフリッカ検出処理実施時にフリッカ発生状態である場合、前記フリッカ補正処理を前記フリッカ周波数と異なる周波数に対応させる機能を有していることを特徴とする撮像装置におけるフリッカ検出装置。
Each pixel is arranged in a matrix, and has an imaging device having an imaging device that performs charge accumulation and frame readout by scanning in units of pixel rows, and under a blinking light source included in image data from the imaging device In flicker detection for detecting presence / absence and frequency of flicker that occurs, a flicker detection / correction unit that performs a flicker correction process by taking a difference in accumulated charge amount between a plurality of temporally continuous frames and detecting a flicker component In the flicker detection device of the imaging device
The flicker detection / correction unit performs a new flicker detection process in the flicker correction process execution state, and if the flicker generation state is present when the new flicker detection process is executed, the flicker correction process is performed at a frequency different from the flicker frequency. A flicker detection apparatus in an imaging apparatus, characterized by having a function corresponding to
前記フリッカ検出/補正部は、撮像画像データから被写体の明るさを検出する機能を有し、前記被写体の明るさが予め定められた値を上回った場合は前記フリッカ補正処理を停止する機能を有することを特徴とする請求項6に記載した撮像装置におけるフリッカ検出装置。   The flicker detection / correction unit has a function of detecting the brightness of a subject from captured image data, and has a function of stopping the flicker correction process when the brightness of the subject exceeds a predetermined value. The flicker detection apparatus in the imaging apparatus according to claim 6.
JP2006294939A 2006-10-30 2006-10-30 Flicker detecting method and device in imaging apparatus Pending JP2008113237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006294939A JP2008113237A (en) 2006-10-30 2006-10-30 Flicker detecting method and device in imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006294939A JP2008113237A (en) 2006-10-30 2006-10-30 Flicker detecting method and device in imaging apparatus

Publications (1)

Publication Number Publication Date
JP2008113237A true JP2008113237A (en) 2008-05-15

Family

ID=39445507

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006294939A Pending JP2008113237A (en) 2006-10-30 2006-10-30 Flicker detecting method and device in imaging apparatus

Country Status (1)

Country Link
JP (1) JP2008113237A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010160281A (en) * 2009-01-07 2010-07-22 Hoya Corp Imager
JP2012142853A (en) * 2011-01-05 2012-07-26 Nikon Corp Imaging apparatus and image processing control program
JP2016219899A (en) * 2015-05-15 2016-12-22 カシオ計算機株式会社 Imaging device, imaging method and program
CN107169952A (en) * 2017-03-07 2017-09-15 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of fringe counting method and information detecting method positioned for visual light imaging

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010160281A (en) * 2009-01-07 2010-07-22 Hoya Corp Imager
US8681263B2 (en) 2009-01-07 2014-03-25 Ricoh Imaging Company, Ltd Imager capturing an image with a rolling shutter using flicker detection
JP2012142853A (en) * 2011-01-05 2012-07-26 Nikon Corp Imaging apparatus and image processing control program
JP2016219899A (en) * 2015-05-15 2016-12-22 カシオ計算機株式会社 Imaging device, imaging method and program
CN107169952A (en) * 2017-03-07 2017-09-15 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of fringe counting method and information detecting method positioned for visual light imaging
CN107169952B (en) * 2017-03-07 2021-07-23 广东顺德中山大学卡内基梅隆大学国际联合研究院 Stripe recognition and information detection method for visible light imaging positioning

Similar Documents

Publication Publication Date Title
JP4840578B2 (en) Flicker detection method and apparatus for imaging apparatus
JP4979369B2 (en) Flicker detection circuit and method for image sensor
JP4856765B2 (en) Imaging apparatus and flicker detection method
JP4106554B2 (en) Imaging environment determination method and imaging apparatus
US9794493B2 (en) Image capturing apparatus, image capturing method, and control method
KR100709543B1 (en) Image capture device capable of flicker detection
JP3749038B2 (en) Solid-state imaging device
US9716840B2 (en) Image pickup apparatus that reduces unevenness of exposure caused by artificial light source, method of detecting change in amount of light, and storage medium
JP2006245784A (en) Solid-state imaging apparatus and driving method thereof, and imaging system
US8040407B2 (en) Image capturing apparatus and image capturing apparatus control method
JP2011030207A (en) Imaging device, and flash determining method and program
JP2008113237A (en) Flicker detecting method and device in imaging apparatus
JP4519306B2 (en) Flicker remover
CN111131667B (en) Image pickup apparatus that performs flicker detection, control method therefor, and storage medium
JP4908939B2 (en) Imaging device
JP2010273147A (en) Imaging signal specific state detector, imaging apparatus, detection method for imaging signal specific state, program and integrated circuit
JP2011101208A (en) Imaging apparatus
JP4850920B2 (en) Imaging device capable of flicker detection
JP5097048B2 (en) Imaging apparatus and smear correction method thereof
JP2007329604A (en) Fluorescent light flicker detection circuit
JP2004048616A (en) Sensor module
JP2009111613A (en) Flicker correcting device
JP2005033687A (en) Defect detecting apparatus and method therefor, recording medium, as well as program
KR100942803B1 (en) Apparatus and method for compensating low illuminance of camera
KR20120069564A (en) Imaging device and imaging method