JP5383886B2 - Image processing apparatus, image processing method, program, and storage medium - Google Patents

Image processing apparatus, image processing method, program, and storage medium Download PDF

Info

Publication number
JP5383886B2
JP5383886B2 JP2012222901A JP2012222901A JP5383886B2 JP 5383886 B2 JP5383886 B2 JP 5383886B2 JP 2012222901 A JP2012222901 A JP 2012222901A JP 2012222901 A JP2012222901 A JP 2012222901A JP 5383886 B2 JP5383886 B2 JP 5383886B2
Authority
JP
Japan
Prior art keywords
image
flicker
flicker component
processing apparatus
signal
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.)
Expired - Fee Related
Application number
JP2012222901A
Other languages
Japanese (ja)
Other versions
JP2013017238A (en
Inventor
宏 中岡
和也 稲生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2012222901A priority Critical patent/JP5383886B2/en
Publication of JP2013017238A publication Critical patent/JP2013017238A/en
Application granted granted Critical
Publication of JP5383886B2 publication Critical patent/JP5383886B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)

Description

本発明は撮像素子を用いて撮像された画像中のフリッカ成分を補正する技術に関する。   The present invention relates to a technique for correcting a flicker component in an image captured using an image sensor.

撮像素子を用いた撮像装置において、蛍光灯照明下の被写体を動画や静止画の連続撮影のように続けて複数フレーム(またはフィールド)撮影する場合、撮像画像に周期的な明暗が現れることがある。この現象は蛍光灯フリッカと呼ばれ、商用電源周波数と撮像装置の垂直同期周波数との違いによるものである。   In an image pickup apparatus using an image pickup device, when a subject under fluorescent light illumination is shot continuously for a plurality of frames (or fields) like continuous shooting of moving images or still images, periodic brightness and darkness may appear in the captured image. . This phenomenon is called fluorescent lamp flicker, and is due to the difference between the commercial power supply frequency and the vertical synchronization frequency of the imaging device.

そこで、従来、周期的な信号レベルの変動成分(以下フリッカ成分と呼ぶ)を検出し、その逆ゲインを乗算することでフリッカ成分の検出と補正を行う技術が提案されている(特許文献1参照)。   Therefore, conventionally, a technique for detecting and correcting a flicker component by detecting a periodic signal level fluctuation component (hereinafter referred to as a flicker component) and multiplying by its inverse gain has been proposed (see Patent Document 1). ).

特開平11−122513号公報Japanese Patent Laid-Open No. 11-122513

撮像装置に対する蛍光灯フリッカのフリッカ成分は、電源周波数や照明の発光特性によって変化するが、撮像装置の撮像素子に対する蓄積時間やフレームレート、画素の加算方式や間引き方式による読み出し時間の変化、といった駆動状態によっても変化する。この駆動状態は、撮像システムの制御やユーザからの指示によって変わるものであり、急激に変化することがある。この場合には、駆動状態の変化に伴ってフリッカ成分も大きく変動することになる。   The flicker component of the fluorescent lamp flicker for the imaging device varies depending on the power supply frequency and the light emission characteristics of the illumination, but the driving time such as the accumulation time and frame rate for the imaging device of the imaging device, and the change in the readout time due to the pixel addition method and thinning method It also changes depending on the state. This driving state changes depending on the control of the imaging system or an instruction from the user, and may change abruptly. In this case, the flicker component greatly fluctuates as the driving state changes.

しかしながら、特許文献1に記載の補正方法は、現在及び過去のフレーム(またはフィールド)の画像信号を水平方向に積分して生成した垂直方向の強度分布を用いてフリッカ成分を検出する方法である。このような方法では、フリッカ成分の急激な変化に対して追従できなかったり、検出に用いた画像信号と補正対象となる画像信号に時間差が生じたりすることによって、適切な補正処理が行われず、かえって撮影画像に悪影響を与えるという問題点があった。   However, the correction method described in Patent Document 1 is a method of detecting a flicker component using an intensity distribution in a vertical direction generated by integrating image signals of current and past frames (or fields) in the horizontal direction. In such a method, it is not possible to follow a sudden change in the flicker component, or a time difference occurs between the image signal used for detection and the image signal to be corrected, so that appropriate correction processing is not performed. On the other hand, there was a problem that the captured image was adversely affected.

本発明はこのような従来技術の問題点に鑑みなされたものである。本発明は、撮像素子の駆動方式の変化によって、フリッカ成分が急激に変化した場合でも、精度良くフリッカ成分を補正可能な画像処理装置及び画像処理方法を提供することを目的の1つとする。   The present invention has been made in view of such problems of the prior art. An object of the present invention is to provide an image processing apparatus and an image processing method capable of accurately correcting a flicker component even when the flicker component is rapidly changed due to a change in a driving method of an image sensor.

このような課題を解決するために、本発明の技術的特徴として、第1の画像及び第2の画像を取得する取得手段と、前記第1の画像からフリッカ成分を検出する検出手段と、前記検出手段により検出される前記第1の画像に対するフリッカ成分と、前記第1の画像と前記第2の画像との間の蓄積時間の違いとに基づいて、前記第2の画像に対するフリッカ成分の振幅あるいは位相のうちの少なくとも1つを算出する算出手段と、前記算出手段により算出される前記第2の画像に対するフリッカ成分の振幅あるいは位相を用いて前記第2の画像を補正する補正手段と、を有することを特徴とする。 In order to solve such a problem, as technical features of the present invention, acquisition means for acquiring a first image and a second image, detection means for detecting a flicker component from the first image, The flicker component amplitude for the second image based on the flicker component for the first image detected by the detection means and the difference in accumulation time between the first image and the second image. Alternatively, calculation means for calculating at least one of the phases, and correction means for correcting the second image using the amplitude or phase of the flicker component for the second image calculated by the calculation means, It is characterized by having.

また、別の技術的特徴としては、第1の画像及び第2の画像を取得する取得ステップと、
前記第1の画像からフリッカ成分を検出する検出ステップと、前記検出ステップにて検出される前記第1の画像に対するフリッカ成分と、前記第1の画像と前記第2の画像との間の蓄積時間の違いとに基づいて、前記第2の画像に対するフリッカ成分の振幅あるいは位相のうちの少なくとも1つを算出する算出ステップと、前記算出ステップにて算出される前記第2の画像に対するフリッカ成分の振幅あるいは位相を用いて前記第2の画像を補正する補正ステップと、を有することを特徴とする。
Further, as another technical feature, an acquisition step of acquiring the first image and the second image,
A detection step for detecting a flicker component from the first image, a flicker component for the first image detected in the detection step, and an accumulation time between the first image and the second image A calculation step for calculating at least one of an amplitude or a phase of a flicker component with respect to the second image based on the difference between the two and an amplitude of the flicker component with respect to the second image calculated in the calculation step Alternatively, a correction step of correcting the second image using a phase is provided.

以上説明したように、本発明によれば、撮像素子の駆動方式の変化によって、フリッカ成分が急激に変化した場合でも、精度良くフリッカ成分を補正でき、画質を向上することができる。   As described above, according to the present invention, even when the flicker component changes suddenly due to a change in the driving method of the image sensor, the flicker component can be corrected with high accuracy and the image quality can be improved.

第1の実施形態のフリッカ検出・補正装置の概略構成を説明するためのブロック図である。It is a block diagram for demonstrating schematic structure of the flicker detection and correction apparatus of 1st Embodiment. 第1の実施形態のフリッカ検出から補正までのタイミングチャートを示したものである。2 is a timing chart from flicker detection to correction according to the first embodiment. 第1の実施形態の蓄積時間の違いによる画像信号中のフリッカの様子をあらわした模式図である。FIG. 6 is a schematic diagram illustrating a flicker state in an image signal due to a difference in accumulation time according to the first embodiment. 第1の実施形態の蓄積時間と点滅光源による輝度信号の変調の関係を示した模式図である。It is the schematic diagram which showed the relationship between the accumulation time of 1st Embodiment, and the modulation | alteration of the luminance signal by a blinking light source. 第1の実施形態の蓄積時間と位相差の関係を表したタイミングチャートである。3 is a timing chart illustrating a relationship between an accumulation time and a phase difference according to the first embodiment. 第2の実施形態のフリッカ検出から補正までのタイミングチャートを示したものである。6 is a timing chart from flicker detection to correction according to the second embodiment. 第3の実施形態のフリッカ検出から補正までのタイミングチャートを示したものである。10 is a timing chart from flicker detection to correction according to the third embodiment. 第3の実施形態の読み出し時間の違いによる画像信号中のフリッカの様子をあらわした模式図である。It is the schematic diagram showing the mode of the flicker in the image signal by the difference in the readout time of 3rd Embodiment.

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

[第1の実施形態]
以下、本発明の第1の実施形態を図面に参照し、説明していく。図1は画像処理装置のブロック図を示す。
[First Embodiment]
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 shows a block diagram of an image processing apparatus.

101は光電変換素子を有する撮像素子で、制御手段102が発生する制御信号をもとにした駆動パルスで駆動され、被写体像を光電変換により電気信号に変換し出力する。変換された電気信号(アナログ信号)は、AD変換部106においてデジタル信号に変換され出力される。このとき、撮像素子101が電子シャッタ機能を有する場合は、制御手段102からの制御信号により、必要な露光時間となるように露光時間を確保してもよい。103は、AD変換部106から出力された画像信号に含まれる、点滅光源によって生じる信号レベルの変動成分からフリッカ成分を検出するフリッカ検出手段である。   An image sensor 101 having a photoelectric conversion element is driven by a drive pulse based on a control signal generated by the control means 102, converts a subject image into an electrical signal by photoelectric conversion, and outputs the electric signal. The converted electrical signal (analog signal) is converted into a digital signal by the AD converter 106 and output. At this time, when the image sensor 101 has an electronic shutter function, the exposure time may be ensured by the control signal from the control means 102 so that the required exposure time is obtained. Reference numeral 103 denotes flicker detection means for detecting a flicker component from a signal level fluctuation component generated by the blinking light source included in the image signal output from the AD conversion unit 106.

102はシステムの制御を行う制御手段で、撮像素子101に対して蓄積時間などの制御信号を出力し、後述する補正値予測手段104に対して撮像素子101の制御状態を制御情報として出力する。104はフリッカ検出手段103において検出されたフリッカ成分と、制御手段102から出力される撮像素子101の制御情報を元に、画像信号中に発生している信号レベルの変動成分が現れないように補正するための補正値を生成している補正値予測手段である。105は、補正値予測手段104で生成された補正値を元に画像信号に対して演算処理し、画像信号上に発生しているフリッカを抑圧させるフリッカ補正手段である。   A control unit 102 controls the system, outputs a control signal such as an accumulation time to the image sensor 101, and outputs a control state of the image sensor 101 as control information to a correction value predicting unit 104 described later. Reference numeral 104 is a correction based on the flicker component detected by the flicker detection unit 103 and the control information of the image sensor 101 output from the control unit 102 so that the fluctuation component of the signal level generated in the image signal does not appear. Correction value predicting means for generating a correction value to do. Reference numeral 105 denotes flicker correction means for performing arithmetic processing on the image signal based on the correction value generated by the correction value prediction means 104 and suppressing flicker generated on the image signal.

次に、本発明の第1の実施形態のタイミングチャートを図2を参照して説明していく。201は撮像装置の撮像方式で決定される垂直同期信号である。r1〜r7は撮像素子101の読み出し駆動を表している。本実施形態では撮像素子101は、XYアドレス型の走査方法を採るCMOSイメージセンサを用いることとし、以下説明を続ける。XYアドレス型の走査方法の撮像素子の場合、画素ごとの露光タイミングがライン方向で順次行われるため、図示のように1垂直同期信号期間内で撮像素子の全画素を順次読み出す。またs1〜s7は撮像素子101の電荷変換部に蓄積された電荷をリセットするための駆動を表している。各画素の露光時間を統一するため、読み出し駆動と同様にリセットのタイミングもライン方向で順次行われる。図のsとrではさまれた時間が撮像素子101の蓄積時間となり、図のAからCまでの画像信号が蓄積時間が短く、図のDからGまでの画像信号が蓄積時間が長い画像信号として出力される。202はフリッカ検出手段103の処理動作が行われるタイミングを示しており、画像信号が読み出されている期間の一部で検出動作を行っている。203は撮像素子101の制御信号を制御手段102が撮像素子101に対して出力するタイミングを示したものであり、図の場合例えば、タイミング204にて撮像素子101に対し画像信号Dを取得する際の蓄積時間を制御信号bとして与える。205は撮像素子101の制御情報を制御手段102が補正値予測手段104に対して出力するタイミングを示したものである。制御手段102が撮像素子101へ制御信号を出力するタイミングに対して、1垂直同期期間遅れて出力される。図の場合、制御手段102が制御信号bを撮像素子101に対して204のタイミングで出力するのに対し、補正値予測手段104に対しては206のタイミングで制御情報bを出力する。これにより、画像信号Dを補正する補正値を生成する際、画像信号Dを取得したときの蓄積時間を参照することが可能になる。207は補正値予測手段104が制御手段102から得られた制御情報と、フリッカ検出手段103から得られたフリッカ成分から補正値を予測するタイミングを示したものである。図において、画像信号Cと画像信号Dで蓄積時間を急激に変化するように撮像素子101は駆動している。補正値予測手段104は、制御手段102からフリッカ検出の対象となっている画像信号が取得された際の撮像素子101の制御情報を受け取り、常に1垂直同期期間前の制御情報と得られる制御情報を比較している。そして、該制御情報が変化した場合に補正値の予測を行うよう動作する。208から214は補正値予測手段104が生成した補正値をフリッカ補正手段105に対し設定するタイミングを示している。すなわち、制御情報が変化しないときはフリッカ検出手段102から得られたフリッカ成分から補正値を生成する。そして、制御情報が変化した場合には、フリッカ検出手段102から得られたフリッカ成分と、制御手段から出力された制御情報を元に予測して補正値を生成するように動作する。設定された補正値は、次の垂直同期信号で更新され、撮像素子101から読み出される画像信号に対して補正処理が行われる。この図の場合、210が予測して生成された補正値が設定されているタイミングになる。   Next, a timing chart of the first embodiment of the present invention will be described with reference to FIG. Reference numeral 201 denotes a vertical synchronization signal determined by the imaging method of the imaging apparatus. r1 to r7 represent the reading drive of the image sensor 101. In this embodiment, the image sensor 101 uses a CMOS image sensor that employs an XY address type scanning method, and the following description will be continued. In the case of the image sensor of the XY address type scanning method, since the exposure timing for each pixel is sequentially performed in the line direction, all pixels of the image sensor are sequentially read out within one vertical synchronization signal period as shown in the figure. Further, s1 to s7 represent driving for resetting the charge accumulated in the charge conversion unit of the image sensor 101. In order to unify the exposure time of each pixel, the reset timing is sequentially performed in the line direction as in the read driving. The time between s and r in the figure is the accumulation time of the image sensor 101, the image signals from A to C in the figure have a short accumulation time, and the image signals from D to G in the figure have a long accumulation time. Is output as Reference numeral 202 denotes the timing at which the processing operation of the flicker detection means 103 is performed, and the detection operation is performed during a part of the period during which the image signal is read. Reference numeral 203 denotes the timing at which the control means 102 outputs the control signal of the image sensor 101 to the image sensor 101. In the case of the figure, for example, when acquiring the image signal D to the image sensor 101 at the timing 204. Is given as a control signal b. Reference numeral 205 denotes a timing at which the control unit 102 outputs control information of the image sensor 101 to the correction value prediction unit 104. It is output with a delay of one vertical synchronization period with respect to the timing at which the control means 102 outputs a control signal to the image sensor 101. In the case of the figure, the control unit 102 outputs the control signal b to the image sensor 101 at the timing of 204, while the control information b is output to the correction value prediction unit 104 at the timing of 206. Thus, when generating a correction value for correcting the image signal D, it is possible to refer to the accumulation time when the image signal D is acquired. Reference numeral 207 shows the timing at which the correction value prediction means 104 predicts the correction value from the control information obtained from the control means 102 and the flicker component obtained from the flicker detection means 103. In the figure, the image sensor 101 is driven so that the accumulation time changes rapidly between the image signal C and the image signal D. The correction value prediction unit 104 receives control information of the image sensor 101 when an image signal that is a target of flicker detection is acquired from the control unit 102, and is always obtained as control information before one vertical synchronization period. Are comparing. And when this control information changes, it operate | moves so that a correction value may be estimated. Reference numerals 208 to 214 indicate timings when the correction value generated by the correction value predicting unit 104 is set for the flicker correcting unit 105. That is, when the control information does not change, a correction value is generated from the flicker component obtained from the flicker detection means 102. When the control information changes, an operation is performed so as to generate a correction value by predicting based on the flicker component obtained from the flicker detection unit 102 and the control information output from the control unit. The set correction value is updated with the next vertical synchronization signal, and correction processing is performed on the image signal read from the image sensor 101. In the case of this figure, 210 is the timing at which the correction value generated by prediction is set.

次に、フリッカ検出手段から出力されるフリッカ成分について検出動作の例とともに説明する。   Next, the flicker component output from the flicker detection means will be described together with an example of detection operation.

図3は、撮像素子101で撮像された画像信号を模式的に表したものであり、301が撮像素子101の蓄積時間が短い場合の画像信号の様子、303が撮像素子101の蓄積時間が長いときの様子を示したものである。点滅光源によって信号レベルが変調されており、302や304に示すように画像信号内に点滅光源の発光周期に依存した周期的なレベル変動が発生する。この時間領域における周期的な信号レベルの変動を周波数領域に変換して検波することで、画像信号内に含まれるフリッカ成分を抽出することができる。   FIG. 3 schematically illustrates an image signal captured by the image sensor 101, where 301 is an image signal when the accumulation time of the image sensor 101 is short, and 303 is a long accumulation time of the image sensor 101. It shows the situation of time. The signal level is modulated by the blinking light source, and periodic level fluctuations depending on the light emission period of the blinking light source occur in the image signal as indicated by 302 and 304. The flicker component contained in the image signal can be extracted by converting the periodic signal level fluctuation in the time domain into the frequency domain and detecting it.

(フリッカ成分の抽出)
撮像素子101から得られた画像信号を、周波数領域に変換する方法としていくつか考えられるが、画像信号のように一定期間でサンプリングされたデータに対しては離散フーリエ変換を用いて周波数領域に変換するのがもっとも一般的である。以下、離散フーリエ変換を用いて周波数領域に変換し、フリッカ成分を算出する方法について説明する。
(Extraction of flicker components)
There are several possible methods for converting the image signal obtained from the image sensor 101 into the frequency domain, but for data sampled over a certain period, such as an image signal, it is converted into the frequency domain using the discrete Fourier transform. This is the most common. Hereinafter, a method for calculating the flicker component by converting into the frequency domain using the discrete Fourier transform will be described.

点滅光源によって生じるフリッカは、撮像素子101の駆動から、垂直方向に明暗の形であらわれる(図3参照)。したがって、画像信号内の垂直方向にサンプリングデータが生成されていれば良く、例えば、水平ライン毎に信号を平均処理して、302・304のように、時間軸(時間サンプリング)と信号レベルの2次元情報に縮退させる方法がある。あるいは、これらに限定することは無く、画像信号の中央でフリッカが発生しているとユーザに不快感を与えると考えれば、画像中央に検出枠を設け、検出枠内で水平方向毎に信号を平均する方法も考えられる。いずれにしろ、何らかの方法を用いて時間軸(時間サンプリング)と信号レベルの2次元情報に縮退させたデータを生成する。また、映像信号がNTSCで商用電源の周波数が50Hzの場合、画像信号内に現れるフリッカは100/60≒1.7周期である。このため、画像信号の垂直方向のうち全部あるいは1周期以上の一部分をサンプリングすればよい。また、映像信号がPALで商用電源周波数が60Hzの場合、120/50=2.4周期であるため、同様に画像信号の垂直方向のうち全部あるいは1周期以上の一部分をサンプリングすればよい。   Flickers generated by the flashing light source appear in the form of light and dark in the vertical direction from the driving of the image sensor 101 (see FIG. 3). Therefore, it is only necessary to generate sampling data in the vertical direction in the image signal. For example, the signal is averaged for each horizontal line, and the time axis (time sampling) and the signal level are 2 as in 302 and 304. There is a method to reduce the dimension information. Alternatively, the present invention is not limited to this, and if it is considered that the user feels uncomfortable when flicker occurs in the center of the image signal, a detection frame is provided in the center of the image, and a signal is sent for each horizontal direction within the detection frame. An averaging method is also conceivable. In any case, data reduced to two-dimensional information of a time axis (time sampling) and a signal level is generated using some method. Further, when the video signal is NTSC and the frequency of the commercial power supply is 50 Hz, the flicker appearing in the image signal is 100 / 60≈1.7 cycles. For this reason, it suffices to sample all or a part of one period or more in the vertical direction of the image signal. Further, when the video signal is PAL and the commercial power supply frequency is 60 Hz, since 120/50 = 2.4 cycles, all of the vertical direction of the image signal or a part of one cycle or more may be similarly sampled.

次に、得られたサンプリングデータを用いて周波数領域に変換する例について説明する。サンプリングの母数をN、サンプリングされたデータをXn(n=0,1,…N−1)とすると、次式で表される離散的なフーリエ係数で周波数領域に離散フーリエ変換される。   Next, an example of converting to the frequency domain using the obtained sampling data will be described. Assuming that the sampling parameter is N and the sampled data is Xn (n = 0, 1,... N−1), discrete Fourier transform is performed in the frequency domain with discrete Fourier coefficients expressed by the following equation.

時間L(sec)をNヶに時間サンプリングした場合、サンプリング間隔をa(sec)とすると、離散フーリエ変換後のフーリエ係数は、次式で表される離散的な周波数fkの範囲で求められる。 When the time L (sec) is sampled for N times, and the sampling interval is a (sec), the Fourier coefficient after the discrete Fourier transform is obtained in the range of the discrete frequency fk expressed by the following equation.

fsは時間領域におけるサンプリング周波数である。 fs is a sampling frequency in the time domain.

画像信号からサンプリングされたデータ列は実時間信号であるので、(式1)は展開すると、実部Reと虚部Imに分離することができ、次式で表される。   Since the data sequence sampled from the image signal is a real-time signal, (Expression 1) can be separated into a real part Re and an imaginary part Im when developed, and is expressed by the following expression.

ある周波数fkにおける振幅スペクトルAkは、(式4)より次式で求められる。   The amplitude spectrum Ak at a certain frequency fk is obtained by the following equation from (Equation 4).

また、周波数領域に変換した際のある周波数fkにおける位相成分Ωkは、(式4)より次式で求められる。   Further, the phase component Ωk at a certain frequency fk when converted into the frequency domain is obtained by the following equation from (Equation 4).

(式5)、(式6)から、(式4)にフリッカ成分として周波数成分とそれに対応した位相成分が含まれており、フリッカ検出手段103から補正値予測手段104へ出力されるフリッカ成分を表している。 From (Equation 5) and (Equation 6), (Equation 4) includes a frequency component and a corresponding phase component as a flicker component, and the flicker component output from the flicker detection means 103 to the correction value prediction means 104 is Represents.

次に、補正値予測手段104において、前述したフリッカ検出手段103から得られるフリッカ成分(各周波数の振幅・位相)と制御手段102から得られる撮像素子101の制御情報から補正パラメータを予測して補正値を生成する方法について述べていく。   Next, the correction value prediction unit 104 predicts and corrects the correction parameter from the flicker component (amplitude / phase of each frequency) obtained from the flicker detection unit 103 and the control information of the image sensor 101 obtained from the control unit 102. We will describe how to generate values.

撮像素子101の駆動状態が変化しない場合、例えば図2において、画像信号Bからフリッカ成分を検出し、画像信号Cに対して補正する場合の補正値を生成する方法について述べる。前述したように、点滅光源によって発生するフリッカは電源周波数の倍の周波数で画像信号内に現れるため、例えば、撮像装置がNTSCで電源周波数が50Hzの場合、3フィールドごとに繰り返し同位相で現れることが知られている。従って、画像信号C内に発生しているフリッカのフリッカ成分の位相と画像信号D内で発生しているフリッカのフリッカ成分の位相の差θkは、以下の式で表される。なお、mは(式2)より算出される周波数fk=100(Hz)の時のkにおいて、次式で表される位相差θkがθk=2πfk x(1/60)を満たす。   When the driving state of the image sensor 101 does not change, a method for generating a correction value when detecting a flicker component from the image signal B and correcting the image signal C in FIG. As described above, flicker generated by the blinking light source appears in the image signal at a frequency twice the power supply frequency. For example, when the imaging apparatus is NTSC and the power supply frequency is 50 Hz, it repeatedly appears in the same phase every three fields. It has been known. Accordingly, the difference θk between the phase of the flicker component of the flicker generated in the image signal C and the phase of the flicker component of the flicker generated in the image signal D is expressed by the following equation. Note that m is k at the frequency fk = 100 (Hz) calculated from (Expression 2), and the phase difference θk expressed by the following expression satisfies θk = 2πfk x (1/60).

フリッカ成分の振幅値は撮像素子101の蓄積時間に依存するが、画像信号Bと画像信号Cでは蓄積時間は同じであるため、フレーム間では振幅値の変動はないとみなすことができる。従って以上から、画像信号Bから検出されたフリッカ成分のうち位相成分を(式7)で示した値だけ予測して逆離散フーリエ変換することで、フリッカ成分を時間領域に変換することが可能となる。逆離散フーリエ変換は、離散フーリエ変換の実部と虚部((式4))から、次式で表される。 Although the amplitude value of the flicker component depends on the accumulation time of the image sensor 101, since the accumulation time is the same for the image signal B and the image signal C, it can be considered that there is no fluctuation in the amplitude value between frames. Therefore, from the above, it is possible to convert the flicker component into the time domain by predicting only the phase component of the flicker component detected from the image signal B and performing inverse discrete Fourier transform. Become. The inverse discrete Fourier transform is expressed by the following expression from the real part and the imaginary part ((Expression 4)) of the discrete Fourier transform.

フリッカ成分は被写体の信号強度に比例することが一般的に知られており、画像信号内に発生しているフリッカを打ち消すためには、上式で演算したゼロ中心の時間領域のフリッカ成分を1中心にし逆数を求めることで補正値を生成することができる。そして生成した補正値を画像信号に対して乗算することでフリッカのない画像信号を生成することができる。   It is generally known that the flicker component is proportional to the signal intensity of the subject, and in order to cancel the flicker generated in the image signal, the flicker component in the zero-center time domain calculated by the above equation is set to 1. A correction value can be generated by calculating the reciprocal at the center. An image signal without flicker can be generated by multiplying the image signal by the generated correction value.

一方、再び図2を参照すると、画像信号Cで検出されたフリッカ成分から補正値を生成し、画像信号Dに対して補正動作が行われるタイミングが存在する。蓄積時間の短い画像信号Cで検出されたフリッカ成分で補正値を生成し、蓄積時間の長い画像信号Dに対してその補正値を適用してしまうと、適切な補正動作ができなくなってしまう。図3の302、304からみても明らかなように、フリッカ成分の振幅値や位相が異なるためである。そこで、検出されたフリッカ成分から補正値を生成する際に、制御手段102から出力される撮像素子101の制御情報から振幅値と位相を予測することで画像信号Dに対して適切な補正を行うことができる。以下、補正値を予測する方法について述べていく。   On the other hand, referring to FIG. 2 again, there is a timing at which a correction value is generated from the flicker component detected in the image signal C and a correction operation is performed on the image signal D. If a correction value is generated with the flicker component detected from the image signal C having a short accumulation time and the correction value is applied to the image signal D having a long accumulation time, an appropriate correction operation cannot be performed. This is because, as is apparent from 302 and 304 in FIG. 3, the amplitude values and phases of the flicker components are different. Therefore, when generating a correction value from the detected flicker component, the image signal D is appropriately corrected by predicting the amplitude value and phase from the control information of the image sensor 101 output from the control means 102. be able to. Hereinafter, a method for predicting the correction value will be described.

(補正値の振幅の予測)
図4に撮像素子の蓄積時間と点滅光源による輝度信号の変調度の関係を示す。変調度は、点滅光源によってフリッカが生じるときのレベル変動(振幅)をフリッカが生じないときの信号レベルで正規化したものである。401は各蓄積時間において、フリッカによる信号レベルの変調がどの程度あるかを示している。蓄積時間が短くなるほど点滅光源の光量を積分する時間が短くなるため、ライン毎の信号レベルの変動が大きくなり、積分する時間と点滅光源の周期から図のような特性をもっている。補正値予測手段104は撮像素子101の蓄積時間と点滅光源による輝度信号の変調度をあらかじめテーブル化して記憶しておく。該テーブルは、あらかじめ測定された図4の401の特性を離散化させて保持したり、あるいは撮像装置内で学習させて記憶させても良い。撮像素子101の蓄積時間がt1からt2に変化した場合、補正値予測手段104は、制御手段102から撮像素子の制御情報として補正対象となる画像信号を蓄積したときの撮像素子の蓄積時間t2を受け取る。それまでの蓄積時間t1の時の変調度α1と受け取った蓄積時間t2の変調度α2をテーブルを参照して取得し、(式8)で生成した補正値に対してα2/α1だけ変調させて新たな補正値を生成することで、補正パラメータである補正値の振幅の予測が可能となる。
(Prediction of correction value amplitude)
FIG. 4 shows the relationship between the accumulation time of the image sensor and the degree of modulation of the luminance signal by the blinking light source. The degree of modulation is obtained by normalizing the level fluctuation (amplitude) when flicker is generated by the blinking light source with the signal level when flicker is not generated. 401 indicates how much the signal level is modulated by flicker in each accumulation time. As the accumulation time becomes shorter, the time for integrating the light quantity of the flashing light source becomes shorter, so the fluctuation of the signal level for each line becomes larger, and the characteristics shown in the figure are obtained from the integration time and the cycle of the flashing light source. The correction value predicting means 104 stores the accumulation time of the image sensor 101 and the modulation degree of the luminance signal from the blinking light source in a table in advance. The table may be stored by discretizing the characteristics of 401 in FIG. 4 measured in advance, or may be learned and stored in the imaging apparatus. When the accumulation time of the image sensor 101 changes from t1 to t2, the correction value prediction unit 104 calculates the accumulation time t2 of the image sensor when the image signal to be corrected is accumulated from the control unit 102 as the control information of the image sensor. receive. The modulation degree α1 at the previous accumulation time t1 and the modulation degree α2 of the received accumulation time t2 are obtained by referring to the table, and the correction value generated in (Equation 8) is modulated by α2 / α1. By generating a new correction value, it is possible to predict the amplitude of the correction value that is the correction parameter.

(補正値の位相の予測)
図5を参照して補正値の位相の予測方法を説明する。503、505は撮像素子101の電荷変換部に蓄積された電荷をリセットするための駆動を、504,506は読み出し駆動を示しており、503と504にはさまれた時間t1と505と506にはさまれた時間t2がそれぞれ蓄積時間を示している。t1とt2のフリッカ成分の位相差を算出するためには、点滅光源を蓄積している蓄積時間の重心501と502の時間差Aから位相情報に変換すればよく、垂直同期信号の周期が1/60sの場合、時間差Aは次式で表される。
(Prediction of correction value phase)
A method of predicting the phase of the correction value will be described with reference to FIG. Reference numerals 503 and 505 denote driving for resetting the electric charge accumulated in the charge conversion unit of the image sensor 101, and reference numerals 504 and 506 denote readout driving, and at times t1, 505, and 506 between 503 and 504, respectively. The sandwiched time t2 indicates the accumulation time. In order to calculate the phase difference between the flicker components of t1 and t2, the time difference A between the centroids 501 and 502 of the accumulation time during which the flashing light source is accumulated may be converted into phase information, and the period of the vertical synchronization signal is 1 / In the case of 60 s, the time difference A is expressed by the following equation.

すなわち、(式9)の第2項が蓄積時間の変化によって発生するフリッカ成分の位相差を表している。従って、補正値を算出する際に、(式7)の位相差θkのほかに、(式9)の第2項の成分を蓄積時間の変化による位相差成分Φkとして加味することで、位相予測が可能となる。位相差成分Φkは、(式2)から算出される周波数fk=100(Hz)の時のkにおいて、次式で表される位相差ΦkがΦk=2πfk x((t1−t2)/2)を満たすlにおいて、以下の式で表される。 That is, the second term of (Equation 9) represents the phase difference of the flicker component generated by the change in the accumulation time. Therefore, when calculating the correction value, in addition to the phase difference θk of (Expression 7), the component of the second term of (Expression 9) is added as the phase difference component Φk due to the change in the accumulation time. Is possible. The phase difference component Φk is expressed by the following equation when the frequency fk = 100 (Hz) calculated from (Expression 2) is Φk = 2πfk x ((t1−t2) / 2). In l which satisfies, it is expressed by the following formula.

以上より補正値は(式8)、(式10)より、次式で算出することで蓄積時間の差による位相差を予測して補正値を生成することが可能となる。 As described above, the correction value can be generated from (Equation 8) and (Equation 10) using the following equation to predict the phase difference due to the difference in accumulation time and generate the correction value.

(補正値の高調波成分の予測)
これまで、サンプリング周波数fsで決定される周波数領域の全領域における離散フーリエ変換・逆離散フーリエ変換によって、検出・補正を行う実施形態を述べてきた。例えば、図3を参照してみると、蓄積時間が長い場合は点滅光源の発光している周波数の正弦波にほぼ近似していることがわかる。従って、補正値を生成する際も、全周波数領域に渡って逆離散フーリエ変換をせずとも、発生しているフリッカの周波数fkとその近傍の周波数のフーリエ級数から補正値を生成することで、充分な補正値を生成することが可能となる。逆に、蓄積時間が短くなると、画像信号上に発生するフリッカは、点滅光源の発光の形状をトレースした形に近似されてくる。従って、発生しているフリッカは単純な正弦波では近似しづらくなり、高調波成分を含むようになってくる。かかるとき、制御手段102から得られる撮像素子101の制御情報である蓄積時間から、発生しているフリッカに高調波が含まれるかどうかを判別する。補正値予測手段104は撮像素子101の蓄積時間と点滅光源による輝度信号の変調度を、高調波を含む複数のテーブルであらかじめ記憶しておく。そして、補正値を生成する際の逆離散フーリエ変換の時に、蓄積時間に応じて高調波成分が含まれるように該テーブルから変調度を参照して、高調波成分も加味した形で逆離散フーリエ変換を行う。以上の処理により、高調波成分が含まれるフリッカが発生した場合でも良好なフリッカ補正が実現可能となる。
(Prediction of harmonic component of correction value)
So far, the embodiment has been described in which detection and correction are performed by discrete Fourier transform / inverse discrete Fourier transform in the entire frequency domain determined by the sampling frequency fs. For example, referring to FIG. 3, it can be seen that when the accumulation time is long, it approximates to a sine wave of the frequency at which the flashing light source emits light. Therefore, even when generating the correction value, without generating the inverse discrete Fourier transform over the entire frequency range, by generating the correction value from the frequency fk of the generated flicker and the Fourier series of the frequencies in the vicinity thereof, It is possible to generate a sufficient correction value. On the contrary, when the accumulation time is shortened, the flicker generated on the image signal is approximated to a shape obtained by tracing the light emission shape of the blinking light source. Therefore, the generated flicker is difficult to approximate with a simple sine wave and includes harmonic components. At this time, it is determined from the accumulation time, which is control information of the image sensor 101 obtained from the control means 102, whether the generated flicker includes harmonics. The correction value predicting means 104 stores in advance the accumulation time of the image sensor 101 and the degree of modulation of the luminance signal from the blinking light source in a plurality of tables including harmonics. Then, at the time of the inverse discrete Fourier transform when generating the correction value, the modulation factor is referred to from the table so that the harmonic component is included according to the accumulation time, and the inverse discrete Fourier transform is performed in consideration of the harmonic component. Perform conversion. With the above processing, even when flicker including a harmonic component occurs, it is possible to realize good flicker correction.

以上説明してきたように、撮像素子の駆動方式の変化によって、フリッカ成分が急激に変化した場合でも、精度良くフリッカ成分を補正でき、画質を向上することができる。   As described above, even when the flicker component changes suddenly due to a change in the driving method of the image sensor, the flicker component can be corrected with high accuracy and the image quality can be improved.

また、本実施形態はXYアドレス型の走査方法を採るCMOSイメージセンサを用いたが、CCDのように全画素のリセットと読み出しをそれぞれ同時刻に行うタイプの撮像素子を用いた場合でも適用できる。その場合、発生するフリッカは撮像された画像信号間で周期的な信号レベルの変動となって現れる。撮像素子101の蓄積時間が変化した場合、蓄積時間と点滅光源による輝度信号の変調度をテーブル化して記憶し、制御手段102から出力された制御情報をもとに補正値を予測して生成することで、良好なフリッカ補正が実現できる。   Although this embodiment uses a CMOS image sensor that employs an XY address type scanning method, the present invention can also be applied to the case where an image pickup device of a type that resets and reads out all pixels at the same time, such as a CCD, is used. In that case, the generated flicker appears as a periodic signal level fluctuation between captured image signals. When the accumulation time of the image sensor 101 changes, the accumulation time and the modulation degree of the luminance signal by the blinking light source are stored in a table, and a correction value is predicted and generated based on the control information output from the control means 102. As a result, good flicker correction can be realized.

[第2の実施形態]
以下、本発明の第2の実施形態のタイミングチャートを図6を参照して説明していく。実施形態1と同じ番号を付しているものについては説明を省略する。本実施形態は、フリッカを検出する画像信号と補正対象となる画像信号が2垂直同期期間遅延している場合のフリッカ検出・補正の方法を示したものである。
[Second Embodiment]
Hereinafter, a timing chart of the second embodiment of the present invention will be described with reference to FIG. A description of the same reference numerals as those in the first embodiment is omitted. The present embodiment shows a flicker detection / correction method when an image signal for detecting flicker and an image signal to be corrected are delayed by two vertical synchronization periods.

今、撮像素子101が間欠読み動作から通常動作に駆動状態が遷移した場合を考える。601はフリッカ検出手段103が動作しているタイミングを示しており、画像信号が得られる期間の一部で動作している。間欠読み動作は、撮像素子101が垂直同期期間に同期して、画像信号を読み出すフレームと読み出さないフレームを形成しているものであり、図6の一部で、交互に繰り返している。通常読み出し動作は、垂直同期期間毎に撮像素子101から画像信号を読み出している。つまり、撮像装置の駆動としては、フレームレートが変化するように駆動している。また、以下、間欠読み動作と通常動作とでは、蓄積時間は変化しないものとして説明する。602は制御手段から撮像素子101に出力される制御信号、604は制御手段102から補正値予測手段104に出力される制御情報を表している。また、604が補正値予測手段104が動作するタイミング、605から609が補正値予測手段104で生成された補正値が設定されるタイミングをそれぞれ表している。   Consider a case where the driving state of the image sensor 101 transitions from an intermittent reading operation to a normal operation. Reference numeral 601 denotes the timing at which the flicker detection means 103 is operating, and it operates during a part of the period during which an image signal is obtained. In the intermittent reading operation, the image sensor 101 forms a frame for reading an image signal and a frame for not reading in synchronization with the vertical synchronization period, and is repeated alternately in a part of FIG. In the normal read operation, an image signal is read from the image sensor 101 every vertical synchronization period. In other words, the imaging apparatus is driven so that the frame rate changes. In the following description, it is assumed that the accumulation time does not change between the intermittent reading operation and the normal operation. Reference numeral 602 denotes a control signal output from the control means to the image sensor 101, and reference numeral 604 denotes control information output from the control means 102 to the correction value prediction means 104. Reference numeral 604 denotes a timing at which the correction value prediction unit 104 operates, and reference numerals 605 to 609 denote timings at which the correction values generated by the correction value prediction unit 104 are set.

この場合、フリッカ検出とフリッカ補正のタイミングとしては、常に検出と補正に2垂直同期期間の遅延が発生している。例えば、画像信号Aからフリッカ検出を行い、画像信号Bに対して補正する、あるいは、画像信号Bからフリッカ検出を行い、画像信号Cに対して補正するといった具合である。したがって、撮像素子101の駆動状態が変化した場合、画像信号Dに対する補正は、検出する画像信号が無いため、補正値を生成することができずに補正動作そのものがなされなくなってしまう。そのため、制御手段102と補正値予測手段104は以下に説明するタイミングで画像信号Dに対する補正値の予測を行う。   In this case, as the timing of flicker detection and flicker correction, a delay of two vertical synchronization periods always occurs in detection and correction. For example, flicker detection is performed from the image signal A and the image signal B is corrected, or flicker detection is performed from the image signal B and the image signal C is corrected. Therefore, when the driving state of the image sensor 101 is changed, the correction for the image signal D is not performed because the image signal to be detected cannot be generated and the correction value itself cannot be generated. Therefore, the control unit 102 and the correction value prediction unit 104 predict the correction value for the image signal D at the timing described below.

制御手段102からは、撮像素子101に対して602に示すタイミングで撮像素子101の制御信号を出力している。602のcは読み出し駆動をせずにシャッタのみを動作させる駆動信号、dは読み出し駆動のみでシャッタ動作は停止している駆動信号、eは通常読み出しの駆動を示している。いま、撮像素子101の駆動状態が制御手段102によって間欠読み出しから通常読み出しに遷移した場合、602に示すタイミングで撮像素子101の駆動状態を遷移すべく駆動信号eを出力する。制御手段102からは、603に示すように、撮像素子101の駆動状態を制御情報として補正値予測手段104に対して出力する。制御情報は、フレームレートの切り替わりを判別できるような情報(本実施形態ではHigh・Low)から成っている。補正値予測手段104は、画像信号Bからフリッカ検出手段102が検出したフリッカ成分から画像信号Cに対する補正値を生成する。検出フレームで発生するフリッカの位相と補正フレームで発生するフリッカの位相は、(式2)より算出される周波数fk=100(Hz)の時のkにおいて、(式7)で表される位相差θkがθk=2πfk x(1/30)を満たすmにおいて、固定値を持つ。また、撮像素子101から得られる画像信号の蓄積時間は変わらないものとすると、発生しているフリッカの振幅スペクトルもほとんど変化しない。従って、(式8)より、画像信号Bの検出結果から画像信号Cに対する補正値を生成し、606で示されるタイミングで補正値が設定される。   The control means 102 outputs a control signal for the image sensor 101 to the image sensor 101 at the timing indicated by 602. Reference numeral 602c denotes a drive signal for operating only the shutter without performing the read drive, d is a drive signal for only the read drive and the shutter operation is stopped, and e is the normal read drive. If the driving state of the image sensor 101 is changed from intermittent reading to normal reading by the control unit 102, a drive signal e is output to change the driving state of the image sensor 101 at a timing indicated by 602. As indicated by reference numeral 603, the control unit 102 outputs the driving state of the image sensor 101 to the correction value prediction unit 104 as control information. The control information is composed of information (High / Low in this embodiment) that can discriminate switching of the frame rate. The correction value prediction unit 104 generates a correction value for the image signal C from the flicker component detected by the flicker detection unit 102 from the image signal B. The phase of flicker generated in the detection frame and the phase of flicker generated in the correction frame are the phase difference expressed by (Expression 7) at k when the frequency fk = 100 (Hz) calculated from (Expression 2). It has a fixed value at m where θk satisfies θk = 2πfk x (1/30). Further, if the accumulation time of the image signal obtained from the image sensor 101 is not changed, the amplitude spectrum of the flicker that is generated hardly changes. Therefore, from (Equation 8), a correction value for the image signal C is generated from the detection result of the image signal B, and the correction value is set at the timing indicated by 606.

このようにして、画像信号Cに対する補正値を生成した後、603に示す制御情報から、撮像素子101の駆動状態が遷移した(間欠読み出しから通常読み出しに遷移)ことを情報として受け取る。そして、駆動が遷移することによる画像信号Dに対する補正値が欠落してしまうことをあらかじめ取得する。そして、画像信号Bから検出したフリッカ成分と、制御手段102から出力される撮像素子101の制御情報603を元に画像信号Dに対する補正値を生成する。画像信号Bから検出したフリッカ成分は常に記憶手段に保持しておき、制御手段102から出力された制御情報が変化したときに該記憶手段から読みにいく。そして、画像信号Cに対する補正値が生成された後に604で示すタイミングで画像信号Dに対する補正値を予測して生成する。生成された補正値は画像信号Dに対して補正がかかるよう、607に示すタイミングで設定され、画像信号Dに対して補正される。このように、フレームレートが高い場合、数フレーム前に得た画像から検出されたフリッカ成分に基づきフリッカ補正し、フレームレートが低い場合、このフレーム数よりも前のフレームの画像から検出されたフリッカ成分に基づきフリッカ補正する。   After generating a correction value for the image signal C in this way, information indicating that the drive state of the image sensor 101 has transitioned (transition from intermittent readout to normal readout) is received from the control information indicated by 603. And it acquires beforehand that the correction value with respect to image signal D by driving changes will be lost. Then, a correction value for the image signal D is generated based on the flicker component detected from the image signal B and the control information 603 of the image sensor 101 output from the control unit 102. The flicker component detected from the image signal B is always held in the storage means, and is read from the storage means when the control information output from the control means 102 changes. Then, after the correction value for the image signal C is generated, the correction value for the image signal D is predicted and generated at the timing indicated by 604. The generated correction value is set at the timing indicated by 607 so that the image signal D is corrected, and is corrected for the image signal D. Thus, when the frame rate is high, flicker correction is performed based on the flicker component detected from the image obtained several frames before, and when the frame rate is low, the flicker detected from the image of the frame before the number of frames. Flicker correction based on the component.

次に、本実施形態における補正値予測手段104での補正値の位相の予測方法について説明する。   Next, a method for predicting the phase of the correction value in the correction value predicting unit 104 in the present embodiment will be described.

(補正値の位相の予測)
フリッカを検出する画像信号と補正対象となる画像信号が2垂直同期期間遅延している場合、検出したフレームで発生しているフリッカと補正対象となるフレームのフリッカの位相差は前述したように下記の場合に固定値を持つ。つまり、(式2)より算出される周波数fk=100(Hz)の時のkにおいて、(式7)で表される位相差θkがθk=2πfk x(1/30)を満たすmにおいてである。本実施形態のように、画像信号Bの検出結果から画像信号Dのフリッカを補正する補正値を生成する場合、1垂直同期期間分の位相差をΦkに加味すればよい。よって、(式2)より算出される周波数fk=100(Hz)の時のkにおいて、(式10)で表される位相差ΦkがΦk=2πfk x(1/60)を満たすlにおいて、固定値を持つようになる。よって、以下、(式11)から補正値を生成することで、良好なフリッカ補正を実現することができる。
(Prediction of correction value phase)
When the image signal for detecting flicker and the image signal to be corrected are delayed by two vertical synchronization periods, the phase difference between the flicker occurring in the detected frame and the flicker of the frame to be corrected is as follows. In case of, it has a fixed value. That is, at k at the frequency fk = 100 (Hz) calculated from (Expression 2), the phase difference θk expressed by (Expression 7) is at m satisfying θk = 2πfk x (1/30). . When a correction value for correcting flicker of the image signal D is generated from the detection result of the image signal B as in the present embodiment, the phase difference for one vertical synchronization period may be added to Φk. Accordingly, at k when the frequency fk = 100 (Hz) calculated from (Equation 2), the phase difference Φk expressed by (Equation 10) is fixed at l satisfying Φk = 2πfk x (1/60). Have a value. Therefore, good flicker correction can be realized by generating a correction value from (Equation 11) below.

[第3の実施形態]
以下、本発明の第3の実施形態を図面に参照し説明していく。フリッカ検出・補正装置のブロック図は第1の実施形態と同一であるので割愛する。
[Third Embodiment]
Hereinafter, a third embodiment of the present invention will be described with reference to the drawings. Since the block diagram of the flicker detection / correction device is the same as that of the first embodiment, it is omitted.

次に、本発明の第3の実施形態のタイミングチャートを図7を参照して説明していく。   Next, a timing chart of the third embodiment of the present invention will be described with reference to FIG.

本実施形態は例えば動画撮像中に、動画像よりも高精細な静止画を撮像するために撮像方式の駆動方式を変更する制御の例である。例えば動画像を撮像する場合には高速で読み出すために、撮像素子から画像を加算・平均または間引きして読み出す方法がある。また、静止画を撮像する場合には高精細な画像を読み出すために、動画時よりも加算・平均または間引きの数を減らしたり、非加算にして、信号数を増やし動画時よりも長い読み出し時間で読み出すという方法がある。   The present embodiment is an example of control for changing a driving method of an imaging method in order to capture a still image with higher definition than a moving image, for example, during moving image capturing. For example, in order to read a moving image at high speed, there is a method of reading the image from the image pickup device by adding, averaging, or thinning the images. In addition, when reading a still image, in order to read out a high-definition image, the number of additions / averages or thinnings is reduced or non-addition compared to that for moving images, and the number of signals is increased and the reading time is longer than that for moving images. There is a method of reading with.

701は撮像装置の撮像方式で決定される垂直同期信号である。XYアドレス型の走査方法の撮像素子の場合、画素ごとの露光タイミングがライン方向で順次行われるため、図示のように1垂直同期信号期間内で撮像素子の全画素を順次読み出す。r1〜r6は撮像素子101の読み出し駆動を表している。またs1〜s6は撮像素子101の電荷変換部に蓄積された電荷をリセットするための駆動を表している。各画素の露光時間を統一するため、読み出し駆動と同様にリセットのタイミングもライン方向で順次行われる。本図において、r1,r2,r3,r5,r6に対して、r4の読み出し時間が長くなっている。これは前述したように、例えば動画用・静止画用の画像の撮像を切り替えるために撮像素子の駆動方法が変化したことにより、読み出し時間が変化したことをあらわしている。r4で読み出された画像信号が図中のDの画像信号に相当し、r1,r2,r3,r5,r6で読み出された画像信号がそれぞれA,B,C,E,Fに相当する。   Reference numeral 701 denotes a vertical synchronization signal determined by the imaging method of the imaging apparatus. In the case of the image sensor of the XY address type scanning method, since the exposure timing for each pixel is sequentially performed in the line direction, all pixels of the image sensor are sequentially read out within one vertical synchronization signal period as shown in the figure. r1 to r6 represent readout driving of the image sensor 101. Further, s1 to s6 represent driving for resetting the charges accumulated in the charge conversion unit of the image sensor 101. In order to unify the exposure time of each pixel, the reset timing is sequentially performed in the line direction as in the read driving. In this figure, the read time of r4 is longer than r1, r2, r3, r5, r6. As described above, this indicates that the readout time has changed due to a change in the driving method of the image sensor in order to switch between capturing images for moving images and still images, for example. The image signal read out at r4 corresponds to the D image signal in the figure, and the image signals read out at r1, r2, r3, r5, r6 correspond to A, B, C, E, F, respectively. .

図8は、撮像素子101で撮像された画像信号を模式的に表したものである。801が動画撮像時で撮像素子101からの読み出し時間が短い場合の画像信号の様子、803が静止画撮像時で撮像素子101からの読み出し時間が長い場合の画像信号の様子を示したものである。実際には読み出される画素数が違うので、画像のサイズが異なるが、同一画角でのフリッカの周期を比較するために図としては同一の大きさで説明する。点滅光源によって信号レベルが変調されており、802や804に示すように画像信号内に点滅光源の発光周期に依存した周期的なレベル変動が発生する。点滅光源の発光周期が一定ならば、画面中に現れるレベル変動の周期は、読み出し時間に依存するので、制御情報として読み出し時間の情報を用いることで、レベル変動の周期を予測することが可能になる。   FIG. 8 schematically illustrates an image signal captured by the image sensor 101. Reference numeral 801 denotes a state of an image signal when the readout time from the image sensor 101 is short when capturing a moving image, and reference numeral 803 denotes a state of an image signal when the readout time from the image sensor 101 is long when capturing a still image. . Actually, since the number of pixels to be read is different, the image size is different, but in order to compare flicker periods at the same angle of view, description will be made with the same size. The signal level is modulated by the blinking light source, and periodic level fluctuations depending on the light emission period of the blinking light source occur in the image signal as indicated by 802 and 804. If the light emission cycle of the flashing light source is constant, the level fluctuation cycle that appears on the screen depends on the readout time, so it is possible to predict the level fluctuation cycle by using the readout time information as control information. Become.

図7に戻って制御方法について説明する。   Returning to FIG. 7, the control method will be described.

203は撮像素子101の制御信号を制御手段102が撮像素子101に対して出力するタイミングを示したものであり、撮像素子中の加算・平均・間引き方式など読み出し時間に影響を与える駆動方式を行うためのものである。図の場合例えば、タイミング704にて撮像素子101に対し動画像としての画像信号Cを撮像するための制御信号fを送出し、撮像素子はs3,r3のタイミングでリセット・読み出しを行う。タイミング705にて撮像素子101に対し静止画像としての画像信号Dを撮像するための制御信号gを送出し、撮像素子はs4,r4のタイミングでリセット・読み出しを行う。タイミング706にて撮像素子101に対し、駆動を継続することを表す制御信号hを送出し、撮像素子はs4,r4のタイミングでリセット・読み出しを継続する。タイミング707にて撮像素子101に対し動画像としての画像信号Eを撮像するための制御信号fを送出し、撮像素子はs5,r5のタイミングでリセット・読み出しを行う。   Reference numeral 203 denotes a timing at which the control means 102 outputs a control signal for the image sensor 101 to the image sensor 101. A drive system that affects the readout time, such as an addition / average / thinning system in the image sensor, is performed. Is for. In the case of the figure, for example, a control signal f for capturing an image signal C as a moving image is sent to the image sensor 101 at timing 704, and the image sensor resets and reads out at timings s3 and r3. At timing 705, a control signal g for capturing an image signal D as a still image is sent to the image sensor 101, and the image sensor resets and reads out at timings s4 and r4. At timing 706, a control signal h indicating that driving is continued is sent to the image sensor 101, and the image sensor continues resetting and reading at timings s4 and r4. At timing 707, a control signal f for capturing an image signal E as a moving image is sent to the image sensor 101, and the image sensor resets and reads out at timings s5 and r5.

本実施形態では、動画撮像時に得られる画像信号B,C,Fに対してはそれぞれその直前に得られた画像信号A,B,Eで得られたフリッカ成分より補正値を生成しタイミング713,714,717で設定することができる。   In the present embodiment, for the image signals B, C, and F obtained at the time of moving image capturing, correction values are generated from the flicker components obtained from the image signals A, B, and E obtained immediately before the timings 713, 714, 717 can be set.

静止画撮像時に得られた画像信号Dに対しては直前に得られた画像信号Cとはフリッカの様子が異なるので、画像信号Cで得られたフリッカ成分より補正値を予測する方法する。また、動画撮像時に得られた画像信号Eに対しては直前に得られた画像信号Dとはフリッカの様子が異なるので、画像信号Dで得られたフリッカ成分より補正値を予測する。708は制御手段102が補正値予測手段104に対して送出する制御情報であり、読み出し時間の比をあらわす。タイミング709にて読み出しr3,r4の時間の比を制御情報iとして、タイミング710にて読み出しr4,r5の時間の比を制御情報jとして送出する。補正値予測手段は104はフリッカ成分と制御情報にもとづきタイミング711,712にて補正値を予測し、タイミング715,716で補正値を設定する。それ以外のフィールドではフリッカ成分に基づき補正値を演算して補正値を設定する。   Since the image signal D obtained at the time of still image capturing has a flickering state different from that of the image signal C obtained immediately before, a correction value is predicted from the flicker component obtained from the image signal C. Further, since the image signal E obtained at the time of moving image capturing has a different flickering state from the image signal D obtained immediately before, a correction value is predicted from the flicker component obtained from the image signal D. Reference numeral 708 denotes control information sent from the control unit 102 to the correction value predicting unit 104, which represents a ratio of read times. At timing 709, the time ratio between read r3 and r4 is sent as control information i, and at time 710, the time ratio between read r4 and r5 is sent out as control information j. The correction value prediction means 104 predicts the correction value at timings 711 and 712 based on the flicker component and the control information, and sets the correction value at timings 715 and 716. In other fields, the correction value is calculated based on the flicker component and set.

次に、補正値予測手段104において、前述したフリッカ検出手段103から得られるフリッカ成分と制御手段102から得られる制御情報から補正値を予測する方法について述べていく。フリッカ成分から式8であらわされる逆離散フーリエ変換を用いて補正値を求める考え方は第1の実施形態と同じである。   Next, a method for predicting the correction value from the flicker component obtained from the flicker detection means 103 and the control information obtained from the control means 102 in the correction value prediction means 104 will be described. The idea of obtaining the correction value from the flicker component using the inverse discrete Fourier transform expressed by Equation 8 is the same as in the first embodiment.

撮像素子からの、あるフィールド1の読み出し時間をt1、別のフィールド2のフィールドの読み出し時間をt2とした場合、フィールド1に対するフィールド2の画面内のレベル変動の周期の比は読み出し時間の比T=t1/t2であらわされる。   When the readout time of one field 1 from the image sensor is t1, and the readout time of another field 2 is t2, the ratio of the period of level fluctuation in the screen of field 2 to field 1 is the ratio T of the readout time. = T1 / t2.

よって、制御情報として上記Tを用い、具体的には(式12)で表されるように、各項に対してTで除算処理を行うことで補正値の周期成分に対する予測が可能になる。   Therefore, by using T as the control information, specifically, by dividing each term by T as represented by (Equation 12), it is possible to predict the periodic component of the correction value.

以上説明してきたように、撮像素子の駆動方式の変化によって、フリッカ成分が急激に変化した場合でも、精度良くフリッカ成分を補正でき、画質を向上することができる。   As described above, even when the flicker component changes suddenly due to a change in the driving method of the image sensor, the flicker component can be corrected with high accuracy and the image quality can be improved.

なお、本実施の形態では、動画撮像時に得られた画像信号Eに対しては、直前に得られた画像信号Dで得られたフリッカ成分より補正値を予測して補正に用いる構成とした。しかしながら、静止画撮像の以前に得られた画像信号Cで得られたフリッカ成分に基づいて補正値を得るようにしてもよい。このように前回の動画から得られたフリッカ成分に基づいて補正した方が、フリッカ補正が適切に成される場合がある。   In the present embodiment, for the image signal E obtained at the time of moving image capturing, a correction value is predicted from the flicker component obtained from the image signal D obtained immediately before and used for correction. However, the correction value may be obtained based on the flicker component obtained from the image signal C obtained before the still image is captured. Thus, flicker correction may be appropriately performed when correction is performed based on the flicker component obtained from the previous moving image.

上述したように、画像信号を取得したフレームよりも所定フレーム数前に得た画像信号から検出されたフリッカ成分に基づいて画像信号を補正するフリッカ補正において、駆動状態の変更があったときに前記所定フレーム数を変更する。これにより、より適正なフリッカ補正が可能となる。   As described above, in the flicker correction in which the image signal is corrected based on the flicker component detected from the image signal obtained a predetermined number of frames before the frame from which the image signal is acquired, when the drive state is changed, Change the predetermined number of frames. Thereby, more appropriate flicker correction can be performed.

なお、第1の実施形態(図2)の画像信号Dが得られるフレーム、第2の実施形態(図6)の画像信号Dが得られるフレーム、及び、第3の実施形態(図7)の画像信号Dが得られるフレームを移行の期間とする。この移行の期間は撮像素子の駆動状態が維持されている状態から、駆動状態の変更が生じ、また駆動状態が維持されている状態になるまでの期間を示している。   The frame from which the image signal D of the first embodiment (FIG. 2) is obtained, the frame from which the image signal D of the second embodiment (FIG. 6) is obtained, and the third embodiment (FIG. 7). A frame in which the image signal D is obtained is a transition period. This transition period indicates a period from when the driving state of the image sensor is maintained to when the driving state is changed and when the driving state is maintained.

[他の実施形態]
なお、以上の実施の形態のソフト構成とハード構成は、適宜置き換えることができるものである。
[Other Embodiments]
It should be noted that the software configuration and the hardware configuration in the above embodiments can be appropriately replaced.

また、本発明は、複数の情報処理装置(例えばホストコンピュータ、インターフェイス機器、カメラヘッドなど)から構成されるシステムに適用してもよい。また、一つの機器からなる装置(例えば、デジタルスチルカメラ、デジタルビデオカメラなど)に適用してもよい。   Further, the present invention may be applied to a system including a plurality of information processing apparatuses (for example, a host computer, an interface device, a camera head, etc.). Further, the present invention may be applied to an apparatus (for example, a digital still camera, a digital video camera, etc.) composed of a single device.

また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体に格納されたプログラムコードをシステムあるいは装置のコンピュータが読み出し実行することによっても達成される。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その信号処理によって前述した実施形態の機能が実行可能である場合も含まれる。ここでプログラムコードを記憶する記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、ROM、RAM、磁気テープ、不揮発性のメモリカード、CD−ROM、CD−R、DVD、光ディスク、光磁気ディスク、MOなどが考えられる。   The object of the present invention can also be achieved by the system or apparatus computer reading and executing the program code stored in the storage medium storing the program code of the software that implements the functions of the above-described embodiments. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, based on the instruction of the program code, an operating system (OS) or the like running on the computer performs part or all of the actual processing, and the functions of the above-described embodiments can be executed by the signal processing. Cases are also included. Examples of the storage medium for storing the program code include a flexible disk, hard disk, ROM, RAM, magnetic tape, nonvolatile memory card, CD-ROM, CD-R, DVD, optical disk, magneto-optical disk, MO, and the like. Can be considered.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた場合であってもよい。メモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される。   Further, the program code read from the storage medium may be written in a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer. After being written in the memory, the CPU of the function expansion card or function expansion unit performs part or all of the actual processing based on the instruction of the program code, and the function of the above-described embodiment is performed by the processing. Realized.

本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明した図2及び図6または、図7のいずれかを参照して説明した処理に対応するプログラムコードが格納されることになる。   When the present invention is applied to the above-described storage medium, the storage medium stores program codes corresponding to the processing described with reference to either FIG. 2 and FIG. 6 described above or FIG. become.

101 撮像素子
102 制御手段
103 フリッカ検出手段
104 補正値予測手段
105 フリッカ補正手段
DESCRIPTION OF SYMBOLS 101 Image pick-up element 102 Control means 103 Flicker detection means 104 Correction value prediction means 105 Flicker correction means

Claims (10)

第1の画像及び第2の画像を取得する取得手段と、
前記第1の画像からフリッカ成分を検出する検出手段と、
前記検出手段により検出される前記第1の画像に対するフリッカ成分と、前記第1の画像と前記第2の画像との間の蓄積時間の違いとに基づいて、前記第2の画像に対するフリッカ成分の振幅あるいは位相のうちの少なくとも1つを算出する算出手段と、
前記算出手段により算出される前記第2の画像に対するフリッカ成分の振幅あるいは位相を用いて前記第2の画像を補正する補正手段と、
を有することを特徴とする画像処理装置。
Acquisition means for acquiring a first image and a second image;
Detecting means for detecting a flicker component from the first image;
Based on the flicker component for the first image detected by the detection means and the difference in accumulation time between the first image and the second image, the flicker component for the second image Calculating means for calculating at least one of amplitude or phase;
Correction means for correcting the second image using an amplitude or phase of a flicker component with respect to the second image calculated by the calculation means;
An image processing apparatus comprising:
前記算出手段は、予め記憶された、前記第1の画像及び前記第2の画像が撮像される撮像素子の、蓄積時間と点滅光源による信号の変調度との関係に基づいて、前記第2の画像に対するフリッカ成分の振幅を算出することを特徴とする請求項1に記載の画像処理装置。   The calculation means is configured to store the second image based on a relationship between an accumulation time and a modulation degree of a signal from a blinking light source of an imaging element that captures the first image and the second image. The image processing apparatus according to claim 1, wherein an amplitude of a flicker component with respect to an image is calculated. 前記算出手段は、前記第2の画像の蓄積時間から得られる前記第1の画像に対するフリッカ成分と前記第2の画像に対するフリッカ成分との位相差と、前記第1の画像及び前記第2の画像の蓄積時間の違いに基づく位相差とを加味して、前記第2の画像に対するフリッカ成分の位相を算出することを特徴とする請求項1または2に記載の画像処理装置。   The calculation means includes a phase difference between a flicker component for the first image and a flicker component for the second image obtained from an accumulation time of the second image, the first image, and the second image. 3. The image processing apparatus according to claim 1, wherein a phase of a flicker component with respect to the second image is calculated in consideration of a phase difference based on a difference in accumulation time of the second image. 前記第1の画像及び前記第2の画像は、XYアドレス型のイメージセンサにより撮像された画像であることを特徴とする請求項1乃至3のいずれか1つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the first image and the second image are images captured by an XY address type image sensor. 前記第1の画像及び前記第2の画像は、全画素のリセットと読み出しをそれぞれ同時に行うイメージセンサにより撮像された画像であることを特徴とする請求項1乃至3のいずれか1つに記載の画像処理装置。   The said 1st image and said 2nd image are the images imaged by the image sensor which respectively resets and reads all the pixels simultaneously, The one of Claim 1 thru | or 3 characterized by the above-mentioned. Image processing device. 前記算出手段は、前記第1の画像の高調波成分を予測して前記第2の画像のフリッカ成分を補正することを特徴とする請求項1乃至5のいずれか1つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the calculating unit corrects a flicker component of the second image by predicting a harmonic component of the first image. . 第1の画像及び第2の画像を取得する取得ステップと、
前記第1の画像からフリッカ成分を検出する検出ステップと、
前記検出ステップにて検出される前記第1の画像に対するフリッカ成分と、前記第1の画像と前記第2の画像との間の蓄積時間の違いとに基づいて、前記第2の画像に対するフリッカ成分の振幅あるいは位相のうちの少なくとも1つを算出する算出ステップと、
前記算出ステップにて算出される前記第2の画像に対するフリッカ成分の振幅あるいは位相を用いて前記第2の画像を補正する補正ステップと、
を有することを特徴とする画像処理方法。
An acquisition step of acquiring a first image and a second image;
Detecting a flicker component from the first image;
The flicker component for the second image based on the flicker component for the first image detected in the detection step and the difference in accumulation time between the first image and the second image. A calculating step for calculating at least one of the amplitude or phase of
A correction step of correcting the second image using an amplitude or phase of a flicker component with respect to the second image calculated in the calculation step;
An image processing method comprising:
情報処理装置が実行可能なプログラムであって、前記プログラムを実行した情報処理装置を、請求項1乃至6のいずれか1つに記載の画像処理装置として機能させることを特徴とするプログラム。   A program that can be executed by an information processing apparatus, and that causes the information processing apparatus that has executed the program to function as the image processing apparatus according to any one of claims 1 to 6. 請求項7に記載の信号処理方法を実現するためのプログラムコードを有することを特徴とする情報処理装置が実行可能なプログラム。   A program executable by an information processing apparatus, comprising program code for realizing the signal processing method according to claim 7. 請求項8又は9に記載のプログラムを記憶したことを特徴とする情報処理装置が読み取り可能な記憶媒体。   A storage medium readable by an information processing apparatus, wherein the program according to claim 8 or 9 is stored.
JP2012222901A 2012-10-05 2012-10-05 Image processing apparatus, image processing method, program, and storage medium Expired - Fee Related JP5383886B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012222901A JP5383886B2 (en) 2012-10-05 2012-10-05 Image processing apparatus, image processing method, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012222901A JP5383886B2 (en) 2012-10-05 2012-10-05 Image processing apparatus, image processing method, program, and storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007340390A Division JP5111100B2 (en) 2007-12-28 2007-12-28 Image processing apparatus, image processing method, program, and storage medium

Publications (2)

Publication Number Publication Date
JP2013017238A JP2013017238A (en) 2013-01-24
JP5383886B2 true JP5383886B2 (en) 2014-01-08

Family

ID=47689383

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012222901A Expired - Fee Related JP5383886B2 (en) 2012-10-05 2012-10-05 Image processing apparatus, image processing method, program, and storage medium

Country Status (1)

Country Link
JP (1) JP5383886B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6100023B2 (en) * 2013-02-27 2017-03-22 キヤノン株式会社 Flicker detection device, flicker correction device, control method thereof, and control program
JP6209533B2 (en) * 2013-04-12 2017-10-04 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Flicker reduction apparatus, imaging apparatus, and flicker reduction method
JP7336186B2 (en) * 2018-11-27 2023-08-31 キヤノン株式会社 IMAGING DEVICE AND CONTROL METHOD THEREOF, PROGRAM, STORAGE MEDIUM

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4645517B2 (en) * 2006-04-24 2011-03-09 ソニー株式会社 Flicker correction method and imaging apparatus

Also Published As

Publication number Publication date
JP2013017238A (en) 2013-01-24

Similar Documents

Publication Publication Date Title
JP5111100B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP4539449B2 (en) Image processing apparatus and imaging apparatus
JP5866200B2 (en) Flicker detection circuit for image sensor using rolling shutter
JP4856765B2 (en) Imaging apparatus and flicker detection method
JP4453648B2 (en) Image processing apparatus and imaging apparatus
WO2017090300A1 (en) Image processing apparatus and image processing method, and program
JP6291417B2 (en) Imaging apparatus, integrated circuit, and flicker reduction method
JP2012235332A (en) Imaging apparatus, imaging apparatus control method and program
JP6209533B2 (en) Flicker reduction apparatus, imaging apparatus, and flicker reduction method
EP3099058A1 (en) Method for detecting video recapture and corresponding apparatus
US20170104914A1 (en) Flicker detection apparatus and method
JP5383886B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP6100023B2 (en) Flicker detection device, flicker correction device, control method thereof, and control program
US11128799B2 (en) Image processing apparatus and image processing method
JP6525525B2 (en) Imaging device, control method therefor, program, storage medium
JP4867822B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP6401473B2 (en) Imaging system and imaging apparatus
JP5794666B2 (en) Imaging apparatus and imaging method
JP2010063169A (en) Image processing apparatus and image pick-up apparatus
JP2010171811A (en) Image capturing apparatus
JP2011097204A (en) Imaging apparatus
JP2018133686A (en) Imaging apparatus, image processing device, control method therefor and program
JP6494351B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP2012137829A (en) Image processing apparatus and control method thereof, and program
JP2015111767A (en) Imaging apparatus and control method of the same, and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130815

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130903

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131001

R151 Written notification of patent or utility model registration

Ref document number: 5383886

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees