JP2009017167A - Image processor, image processing method and imaging device - Google Patents

Image processor, image processing method and imaging device Download PDF

Info

Publication number
JP2009017167A
JP2009017167A JP2007175860A JP2007175860A JP2009017167A JP 2009017167 A JP2009017167 A JP 2009017167A JP 2007175860 A JP2007175860 A JP 2007175860A JP 2007175860 A JP2007175860 A JP 2007175860A JP 2009017167 A JP2009017167 A JP 2009017167A
Authority
JP
Japan
Prior art keywords
flicker
difference
period
image signal
sampling
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.)
Granted
Application number
JP2007175860A
Other languages
Japanese (ja)
Other versions
JP4867822B2 (en
Inventor
Masaya Kinoshita
雅也 木下
Tei Cho
テイ チョウ
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2007175860A priority Critical patent/JP4867822B2/en
Publication of JP2009017167A publication Critical patent/JP2009017167A/en
Application granted granted Critical
Publication of JP4867822B2 publication Critical patent/JP4867822B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Transforming Light Signals Into Electric Signals (AREA)
  • Studio Devices (AREA)
  • Picture Signal Circuits (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To preferably detect and remove a flicker from an image signal when a high-speed imaging mode is turned on under a photographing environment which generates a fixed flicker stripe in a normal photographing. <P>SOLUTION: A weighted average is obtained with respect to a waveform advancing by a half-cycle of a previous sampling period in a region corresponding to a flicker phase 0 to π, and the weighted average is obtained with respect to the waveform delaying by the half-cycle of the previous sampling period in a region corresponding to the flicker phase π to 2π. Further, a finite difference is obtained with respect to the waveform prior by the half-cycle of the previous sampling period in the region corresponding to the flicker phase 0 to π, and the finite difference is obtained with respect to the waveform behind by a half-cycle of the previous sampling period in the region corresponding to the flicker phase π to 2π. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、商用交流電源により点灯される蛍光灯などの点滅する光源の照明下でビデオカメラにより被写体を撮影した際に撮像画像上に生じる蛍光灯フリッカを検出し補正する画像処理装置及び画像処理方法、並びに撮像装置に係り、特に、蛍光灯照明下においてCMOSイメージ・センサなどのXYアドレス走査型固体撮像装置で撮影した場合に発生する横縞状の蛍光灯フリッカを検出し補正する画像処理装置及び画像処理方法、並びに撮像装置に関する。   The present invention relates to an image processing apparatus and image processing for detecting and correcting fluorescent lamp flicker generated on a captured image when a subject is photographed by a video camera under illumination of a blinking light source such as a fluorescent lamp that is turned on by a commercial AC power source. The present invention relates to a method and an imaging apparatus, and in particular, an image processing apparatus for detecting and correcting horizontal stripe-like fluorescent lamp flicker generated when an image is taken with an XY address scanning solid-state imaging apparatus such as a CMOS image sensor under fluorescent lamp illumination. The present invention relates to an image processing method and an imaging apparatus.

さらに詳しくは、本発明は、標準テレビ信号よりも高速なフレームレートで被写体を撮像する高速撮影時に生じる、1画面内に1周期分が入りきらないフリッカ縞を検出し補正する画像処理装置及び画像処理方法、並びに撮像装置に係り、特に、通常撮影時に固定フリッカ縞が発生するような撮影環境下で高速撮影モードに入れたときに、画像信号からフリッカを検出し補正する画像処理装置及び画像処理方法、並びに撮像装置に関する。   More specifically, the present invention relates to an image processing apparatus and image for detecting and correcting flicker fringes that do not fit into one screen within one screen, which occurs at the time of high-speed shooting in which a subject is imaged at a frame rate higher than that of a standard television signal. The present invention relates to a processing method and an imaging apparatus, and in particular, an image processing apparatus and image processing for detecting and correcting flicker from an image signal when entering a high-speed shooting mode in a shooting environment where fixed flicker fringes occur during normal shooting. The present invention relates to a method and an imaging apparatus.

最近、フィルムや感光板を使って撮影する銀塩カメラに代わって、光電変換及び蓄積を行なう画素配列の受光部をフォトダイオードにより構成した固体撮像素子で画像をキャプチャしデジタル符号処理して保存するデジタルカメラが広範に普及している。デジタルカメラによれば、デジタル符号化された画像をメモリに記憶し、コンピュータによる画像処理や画像管理を行なうことができ、さらにフィルムの寿命という問題がないといった利点がある。   Recently, in place of a silver salt camera that shoots using a film or a photosensitive plate, an image is captured by a solid-state imaging device in which a light receiving portion of a pixel array that performs photoelectric conversion and accumulation is configured by a photodiode, and is subjected to digital code processing and stored. Digital cameras are widespread. According to the digital camera, there is an advantage that a digitally encoded image can be stored in a memory, image processing and image management by a computer can be performed, and there is no problem of film life.

固体撮像素子として、例えばCCD(Charge Coupled Device:電荷結合素子)やCMOS(Comprementary Metal Oxide Semiconductor:相補型金属酸化物半導体)などを挙げることができる。このうちCMOSイメージ・センサは、信号の順次読み出し転送をMOSトランジスタ・スイッチのマトリクスにより構成し、垂直及び水平シフトレジスタにより順次走査を行なうように構成されるが、CCDと比べて製造コストが低く低消費電力であるという利点がある。   Examples of the solid-state imaging device include a CCD (Charge Coupled Device) and a CMOS (Complementary Metal Oxide Semiconductor: complementary metal oxide semiconductor). Among them, the CMOS image sensor is configured to sequentially read and transfer signals by a matrix of MOS transistor switches and to perform sequential scanning by a vertical and horizontal shift register. However, the manufacturing cost is lower than that of a CCD. There is an advantage that it is power consumption.

ところで、商用交流電源により点灯される蛍光灯などの点滅する光源の照明下で、ビデオカメラにより被写体を撮影すると、光源の輝度変化(光量変化)の周波数とカメラの垂直同期周波数との違いのために撮像画像上に生じる時間的な明暗の変化、すなわち蛍光灯フリッカが生じることが知られている。特に、上述したCMOS型イメージ・センサなどのXYアドレス走査型の撮像素子を用いた場合には、水平ライン毎の露光タイミングが異なるため、撮像画像上のフリッカは、垂直方向の周期的な輝度レベルあるいは色相の変動による縞模様として観察される。このようなフリッカの成分を撮像画像信号から除去するための手法としては、主に、シャッタ速度とフリッカ・レベルとの関連性に基づいて補正する「シャッタ補正方式」と、フリッカ波形を検出してその逆波形を補正ゲインとして画像信号に適用する「ゲイン補正方式」が知られている。   By the way, when a subject is photographed by a video camera under the illumination of a blinking light source such as a fluorescent lamp that is turned on by a commercial AC power supply, the difference between the luminance change frequency (light intensity change) frequency of the light source and the vertical synchronization frequency of the camera. It is known that a temporal change in light and darkness that occurs on a captured image, that is, a fluorescent lamp flicker occurs. In particular, when an XY address scanning type imaging device such as the above-described CMOS type image sensor is used, the flicker on the captured image has a periodic luminance level in the vertical direction because the exposure timing for each horizontal line is different. Alternatively, it is observed as a striped pattern due to a change in hue. As a method for removing such flicker components from the captured image signal, mainly a “shutter correction method” for correcting based on the relationship between the shutter speed and the flicker level, and detecting a flicker waveform. A “gain correction method” is known in which the inverse waveform is applied to an image signal as a correction gain.

他方、デジタルビデオカメラなどに対する高機能化の要求に伴い、最近では、標準テレビ信号よりも高速な画面レートで被写体を撮像する機能を持ったカメラの開発が進んでいる。以下では、このような高速撮像機能を持つカメラにおけるフリッカの低減手法について考察する。   On the other hand, with the demand for higher functionality for digital video cameras and the like, recently, development of a camera having a function of imaging a subject at a screen rate faster than a standard television signal has been progressing. In the following, a flicker reduction technique in a camera having such a high-speed imaging function will be considered.

図15には、XYアドレス走査型の撮像素子を持つカメラにより蛍光灯照明下で撮影したときのフリッカ・レベルとシャッタ速度との関係についてのコンピュータ・シミュレーション結果を示している。図示のグラフは、横軸にシャッタ・速度をとるとともに縦軸にフリッカ・レベルをとり、商用交流電源周波数が50Hzの地域における非インバータ方式の蛍光灯照明下で撮影したときのシャッタ速度に応じたフリッカ・レベルの変化を示している。同図から、シャッタ速度とフリッカ・レベルには関連性があり、特に、シャッタ速度がN/100(但し、Nは正の整数)のときにフリッカを完全に抑制することができる。蛍光灯の電源周波数をf[Hz]とおくと、フリッカ・レスとなるシャッタ速度S_fklessは一般に以下の式(1)で表すことができる。   FIG. 15 shows a computer simulation result regarding the relationship between the flicker level and the shutter speed when a camera having an XY address scanning type imaging device is used for photographing under fluorescent lamp illumination. In the graph shown in the drawing, the horizontal axis represents the shutter speed and the vertical axis represents the flicker level. The graph corresponds to the shutter speed when shooting under non-inverter fluorescent lamp illumination in an area where the commercial AC power supply frequency is 50 Hz. It shows the flicker level change. From the figure, there is a relationship between the shutter speed and the flicker level. In particular, flicker can be completely suppressed when the shutter speed is N / 100 (where N is a positive integer). When the power frequency of the fluorescent lamp is set to f [Hz], the flickerless shutter speed S_fkless can be generally expressed by the following equation (1).

Figure 2009017167
Figure 2009017167

シャッタ補正方式では、このような性質に基づき、何らかの方法でフリッカが発生していることを検出した場合に、シャッタ速度を上式( 1 ) のS _ f k l e s s に設定することでフリッカの発生を回避することができる。しかしながら、この手法はシャッタ速度に制限が生じるため、AE(Auto Exposure)制御の自由度が低下するという問題がある。   In the shutter correction method, based on such properties, when it is detected that flicker is generated by some method, the shutter speed is set to S_f k les s in the above equation (1). The occurrence of flicker can be avoided. However, this method has a problem that the degree of freedom of AE (Auto Exposure) control is reduced because the shutter speed is limited.

例えばフレームレートがNTSCの4倍(240fps)となる高速撮影時に、カメラに設定できるシャッタ速度は、少なくとも 1/240秒よりも高速側に制限されることは容易に想像がつく。さらにフレームレートが高速になっていくと、カメラに設定できるシャッタ速度はフレームレート以上の高速側のシャッタスピードしか選択することができない。つまり、高速撮影を行なうカメラにとって、そもそもシャッタ補正方式によるフリッカの回避という選択肢はないのである。   For example, it is easy to imagine that the shutter speed that can be set for the camera is limited to at least higher than 1/240 seconds during high-speed shooting where the frame rate is four times that of NTSC (240 fps). As the frame rate further increases, the shutter speed that can be set for the camera can only be selected at a higher shutter speed than the frame rate. In other words, for a camera that performs high-speed shooting, there is no option of avoiding flicker by the shutter correction method.

これに対し、ゲイン補正方式では、フリッカ波形を検出してその逆波形を補正ゲインとして画像信号に適用することから、シャッタ補正方式におけるシャッタ速度の制約から解放されるが、一般にフリッカ波形を正確に検出することは非常に困難である。   On the other hand, in the gain correction method, since the flicker waveform is detected and the inverse waveform is applied to the image signal as a correction gain, it is released from the shutter speed limitation in the shutter correction method. It is very difficult to detect.

ゲイン補正方式の一例として、入力画像信号を1水平周期以上の時間にわたって積分する工程と、その積分値又は隣接するフィールド又はフレームにおける積分値の差分値を正規化する工程と、その正規化後の積分値又は差分値のスペクトルを抽出する工程と、その抽出したスペクトルからフリッカ成分を推定する工程と、その推定したフリッカ成分を打ち消すように、推定したフリッカ成分と前記入力画像信号を演算する工程を備え、蛍光灯照明下でX Y アドレス走査型の撮像素子により撮影された画像信号に含まれる蛍光灯フリッカ成分を低減する方法について提案がなされている(例えば、特許文献1を参照のこと)。この方法におけるフリッカ縞の検波系は、要するに、入力信号を適当な形に加工しながらフリッカ縞1周期分をサンプリングし、このサンプリング・データからDFT(Discrete Fourier Transform)周期を基本波とするフリッカの周波数スペクトルを計算し、低次項のみを利用してフリッカ波形を推定するというステップからなる。   As an example of the gain correction method, the step of integrating the input image signal over a time of one horizontal period or more, the step of normalizing the integration value or the difference value of the integration value in the adjacent field or frame, A step of extracting a spectrum of an integral value or a difference value, a step of estimating a flicker component from the extracted spectrum, and a step of calculating the estimated flicker component and the input image signal so as to cancel the estimated flicker component A method for reducing fluorescent flicker components included in an image signal photographed by an XY address scanning type imaging device under fluorescent lamp illumination has been proposed (see, for example, Patent Document 1). In short, the flicker fringe detection system in this method samples one period of flicker fringes while processing the input signal into an appropriate shape, and uses flicker fringes having a DFT (Discrete Fourier Transform) period as a fundamental wave from this sampling data. It comprises the steps of calculating the frequency spectrum and estimating the flicker waveform using only the lower order terms.

上記のフリッカ低減方法によれば、正規化後の積分値又は差分値として、フリッカ成分以外の信号成分を除去してフリッカ成分を容易に高精度で推定できる信号を得て、その正規化後の積分値又は差分値の適当な次数までのスペクトルを抽出することによってフリッカ成分を高精度で推定することができ、その推定したフリッカ成分と入力画像信号を演算することによって、入力画像信号からフリッカ成分を確実且つ十分に低減することができる。しかしながら、フリッカの検波系では1画面内からフリッカ1周期分のサンプリングを行なうことを前提としていることから、高速撮影時においてフリッカ1周期が1画面内に収まりきらないときには有効なフリッカ補正アルゴリズムではなくなる。   According to the above-described flicker reduction method, a signal that can easily estimate the flicker component with high accuracy by removing signal components other than the flicker component as an integrated value or difference value after normalization is obtained. The flicker component can be estimated with high accuracy by extracting a spectrum up to an appropriate order of the integral value or the difference value, and the flicker component can be calculated from the input image signal by calculating the estimated flicker component and the input image signal. Can be reliably and sufficiently reduced. However, since the flicker detection system presupposes sampling for one cycle of flicker from one screen, it is not an effective flicker correction algorithm when one cycle of flicker does not fit within one screen during high-speed shooting. .

垂直同期期間内のライン数をMとし、フリッカ縞の1周期分に相当するライン数をT_fkとし、フレームレートをFPSとすると、一般に下式(2)に示す関係が成り立つ。   When the number of lines in the vertical synchronization period is M, the number of lines corresponding to one cycle of flicker stripes is T_fk, and the frame rate is FPS, the relationship represented by the following equation (2) is generally established.

Figure 2009017167
Figure 2009017167

フレームレートが下式(3)に示す条件を満足するような高速撮影時には、上式(2)よりフリッカ縞の周期とライン数の関係が下式(4)のようになってしまう。   When shooting at high speed such that the frame rate satisfies the condition shown in the following equation (3), the relationship between the flicker fringe period and the number of lines is expressed by the following equation (4) from the above equation (2).

Figure 2009017167
Figure 2009017167

Figure 2009017167
Figure 2009017167

上式(4)は、フリッカ1周期がもはや1画面内に収まりきらなくなってしまうことを意味する。   The above equation (4) means that one flicker cycle can no longer fit in one screen.

図16には、通常撮像時及び高速撮像時における垂直同期周波数とフリッカ波形との関係をそれぞれ示している。   FIG. 16 shows the relationship between the vertical synchronization frequency and the flicker waveform during normal imaging and during high-speed imaging, respectively.

図16Aには、NTSC方式(National Television Standards Committee)のフレームレートである60fpsの垂直同期信号VDとフリッカ波形との関係を示している(同図中、フリッカ縞の1周期分に相当するライン数T_fkは上式(2)により決定される)。この場合、垂直同期期間が1/60秒であるのに対し、フリッカ縞の1周期は1/100秒であり、1画面内にフリッカ縞1周期が収まることから、上述のフリッカ低減方法によってフリッカ波形を検波することができ、有効にフリッカ補正を行なうことができる。同図中、破線で囲った範囲がフリッカ縞1周期分からなる検波枠単位であり、この単位でフリッカと背景を区別して、フリッカの推定処理を行なう。   FIG. 16A shows the relationship between the vertical synchronization signal VD of 60 fps, which is the frame rate of the NTSC system (National Television Standards Committee), and the flicker waveform (the number of lines corresponding to one cycle of flicker stripes in the same figure). T_fk is determined by the above equation (2)). In this case, while the vertical synchronization period is 1/60 second, one cycle of flicker fringes is 1/100 second, and one cycle of flicker fringes is contained in one screen. Therefore, the flicker reduction method described above is used. The waveform can be detected and flicker correction can be performed effectively. In the figure, a range surrounded by a broken line is a detection frame unit composed of one cycle of flicker fringes, and flicker estimation processing is performed by distinguishing flicker and background in this unit.

一方、図16Bには、高速撮影の例として標準の4倍のフレームレートである240fpsで撮像を行なったときの垂直同期信号とフリッカ波形との関係を示している(同図中、フリッカ縞の1周期分に相当するライン数T_fkは上式(2)により決定される)。この場合、フリッカ縞の1周期は図16Aと同様に1/100秒であるが、垂直同期期間は1/240秒となることから、上式(3)に示したように1画面内にフリッカ縞1周期分が収まりきらないので、上述のフリッカ低減方法ではフリッカ波形を検波することができず、有効にフリッカ補正を行なうことができなくなる。同図中、破線で囲った範囲がフリッカ縞1周期分からなる検波枠単位であるが、複数画面を使ってフリッカ縞1周期分にして扱い、この単位でフリッカと背景を区別して、フリッカの推定処理を行なう。   On the other hand, FIG. 16B shows the relationship between the vertical synchronization signal and the flicker waveform when imaging is performed at 240 fps, which is a standard four times the frame rate, as an example of high-speed imaging (in FIG. 16B, flicker fringes in the figure). The number of lines T_fk corresponding to one period is determined by the above equation (2)). In this case, one cycle of flicker stripes is 1/100 second as in FIG. 16A, but the vertical synchronization period is 1/240 seconds. Therefore, as shown in the above equation (3), flicker appears within one screen. Since one fringe period cannot be accommodated, the flicker reduction method described above cannot detect the flicker waveform, and flicker correction cannot be performed effectively. In the same figure, the range enclosed by a broken line is a detection frame unit consisting of one cycle of flicker fringe. However, flicker fringe estimation is performed by distinguishing flicker from the background in this unit using multiple screens. Perform processing.

なお、上記のフリッカ低減方法に限らず、多くのフリッカ補正アルゴリズムでは、フリッカ現象がフィールド繰り返し性を持つこと(例えば、NTSCの50Hz電源地域のフリッカは3フィールド後に同じフリッカ波形となる)を利用し、例えば3枚分の画面のフリッカ波形の平均値から背景成分のみの抽出を行なうようなことを必要としているが、高速撮像時にはその繰り返しフィールド数がフレームレートFPSに応じて異なるため、この種のフリッカ補正アルゴリズムを高速撮像時に適用することはできない。   In addition to the above flicker reduction methods, many flicker correction algorithms use the fact that the flicker phenomenon has field repeatability (for example, the flicker in the 50 Hz power supply area of NTSC becomes the same flicker waveform after 3 fields). For example, it is necessary to extract only the background component from the average value of the flicker waveforms of three screens. However, since the number of repeated fields varies depending on the frame rate FPS during high-speed imaging, this kind of The flicker correction algorithm cannot be applied during high-speed imaging.

また、ゲイン補正方式の他の例として、フリッカ縞が1画面にもはや1周期分含まれなくなるような条件下では、フリッカ縞が1周期分以上含まれる時間に相当する複数フィールド分の画像情報を集め、常時フリッカ縞の情報が1周期以上含まれるような形に前処理した上で、フリッカの繰り返し性を利用したフリッカ検出及び補正アルゴリズムを適用する画像処理装置について提案がなされている(例えば、特許文献2を参照のこと)。この画像処理装置によれば、画像信号の画面レートに関係なく、1周期分のフリッカ成分を含む連続的な画像信号が確実にフリッカの解析対象となり、フリッカの検出精度が向上する。   As another example of the gain correction method, image information for a plurality of fields corresponding to a time in which flicker fringes are included for one period or more is obtained under a condition that flicker fringes are no longer included for one period on one screen. An image processing apparatus has been proposed that applies a flicker detection and correction algorithm using flicker repeatability after collecting and pre-processing the information so that flicker fringe information is always included in one cycle or more (for example, (See Patent Document 2). According to this image processing apparatus, a continuous image signal including a flicker component for one cycle is reliably an object to be analyzed for flicker regardless of the screen rate of the image signal, and flicker detection accuracy is improved.

ここで、別の撮影条件下で高速撮像を行なう場合についてさらに考察する。例えば、電源周波数が60Hzの地域の蛍光灯下で撮影した場合、カメラに設定できるシャッタ速度は基本的に1/240秒より高速側に限られる(同上)。すなわち、この撮影条件下でも、シャッタ補正によるフリッカの回避という選択肢はない。そこで、フリッカ縞が1周期分以上含まれる時間に相当する複数フィールド分の画像情報を集め、常時フリッカ縞の情報が1周期以上含まれるような形に前処理してからフリッカ補正を行なうという上記のフリッカ検出及び補正アルゴリズムの適用を検討してみる。   Here, the case where high-speed imaging is performed under different imaging conditions will be further considered. For example, when shooting under a fluorescent lamp in a region where the power supply frequency is 60 Hz, the shutter speed that can be set in the camera is basically limited to a higher speed than 1/240 seconds (same as above). That is, even under this shooting condition, there is no option of avoiding flicker by shutter correction. Accordingly, the image information for a plurality of fields corresponding to the time in which the flicker fringe is included for one period or more is collected, and the flicker correction is performed after pre-processing so as to always include the flicker fringe information for one period or more. Let's consider the application of the flicker detection and correction algorithm.

図17には、電源周波数が60Hzの地域の蛍光灯下で通常撮像及び高速撮像したときの垂直同期周波数とフリッカ波形との関係をそれぞれ示している。   FIG. 17 shows the relationship between the vertical synchronization frequency and the flicker waveform when normal imaging and high-speed imaging are performed under a fluorescent lamp in a region where the power supply frequency is 60 Hz.

図17Aには、NTSC方式のフレームレートである60fpsの垂直同期信号VDとフリッカ波形との関係を示している(同図中、フリッカ縞の1周期分に相当するライン数T_fkは上式(2)により決定される)。この場合、垂直同期期間が1/60秒であるのに対し、フリッカ縞の1周期は1/120秒であり、1画面内にフリッカ縞1周期が収まる。しかしながら、フレームレートとフリッカの1周期に相当する時間がちょうど整数倍の関係にあることから、検波枠単位で見たときに、各検波枠単位のフリッカ縞が垂直同期期間に対して全く同じ位置になるという固定フリッカ縞が発生する同図中、破線で囲った範囲がフリッカ縞1周期分からなる検波枠単位であるが、図示のように検波枠単位毎にフリッカ位相が全く同じになるから、フリッカと背景との区別がつけられない。但し、通常撮影モード下では、シャッタ補正方式によりフリッカを回避することができる。   FIG. 17A shows the relationship between the vertical synchronization signal VD of 60 fps, which is the frame rate of the NTSC system, and the flicker waveform (in FIG. 17A, the number of lines T_fk corresponding to one cycle of flicker fringes is expressed by the equation (2) )). In this case, while the vertical synchronization period is 1/60 seconds, one cycle of flicker stripes is 1/120 seconds, and one cycle of flicker stripes fits in one screen. However, since the time corresponding to one cycle of the frame rate and flicker is exactly an integer multiple, when viewed in the detection frame unit, the flicker fringes of each detection frame unit are in exactly the same position with respect to the vertical synchronization period. In the same figure where a fixed flicker fringe is generated, the range surrounded by a broken line is a detection frame unit consisting of one cycle of the flicker fringe, but the flicker phase is exactly the same for each detection frame unit as shown in the figure, Cannot distinguish between flicker and background. However, flicker can be avoided by the shutter correction method in the normal shooting mode.

一方、図17Bには、高速撮影の例として標準の4倍のフレームレートである240fpsで撮像を行なったときの垂直同期信号とフリッカ波形との関係を示しているが、フリッカ縞の1周期が1/120秒であるのに対し、垂直同期期間は120秒となる(同図中、フリッカ縞の1周期分に相当するライン数T_fkは上式(2)により決定される)。同図中、破線で囲った範囲がフリッカ縞1周期分からなる検波枠単位であるが、複数画面を使ってフリッカ縞1周期分にして扱う。実はこの撮影条件下では1画面にフリッカ縞1周期分がちょうど入っており、1周期分のフリッカ情報を含むことになるから、一見何の問題も無いように見える(固定フリッカ条件であるが、画面毎で考えると固定フリッカではない)。確かに各画面に1周期分の情報は入っている。しかしながら、フレームレートとフリッカの1周期に相当する時間がちょうど整数倍の関係にあることから、図17Bを見て分かる通り、検波枠単位で見たときに、各検波枠単位のフリッカ縞が垂直同期期間に対して全く同じ位置になるという固定フリッカ縞が発生する。このような場合、正規化処理を行なう際にフィールド間の差分を取った時点で、背景とともにフリッカ縞の情報もなくなってしまうことになる。すなわち、垂直同期とフリッカ縞が同期してしまうような上記条件では、たとえフリッカに繰り返し性があっても背景と区別することができないので、フリッカ現象の繰り返し性を使って背景とフリッカ縞の区別を行なう上記のフリッカ検出アルゴリズムを適用することはできない。   On the other hand, FIG. 17B shows the relationship between the vertical synchronization signal and the flicker waveform when imaging is performed at 240 fps, which is a frame rate four times the standard as an example of high-speed imaging. The vertical synchronization period is 120 seconds compared to 1/120 seconds (in the figure, the number of lines T_fk corresponding to one flicker fringe period is determined by the above equation (2)). In the figure, the range surrounded by the broken line is a detection frame unit consisting of one cycle of flicker fringes, but it is handled as one cycle of flicker fringes using a plurality of screens. Actually, under this shooting condition, one period of flicker fringe is just included in one screen and flicker information for one period is included, so it seems that there is no problem at first glance (although it is a fixed flicker condition, This is not a fixed flicker when considering each screen). Certainly, each screen contains information for one cycle. However, since the time corresponding to one cycle of the frame rate and flicker is an integer multiple, as can be seen from FIG. 17B, the flicker fringes of each detection frame unit are vertical when viewed in the detection frame unit. Fixed flicker fringes that are exactly the same position with respect to the synchronization period occur. In such a case, the flicker fringe information is lost together with the background when the difference between the fields is taken when performing the normalization process. That is, under the above conditions where the vertical synchronization and the flicker stripes are synchronized, even if the flicker has repeatability, it cannot be distinguished from the background. Therefore, the repeatability of the flicker phenomenon is used to distinguish between the background and the flicker stripes. It is not possible to apply the flicker detection algorithm described above.

勿論、通常撮像時においても、フレームレートとフリッカの1周期に相当する時間がちょうど整数倍の関係となる撮影条件下では、上述したように固定フリッカ縞は発生する(図17Aを参照のこと)。但し、通常撮像時にはシャッタ補正方式(前述)による回避方法が存在するので、何らかの手法で固定フリッカが発生する撮影条件であることが分かればフリッカを消すことはできる。   Of course, even during normal imaging, fixed flicker fringes are generated as described above under imaging conditions in which the time corresponding to one cycle of the frame rate and flicker is an integer multiple (see FIG. 17A). . However, since there is an avoidance method using the shutter correction method (described above) during normal imaging, flicker can be eliminated if it is known that the shooting conditions cause fixed flicker by any method.

あるいは、あらかじめ固定フリッカ問題が発生しないようなシャッタ速度制約を設ける方法も提案されているが(例えば、特許文献3を参照のこと)、高速撮像モードではシャッタ補正方式によるフリッカの回避は不可能である。また、図17Bを見ると分かるように、画面単位でみればもはや固定フリッカ縞ではなく、フリッカ縞が垂直方向に流れていくという映像として非常に醜いものになってしまう。   Alternatively, a method of providing a shutter speed constraint that does not cause the fixed flicker problem in advance has been proposed (see, for example, Patent Document 3). However, flicker cannot be avoided by the shutter correction method in the high-speed imaging mode. is there. Also, as can be seen from FIG. 17B, when viewed on a screen basis, the image is no longer a fixed flicker fringe, but is very ugly as an image in which the flicker fringe flows in the vertical direction.

特開2004−222228号公報JP 2004-222228 A 特開2006−345368号公報JP 2006-345368 A 特許3826604号公報Japanese Patent No. 3826604

本発明の目的は、商用交流電源による蛍光灯照明下においてCMOSイメージ・センサなどのXYアドレス走査型固体撮像装置で撮影した場合に発生する横縞状の蛍光灯フリッカを好適に検出して画像信号からフリッカを取り除くことができる、優れた画像処理装置及び画像処理方法、並びに撮像装置を提供することにある。   An object of the present invention is to suitably detect horizontal flicker-like fluorescent lamp flicker that occurs when photographing with an XY address scanning solid-state imaging device such as a CMOS image sensor under fluorescent lamp illumination by a commercial AC power source, and from the image signal. An object of the present invention is to provide an excellent image processing apparatus, image processing method, and imaging apparatus capable of removing flicker.

本発明のさらなる目的は、標準テレビ信号よりも高速なフレームレートで被写体を撮像する高速撮影時に生じる、1画面内に1周期分が入りきらないフリッカ縞を好適に検出して画像信号からフリッカを取り除くことができる、優れた画像処理装置及び画像処理方法、並びに撮像装置を提供することにある。   A further object of the present invention is to suitably detect flicker fringes that do not fit in one period in one screen, which occurs when shooting a subject at a higher frame rate than a standard television signal, and to detect flicker from the image signal. An object of the present invention is to provide an excellent image processing apparatus, image processing method, and imaging apparatus that can be removed.

本発明のさらなる目的は、通常撮影時に固定フリッカ縞が発生するような撮影環境下で高速撮影モードに入れたときに、画像信号からフリッカを好適に検出し取り除くことができる、優れた画像処理装置及び画像処理方法、並びに撮像装置を提供することにある。   A further object of the present invention is to provide an excellent image processing apparatus capable of suitably detecting and removing flicker from an image signal when entering a high-speed shooting mode in a shooting environment where fixed flicker stripes are generated during normal shooting. And an image processing method and an imaging apparatus.

本発明は、上記課題を参酌してなされたものであり、フリッカ成分を含んだ画像信号を処理する画像処理装置であって、
フリッカ1周期分以上の長さを持つサンプリング期間にわたってライン毎に画像信号を積分する積分処理部と、
過去のサンプリング期間における前記積分処理部による積分値を保持する積分値保持部と、
連続する2以上のサンプリング期間における積分値を平均化する平均値演算部と、
前記の連続する2以上のサンプリング期間における積分値の差分をとる差分演算部と、
前記平均値演算部で得られた平均値を用いて、前記差分演算部により算出された差分値を正規化する正規化演算部と、
前記の正規化された積分値の差分値を周波数解析する周波数解析手段と、
前記周波数解析手段による周波数解析した結果に基づいて画像信号に含まれるフリッカ成分を検出するフリッカ検出手段と、
前記フリッカ検出手段により検出されたフリッカ成分を画像信号から除去するための演算を行なう演算部と、
を備え、
フレームレートとフリッカ波形の1周期に相当する時間がちょうど整数倍の関係にあり、若しくはフリッカ波形が垂直同期期間に対して毎回同じ位相になる撮影環境下において、
前記平均値演算部は、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして加算平均化し、
前記差分演算部は、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして差分をとる、
ことを特徴とする画像処理装置である。
The present invention has been made in view of the above problems, and is an image processing apparatus that processes an image signal including a flicker component,
An integration processing unit that integrates an image signal for each line over a sampling period having a length of one flicker or longer;
An integration value holding unit that holds an integration value by the integration processing unit in a past sampling period;
An average value calculation unit that averages integral values in two or more consecutive sampling periods;
A difference calculation unit that takes a difference between integral values in two or more consecutive sampling periods;
A normalization calculation unit that normalizes the difference value calculated by the difference calculation unit using the average value obtained by the average value calculation unit;
Frequency analysis means for frequency analysis of the difference value of the normalized integral value;
Flicker detection means for detecting a flicker component included in the image signal based on the result of frequency analysis by the frequency analysis means;
A calculation unit for performing a calculation for removing the flicker component detected by the flicker detection unit from the image signal;
With
Under a shooting environment in which the time corresponding to one period of the frame rate and the flicker waveform is exactly an integer multiple, or the flicker waveform has the same phase each time with respect to the vertical synchronization period,
The average value calculation unit shifts the sampling phase of one of the integral values in two consecutive sampling periods by a half period of the flicker period, and performs averaging.
The difference calculation unit obtains a difference by shifting one sampling phase of the integral value in two consecutive sampling periods by a half period of the flicker period.
An image processing apparatus characterized by this.

近年、固体撮像素子を用いて画像をキャプチャするデジタルカメラが普及しているが、商用交流電源により点灯される蛍光灯照明下で被写体を撮影すると、光源の輝度変化(光量変化)の周波数とカメラの垂直同期周波数との違いのために撮像画像上に生じる時間的な明暗が変化するフリッカ現象が生じることが知られている。特に、CMOS型イメージ・センサなどのXYアドレス走査型の撮像素子を用いた場合には、水平ライン毎の露光タイミングが異なるため、撮像画像上のフリッカは、垂直方向の周期的な輝度レベルあるいは色相の変動による縞模様として観察される。   In recent years, digital cameras that capture images using a solid-state image sensor have become widespread. However, when a subject is photographed under fluorescent lamp lighting that is lit by a commercial AC power supply, the frequency of the luminance change (light quantity change) of the light source and the camera It is known that a flicker phenomenon in which temporal brightness changes on a captured image occurs due to a difference from the vertical synchronization frequency. In particular, when an XY address scanning type imaging device such as a CMOS type image sensor is used, the exposure timing for each horizontal line is different, and therefore flicker on the captured image has a periodic luminance level or hue in the vertical direction. Observed as a striped pattern due to fluctuations.

画像信号からフリッカ波形を検出してその逆波形を補正ゲインとして画像信号に適用するゲイン補正方式によって、フリッカ成分を除去することができる。例えば、画像信号を1水平周期以上の時間にわたって積分し、その積分値又は隣接するフィールド又はフレームにおける積分値の差分値を正規化し、その正規化後の積分値又は差分値から抽出されるスペクトルを基にフリッカ成分を推定する方法が知られており、フリッカ縞1周期分のサンプリング・データからDFT周期を基本波とするフリッカの周波数スペクトルを計算し、低次項のみを利用してフリッカ波形を高精度に推定することができる(特許文献1を参照のこと)。   A flicker component can be removed by a gain correction method in which a flicker waveform is detected from an image signal and the inverse waveform is applied to the image signal as a correction gain. For example, the image signal is integrated over a period of one horizontal period or more, the integral value or the difference value of the integral value in an adjacent field or frame is normalized, and the spectrum extracted from the normalized integral value or difference value after the normalization is obtained. There is a known method for estimating the flicker component, and the frequency spectrum of the flicker whose fundamental wave is the DFT period is calculated from the sampling data for one period of the flicker fringe, and the flicker waveform is increased using only the low-order terms. The accuracy can be estimated (see Patent Document 1).

また、高速撮影時にはフリッカ1周期が1画面内に収まりきらないが、フリッカ縞が1周期分以上含まれる時間に相当する複数フィールド分の画像情報を集め、常時フリッカ縞の情報が1周期以上含まれるような形に前処理した上で、上述のように、正規化後の積分値又は差分値として、フリッカ成分以外の信号成分を除去してフリッカ成分を高精度で推定できる信号を得て、その正規化後の積分値又は差分値の適当な次数までのスペクトルを抽出することによってフリッカ成分を高精度で推定することができる(特許文献2を参照のこと)。   Also, during high-speed shooting, one cycle of flicker does not fit within one screen, but image information for a plurality of fields corresponding to a time in which flicker fringes are included for one cycle or more is collected, and information on flicker fringes is always included for one cycle or more. After pre-processing in such a form, as described above, as a normalized integral value or difference value, a signal component other than the flicker component is removed to obtain a signal that can estimate the flicker component with high accuracy, The flicker component can be estimated with high accuracy by extracting a spectrum up to an appropriate order of the normalized integral value or difference value after the normalization (see Patent Document 2).

しかしながら、例えば電源周波数が60Hzの地域の蛍光灯下でフレームレートが240fpsとなる高速撮影を行なう場合には、フレームレートとフリッカの1周期に相当する時間がちょうど整数倍の関係にあることから、各検波枠単位のフリッカ縞が垂直同期期間に対して全く同じ位置になる「固定フリッカ縞」が発生する。このような場合、正規化処理を行なう際にフィールド間の差分を取った時点で、背景とともにフリッカ縞の情報もなくなってしまい、たとえフリッカに繰り返し性があっても背景と区別することができない。すなわち、フリッカ現象の繰り返し性を使って背景とフリッカ縞の区別を行なう上記のフリッカ検出アルゴリズムを適用することはできない。   However, for example, when performing high-speed shooting with a frame rate of 240 fps under a fluorescent lamp in a region where the power supply frequency is 60 Hz, the time corresponding to one cycle of the frame rate and flicker is exactly an integer multiple. A “fixed flicker fringe” is generated in which the flicker fringes of each detection frame unit are exactly at the same position with respect to the vertical synchronization period. In such a case, when the difference between the fields is taken when performing normalization processing, the flicker fringe information is lost together with the background, and even if the flicker has repeatability, it cannot be distinguished from the background. That is, the above-described flicker detection algorithm that distinguishes the background from the flicker fringes using the repeatability of the flicker phenomenon cannot be applied.

他方、シャッタ速度とフリッカ・レベルには関連性があることが知られ、シャッタ速度がN/100(但し、Nは正の整数)のときにフリッカを完全に抑制できるという特性を利用して、フリッカ・レスとなるシャッタ速度S_fklessを用いてフリッカを回避するシャッタ補正方式も知られている。しかしながら、シャッタ速度に制限が生じ、AE制御の自由度が低下するため、高速撮影を行なうカメラにとってシャッタ補正方式によるフリッカの回避という選択肢はない。言い換えれば、フレームレートとフリッカの1周期に相当する時間がちょうど整数倍の関係となることに起因する固定フリッカ縞は、高速撮影時において不可避の問題である。   On the other hand, it is known that there is a relationship between the shutter speed and the flicker level, and using the characteristic that flicker can be completely suppressed when the shutter speed is N / 100 (where N is a positive integer), A shutter correction method that avoids flicker by using a shutter speed S_fkless at which flicker is reduced is also known. However, since the shutter speed is limited and the degree of freedom of AE control is reduced, there is no option to avoid flicker by the shutter correction method for a camera that performs high-speed shooting. In other words, fixed flicker fringes resulting from the fact that the time corresponding to one cycle of the frame rate and flicker is an integral multiple is an inevitable problem during high-speed shooting.

これに対し、本発明に係る画像処理装置は、基本的には、フリッカ現象の繰り返し性を使って背景とフリッカ縞の区別を行なう上記のフリッカ検出アルゴリズムを適用するものであり、フリッカ1周期分以上の長さを持つサンプリング期間にわたってライン毎に画像信号を積分する積分処理部と、連続する2以上のサンプリング期間における積分値を平均化する平均値演算部と、前記の連続する2以上のサンプリング期間における積分値の差分をとる差分演算部と、前記平均値演算部で得られた平均値を用いて前記差分演算部により算出された差分値を正規化する正規化演算部と、前記の正規化された積分値の差分値を周波数解析する周波数解析手段と、前記周波数解析手段による周波数解析した結果に基づいて画像信号に含まれるフリッカ成分を検出するフリッカ検出手段と、前記フリッカ検出手段により検出されたフリッカ成分を画像信号から除去するための演算を行なう演算部で構成される。   On the other hand, the image processing apparatus according to the present invention basically applies the above-described flicker detection algorithm for distinguishing between the background and flicker fringes using the repeatability of the flicker phenomenon. An integration processing unit that integrates an image signal for each line over a sampling period having the above length, an average value calculation unit that averages integration values in two or more consecutive sampling periods, and the two or more consecutive samplings A difference calculation unit that takes a difference between integral values in a period, a normalization calculation unit that normalizes a difference value calculated by the difference calculation unit using an average value obtained by the average value calculation unit, and the normalization Frequency analysis means for frequency analysis of the difference value of the integrated integral value, and flicker included in the image signal based on the result of frequency analysis by the frequency analysis means And flicker detection means for detecting a minute, and a calculation unit for performing an operation for removing a flicker component detected by the flicker detection unit from the image signal.

ここで、フレームレートとフリッカ波形の1周期に相当する時間がちょうど整数倍の関係にあり、フリッカ波形が垂直同期期間に対して毎回同じ位相になって固定フリッカが発生するような撮影環境下では、平均値演算部は、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして加算平均化することによって、フリッカ及び背景ともに同じとなる信号の加重平均をとることを回避するようになっている。また、差分演算部は、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして差分をとることによって、フリッカ及び背景ともに同じとなる信号の差分をとることを回避するようになっている。   Here, in a shooting environment where the frame rate and the time corresponding to one cycle of the flicker waveform are exactly an integer multiple, and the flicker waveform has the same phase every time in the vertical synchronization period and a fixed flicker occurs. The average value calculation unit obtains a weighted average of signals that are the same in both the flicker and the background by shifting and averaging one sampling phase of the integral value in two consecutive sampling periods by a half cycle of the flicker period. To avoid that. In addition, the difference calculation unit obtains a difference between signals that are the same in both the flicker and the background by shifting the sampling phase of one of the integral values in two consecutive sampling periods by a half cycle of the flicker period. It is designed to avoid it.

このように、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして平均化及び差分処理を行なうことによって、フレームレートとフリッカの1周期に相当する時間がちょうど整数倍の関係にあるため固定フリッカが発生する撮影条件下でも、入力された画像信号から背景成分及びフリッカ成分のみを抽出することができるようになる。   In this way, by performing averaging and difference processing by shifting one sampling phase of the integral value in two consecutive sampling periods by a half cycle of the flicker cycle, the time corresponding to one cycle of the frame rate and flicker is exactly the same. Since the relationship is an integral multiple, only the background component and the flicker component can be extracted from the input image signal even under shooting conditions in which fixed flicker occurs.

勿論、フリッカ波形が垂直同期期間に対して同じ位相にならず、固定フリッカが発生しないような撮影環境下では、加算するサンプリング位相の組み合わせを変えた状態で平均化処理を行なったり、差分をとるサンプリング位相の組み合わせを変えた状態で差分処理を行なったりする必要はない。このような場合には、前記平均値演算部は、連続する2以上のサンプリング期間における積分値をサンプリング位相の順に加算平均し、前記差分演算部は、連続する2つのサンプリング期間における積分値の差分をサンプリング位相の順にとるようにすればよい。   Of course, in a shooting environment where the flicker waveform does not have the same phase with respect to the vertical synchronization period and no fixed flicker occurs, averaging processing is performed or the difference is taken with the combination of sampling phases to be added changed. There is no need to perform difference processing in a state where the combination of sampling phases is changed. In such a case, the average value calculation unit adds and averages the integration values in two or more consecutive sampling periods in the order of sampling phases, and the difference calculation unit calculates the difference between the integration values in two consecutive sampling periods. Should be taken in the order of the sampling phase.

要するに、本発明に係る画像処理装置は、前記平均値演算部が連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして加算平均化するとともに、前記差分演算部が連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして差分をとる第1の正規化積分値算出モードと、前記平均値演算部が連続する2以上のサンプリング期間における積分値をサンプリング位相の順に加算平均するとともに、前記差分演算部が連続する2つのサンプリング期間における積分値の差分をサンプリング位相の順にとる第2の正規化積分値算出モードを備えている。そして、被写体を行なう場所が50Hz地域と60Hz地域のいずれであるか、すなわち、前記商用交流電源の周波数に基づくフリッカ波形の1周期とフレームレートが整数倍の関係となるときに前記第1の正規化積分値算出モードに設定し、それ以外のときは前記第2の正規化積分値算出モードに設定するようにすればよいことになる。   In short, the image processing apparatus according to the present invention performs averaging by shifting one sampling phase of the integrated value in two sampling periods in which the average value calculation unit is continuous by a half cycle of a flicker cycle, and the difference calculation unit. The first normalized integral value calculation mode for taking a difference by shifting one sampling phase of the integral values in two consecutive sampling periods by a half cycle of the flicker period, and two or more samplings in which the average value calculation unit is continuous The integration value in the period is added and averaged in the order of the sampling phase, and the difference calculation unit includes a second normalized integration value calculation mode in which the difference between the integration values in two consecutive sampling periods is taken in the order of the sampling phase. When the subject is located in the 50 Hz region or the 60 Hz region, that is, when one cycle of the flicker waveform based on the frequency of the commercial AC power supply and the frame rate have an integer multiple relationship, It is sufficient to set to the integrated integral value calculation mode, and to set to the second normalized integrated value calculation mode in other cases.

また、現在使用している商用交流電源に応じた前記第1の正規化積分値算出モードと前記第2の正規化積分値算出モードのモード切替を自動で行なうことができる。例えば、まず前記第2の正規化積分値算出モードに設定し、画像信号に含まれるフリッカ成分の検出を試みる。このとき、画像信号に含まれるフリッカ成分に相当する周波数スペクトルが前記周波数解析手段によって定常的に発生したときには、50Hz地域であると推定されることから、前記第2の正規化積分値算出モードに設定したままとする。他方、画像信号に含まれるフリッカ成分に相当する周波数スペクトルが前記周波数解析手段によって定常的に発生しなかったときには、60Hz地域であると推定されることから、前記第1の正規化積分値算出モードに切り替えるようにする。   In addition, mode switching between the first normalized integral value calculation mode and the second normalized integral value calculation mode according to the commercial AC power supply currently used can be automatically performed. For example, first, the second normalized integral value calculation mode is set, and detection of a flicker component included in the image signal is attempted. At this time, when the frequency spectrum corresponding to the flicker component included in the image signal is constantly generated by the frequency analysis means, it is estimated that the area is 50 Hz, so the second normalized integral value calculation mode is set. Leave it set. On the other hand, when the frequency spectrum corresponding to the flicker component included in the image signal is not constantly generated by the frequency analysis means, it is estimated that the region is 60 Hz. To switch to.

続いて、前記第2の正規化積分値算出モードでは定常的な周波数スペクトルが発生せず、60Hz地域であると推定したために前記第1の正規化積分値算出モードに切り替えたとき、画像信号に含まれるフリッカ成分に相当する周波数スペクトルが前記周波数解析手段によって定常的に発生したならば、60Hz地域であることが断定的となるので、前記第1の正規化積分値算出モードに設定したままとする。これに対し、画像信号に含まれるフリッカ成分に相当する周波数スペクトルが前記周波数解析手段によって定常的に発生しなかったときには、電源周波数に基づくフリッカ成分の周期の問題ではなく、そもそもフリッカが発声していない状態であることが推定される。このような場合には、いずれの算出モードであっても、フリッカ検出値が出力されず、その結果として入力画像信号に対し不要な補正がかかることもない。   Subsequently, in the second normalized integral value calculation mode, a stationary frequency spectrum does not occur, and since it is estimated that the region is 60 Hz, when switching to the first normalized integral value calculation mode, an image signal is displayed. If a frequency spectrum corresponding to the included flicker component is steadily generated by the frequency analysis means, it is determined that the region is 60 Hz, so that the first normalized integral value calculation mode remains set. To do. On the other hand, when the frequency spectrum corresponding to the flicker component included in the image signal is not constantly generated by the frequency analysis means, it is not a problem of the cycle of the flicker component based on the power supply frequency, and the flicker is originally uttered. It is estimated that there is no state. In such a case, the flicker detection value is not output in any calculation mode, and as a result, no unnecessary correction is applied to the input image signal.

なお、本発明の要旨は、60Hz地域で240fpsというように高速撮影を行なう場合に限定されるものではない。通常撮影時において垂直同期とフリッカ縞が同期してしまう条件下でも同様に本発明を適用することができ、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして加算平均化及び差分を演算することによって、ゲイン補正方式による高精度なフリッカ検出及び補正処理を実現することができる。   The gist of the present invention is not limited to the case where high-speed shooting is performed such as 240 fps in a 60 Hz region. The present invention can be applied in the same manner even under conditions where vertical synchronization and flicker fringe are synchronized during normal shooting, and the sampling phase of one of the integral values in two consecutive sampling periods is shifted by a half period of the flicker period. Thus, by calculating the averaging and the difference, it is possible to realize high-precision flicker detection and correction processing by the gain correction method.

本発明によれば、商用交流電源による蛍光灯照明下においてCMOSイメージ・センサなどのXYアドレス走査型固体撮像装置で撮影した場合に発生する横縞状の蛍光灯フリッカを好適に検出して画像信号からフリッカを取り除くことができる、優れた画像処理装置及び画像処理方法、並びに撮像装置を提供することができる。   According to the present invention, horizontal stripe-like fluorescent lamp flicker generated when an image is taken with an XY address scanning solid-state imaging device such as a CMOS image sensor under fluorescent lamp illumination by a commercial AC power source is suitably detected from the image signal. It is possible to provide an excellent image processing apparatus, image processing method, and imaging apparatus that can remove flicker.

また、本発明によれば、標準テレビ信号よりも高速なフレームレートで被写体を撮像する高速撮影時に生じる、1画面内に1周期分が入りきらないフリッカ縞を好適に検出して画像信号からフリッカを取り除くことができる、優れた画像処理装置及び画像処理方法、並びに撮像装置を提供することができる。   In addition, according to the present invention, flicker fringes that do not fit in one period within one screen and that occur when shooting a subject at a frame rate higher than that of a standard television signal are preferably detected to detect flicker from the image signal. It is possible to provide an excellent image processing apparatus, image processing method, and image pickup apparatus that can eliminate the above.

また、本発明によれば、通常撮影時に固定フリッカ縞が発生するような撮影環境下で高速撮影モードに入れたときに、画像信号からフリッカを好適に検出し取り除くことができる、優れた画像処理装置及び画像処理方法、並びに撮像装置を提供することができる。   In addition, according to the present invention, excellent image processing that can suitably detect and remove flicker from an image signal when entering a high-speed shooting mode in a shooting environment where fixed flicker fringes occur during normal shooting. An apparatus, an image processing method, and an imaging apparatus can be provided.

本発明のさらに他の目的、特徴や利点は、後述する本発明の実施形態や添付する図面に基づくより詳細な説明によって明らかになるであろう。   Other objects, features, and advantages of the present invention will become apparent from more detailed description based on embodiments of the present invention described later and the accompanying drawings.

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

図1には、本発明を適用するのに適した撮像装置の構成を模式的に示している。図示の撮像装置は、光学ブロック11と、ドライバ11aと、CMOS型イメージ・センサ12と、タイミング・ジェネレータ(TG)12aと、アナログ・フロント・エンド(AFE)回路13と、カメラ処理回路14と、システム・コントローラ15と、入力部16と、グラフィックI/F(インターフェース)17と 、ディスプレイ17aを備えている。以下、各部について説明する。   FIG. 1 schematically shows the configuration of an imaging apparatus suitable for applying the present invention. The illustrated imaging apparatus includes an optical block 11, a driver 11a, a CMOS image sensor 12, a timing generator (TG) 12a, an analog front end (AFE) circuit 13, a camera processing circuit 14, A system controller 15, an input unit 16, a graphic I / F (interface) 17, and a display 17a are provided. Hereinafter, each part will be described.

光学ブロック11は、被写体からの光をCMOSセンサ12に集光するためのレンズと、レンズを移動させてフォーカス合わせやズーミングを行なうための駆動機構と、シャッタ機構と、アイリス機構などで構成される。ドライバ11aは、システム・コントローラ15からの制御信号に基づいて、光学ブロック11内の各機構を駆動する。   The optical block 11 includes a lens for condensing light from a subject on the CMOS sensor 12, a drive mechanism for moving the lens to perform focusing and zooming, a shutter mechanism, an iris mechanism, and the like. . The driver 11 a drives each mechanism in the optical block 11 based on a control signal from the system controller 15.

CMOSセンサ12は、CMOS基板上に、フォトダイオード(フォトゲート)、転送ゲート(シャッタ・トランジスタ)、スイッチング・トランジスタ(アドレスト・ランジスタ)、増幅トランジスタ、リセット・トランジスタ(リセット・ゲート)などからなる複数の画素を2次元状に配列して形成され、垂直走査回路、水平走査回路、画像信号の出力回路なども同一のCMOS基板上に形成される。CMOSセンサ12は、タイミング・ジェネレータ12aから出力されるタイミング信号に基づいて駆動し、被写体からの入射光を電気信号に変換する。タイミング・ジェネレータ12aは、システム・コントローラ15の制御の下でタイミング信号を出力する。   The CMOS sensor 12 includes a plurality of photodiodes (photogates), transfer gates (shutter transistors), switching transistors (addressed transistors), amplification transistors, reset transistors (reset gates), etc. on a CMOS substrate. These pixels are formed in a two-dimensional arrangement, and a vertical scanning circuit, a horizontal scanning circuit, an image signal output circuit, and the like are also formed on the same CMOS substrate. The CMOS sensor 12 is driven based on the timing signal output from the timing generator 12a, and converts incident light from the subject into an electrical signal. The timing generator 12 a outputs a timing signal under the control of the system controller 15.

CMOSセンサ12は、例えば、1ライン分の画素信号を出力するときに、撮像素子上の隣接している同色の画素の信号を加算して同時に出力することによって、画素信号を読み出す際の同期周波数を高めることなく、画面の切り替えレートを高めている。またこれにより、画角を変えることなく画像サイズ( 解像度) が低下する。本実施形態では、CMOSセンサ12は、NTSC方式の仕様である6 0fpsによる通常速度での通常撮像モードとともに、60fpsより高いフレームレート(例えば240fps)で高速に撮像する高速撮像モードを備えているものとする。   For example, when outputting a pixel signal for one line, the CMOS sensor 12 adds the signals of adjacent pixels of the same color on the image sensor and outputs the signals simultaneously, thereby synchronizing the frequency when reading out the pixel signals. Without increasing the screen, the screen switching rate is increased. This also reduces the image size (resolution) without changing the angle of view. In the present embodiment, the CMOS sensor 12 has a high-speed imaging mode for high-speed imaging at a frame rate higher than 60 fps (for example, 240 fps), in addition to a normal imaging mode at a normal speed of 60 fps, which is the NTSC specification. And

AFE回路13は、CMOSセンサ12から出力された画像信号に対して、CDS(Correlated Double Sampling:相関多重サンプリング)処理によりS/N(Signal/Noise)比を良好に保つようにサンプル・ホールドを行ない、さらにAGC(Auto Gain Control:自動利得制御)処理により利得を制御し、A/D 変換を行なってデジタル画像信号を出力する。なお、AFE回路13は、例えば1つのIC(Integrated Circuit)として構成されるが、あるいはCDS処理を行なう回路をCMOSセンサ12と同一のCMOS基板上に形成されてもよい。   The AFE circuit 13 samples and holds the image signal output from the CMOS sensor 12 so as to maintain a good S / N (Signal / Noise) ratio by CDS (Correlated Double Sampling) processing. Further, the gain is controlled by AGC (Auto Gain Control) processing, A / D conversion is performed, and a digital image signal is output. The AFE circuit 13 is configured as, for example, one IC (Integrated Circuit), or a circuit for performing CDS processing may be formed on the same CMOS substrate as the CMOS sensor 12.

カメラ処理回路14は、例えば1つのICとして構成され、AFE回路13からの画像信号に対するAF(Auto Focus:自動焦点合わせ)、AE(Auto Exposure:自動露光調整)、AWB(Auto White Balance:ホワイトバランス調整)などの各種カメラ信号処理、又はその処理の一部を実行する。本実施形態では、カメラ処理回路14は蛍光灯下の撮像時に画面に生じるフリッカの信号成分を画像信号から低減するフリッカ低減部20を備えている。   The camera processing circuit 14 is configured as one IC, for example, and performs AF (Auto Focus), AE (Auto Exposure), AWB (Auto White Balance) on the image signal from the AFE circuit 13. Various camera signal processing such as (adjustment) or a part of the processing is executed. In the present embodiment, the camera processing circuit 14 includes a flicker reducing unit 20 that reduces the flicker signal component generated on the screen during imaging under a fluorescent lamp from the image signal.

システム・コントローラ15 は、例えば、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)などからなるマイクロプロセッサで構成され、ROMなどに記憶されたプログラムを実行することにより、この撮像装置の各部を統括的に制御する。   The system controller 15 is constituted by a microprocessor including, for example, a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like, and by executing a program stored in the ROM or the like, Each part of this imaging apparatus is controlled in an integrated manner.

入力部16は、例えばシャッタ・レリーズ・ボタンなどの各種操作キーやレバー、ダイヤルなどにより構成され、ユーザによる入力操作に応じた制御信号をシステム・コントローラ15に出力する。   The input unit 16 includes various operation keys such as a shutter release button, a lever, a dial, and the like, and outputs a control signal corresponding to an input operation by the user to the system controller 15.

グラフィックI/F17は、カメラ処理回路14からシステム・コントローラ15を介して供給された画像信号から、ディスプレイ17aに表示させるための画像信号を生成して、この信号をディスプレイ17aに供給し、画像を表示させる。ディスプレイ17aは、例えばLCD(Liquid Crystal Display)からなり、撮像中のカメラスルー画像や図示しない記録媒体に記録されたデータに基づく再生画像などを表示する。また、ディスプレイ17a上には、システム・コントローラ15からの要求に応じて、メニュー画面や各種設定画面や、各種警告情報などを合成して、OSD(On SCreen Display)として表示出力される。   The graphic I / F 17 generates an image signal to be displayed on the display 17a from the image signal supplied from the camera processing circuit 14 via the system controller 15, and supplies this signal to the display 17a. Display. The display 17a is composed of, for example, an LCD (Liquid Crystal Display), and displays a camera-through image being captured, a reproduced image based on data recorded on a recording medium (not shown), and the like. Further, on the display 17a, in response to a request from the system controller 15, a menu screen, various setting screens, various warning information, and the like are combined and displayed and output as an OSD (On Screen Display).

図示の撮像装置では、CMOSセンサ12によって受光されて光電変換された信号が、順次AFE回路13に供給され、CDS処理やAGC処理が施された後、デジタル信号に変換される。カメラ処理回路14は、AFE回路13から供給されたデジタル画像信号を画質補正処理し、最終的に輝度信号(Y)と色差信号(R−Y,B−Y)に変換して出力する。   In the illustrated image pickup apparatus, signals received and photoelectrically converted by the CMOS sensor 12 are sequentially supplied to the AFE circuit 13, subjected to CDS processing and AGC processing, and then converted into digital signals. The camera processing circuit 14 performs image quality correction processing on the digital image signal supplied from the AFE circuit 13, and finally converts the digital image signal into a luminance signal (Y) and a color difference signal (RY, BY) and outputs the result.

カメラ処理回路14から出力された画像データは、システム・コントローラ15を介してグラフィックI/F17に供給されて表示用の画像信号に変換され、これによりディスプレイ17aにカメラスルー画像が表示される。また、入力部16からのユーザの入力操作などによりシステム・コントローラ15に対して画像の記録が指示されると、カメラ処理回路14からの画像データはエンコーダ(図示しない)に供給され、所定の圧縮符号化処理が施されて図示しない記録媒体に記録される。静止画像の記録の際には、カメラ処理回路14からは1フレーム分の画像データがエンコーダに供給され、動画像の記録の際には、AF、AE、AWBなどカメラ信号処理が施された画像データがエンコーダに連続的に供給される。   The image data output from the camera processing circuit 14 is supplied to the graphic I / F 17 via the system controller 15 and converted into a display image signal, whereby a camera-through image is displayed on the display 17a. When the system controller 15 is instructed to record an image by a user input operation or the like from the input unit 16, the image data from the camera processing circuit 14 is supplied to an encoder (not shown) and is subjected to predetermined compression. The encoding process is performed and the data is recorded on a recording medium (not shown). At the time of recording a still image, image data for one frame is supplied from the camera processing circuit 14 to the encoder, and at the time of recording a moving image, an image subjected to camera signal processing such as AF, AE, AWB, etc. Data is continuously supplied to the encoder.

図2には、カメラ処理回路14の内部構成を示している。図示のカメラ処理回路14は、当該回路全体に対する基準信号を生成する基準信号生成部30と、基準信号生成部30から基準信号の供給を受けて動作する、各種カメラ信号処理のための複数の処理ブロック31、32、33…を備えている。また、本実施形態では、処理ブロックの1つとしてフリッカ低減部20が配設されている。   FIG. 2 shows the internal configuration of the camera processing circuit 14. The illustrated camera processing circuit 14 includes a reference signal generation unit 30 that generates a reference signal for the entire circuit, and a plurality of processes for various camera signal processing that operate upon receiving a reference signal from the reference signal generation unit 30. Blocks 31, 32, 33... Are provided. In the present embodiment, a flicker reduction unit 20 is provided as one of the processing blocks.

基準信号生成部30は、源発振器(図示しない)からカメラ処理回路14に供給される基準信号に同期して、処理ブロック31、32、33…をそれぞれ動作させるための基準信号SIG_REF_1、SIG_REF_2、SIG_REF_3…を生成して出力する。各基準信号SIG_REF_1、SIG_REF_2、SIG_REF_3…は、画像信号の流れなどに応じて各処理ブロック31、32、33…間で生じる遅延を考慮して出力される。また、処理ブロック31、32、33…には、供給された基準信号SIG_REF_1、SIG_REF_2、SIG_REF_3…を基にそれらの内部での動作タイミングを詳細に司る基準信号を生成するブロック(いずれも図示しない)がそれぞれ設けられている。   The reference signal generator 30 synchronizes with a reference signal supplied from a source oscillator (not shown) to the camera processing circuit 14, and operates the reference signals SIG_REF_1, SIG_REF_2, SIG_REF_3 for operating the processing blocks 31, 32, 33,. Generate and output…. Each of the reference signals SIG_REF_1, SIG_REF_2, SIG_REF_3,... Is output in consideration of a delay that occurs between the processing blocks 31, 32, 33,. Further, the processing blocks 31, 32, 33,... Generate a reference signal that controls the operation timing in detail based on the supplied reference signals SIG_REF_1, SIG_REF_2, SIG_REF_3, etc. (none of them are shown). Are provided.

処理ブロックの1つであるフリッカ低減部20も同様に、基準信号生成部30からの基準信号SIG_REF_FKを基にフリッカ低減部20の内部での動作タイミングを司る基準信号を生成する内部基準信号生成部21と、生成された基準信号を用いて動作する検出・低減処理部22とを備えている。   Similarly, the flicker reducing unit 20 that is one of the processing blocks also generates an internal reference signal generating unit that generates a reference signal that controls operation timing inside the flicker reducing unit 20 based on the reference signal SIG_REF_FK from the reference signal generating unit 30. 21 and a detection / reduction processing unit 22 that operates using the generated reference signal.

基準信号生成部30は、フリッカ低減部20に対する基準信号SIG_REF_FKとして、垂直同期信号VD、水平同期信号HD、垂直方向に対する画像信号の有効期間を示す2種類のイネーブル信号VEN1及びVEN2(後述)、水平方向に対する画像信号の有効期間を示すイネーブル信号HENなどを出力する。内部基準信号生成部21は、これらの信号を基に、検出・低減処理部22に対する各種基準信号やカウント値などを生成する。   The reference signal generation unit 30 uses, as a reference signal SIG_REF_FK for the flicker reduction unit 20, a vertical synchronization signal VD, a horizontal synchronization signal HD, two types of enable signals VEN1 and VEN2 (to be described later) indicating the effective period of the image signal in the vertical direction, and horizontal An enable signal HEN indicating the effective period of the image signal with respect to the direction is output. The internal reference signal generation unit 21 generates various reference signals and count values for the detection / reduction processing unit 22 based on these signals.

内部基準信号生成部21はカウンタ21aを備え、このカウンタ21aにより、1垂直期間中の有効期間におけるライン数を示すカウント値VCOUNTを出力する。カウンタ21aは、システム・コントローラ15から撮像モードの設定を受け取ると、その設定に対応したフレームレートに従ってイネーブル信号VEN1又はVEN2のいずれかを選択する。そして、内部基準信号生成部21は、選択したイネーブル信号がハイ・レベルの期間における水平同期信号HDのカウント数をVCOUNTとして出力し、イネーブル信号がロー・レベルに転じたときにカウント値VCOUNTをリセットする。   The internal reference signal generation unit 21 includes a counter 21a. The counter 21a outputs a count value VCOUNT indicating the number of lines in an effective period in one vertical period. When the counter 21a receives the setting of the imaging mode from the system controller 15, the counter 21a selects either the enable signal VEN1 or VEN2 according to the frame rate corresponding to the setting. Then, the internal reference signal generation unit 21 outputs the count number of the horizontal synchronizing signal HD during the period when the selected enable signal is at the high level as VCOUNT, and resets the count value VCOUNT when the enable signal changes to the low level. To do.

検出・低減処理部22内の各部は、画像信号の垂直方向に対する動作タイミングはすべてカウント値VCOUNTを基準に制御される。内部基準信号生成部21は、例えば、カウント値VCOUNTと所定の値とを比較することで、ある期間のみハイ・レベルとなるイネーブル信号、ある期間で所定の間隔でハイ・レベルとなるパルス信号などといった信号を自在に生成し、検出・低減処理部22の動作タイミングを制御することができる。   Each unit in the detection / reduction processing unit 22 is controlled based on the count value VCOUNT for the operation timing of the image signal in the vertical direction. The internal reference signal generation unit 21 compares, for example, the count value VCOUNT with a predetermined value, thereby enabling an enable signal that becomes high level only during a certain period, a pulse signal that becomes high level at a predetermined interval during a certain period, and the like. Can be freely generated, and the operation timing of the detection / reduction processing unit 22 can be controlled.

本実施形態では、内部基準信号生成部21は、システム・コントローラ15から設定された撮像モードに応じて、フリッカ縞の1周期分に相当するカウント数(後述するT_fk)を算出し、イネーブル信号VEN1又はVEN2がハイ・レベルで且つカウント値VCOUNTがそのカウント数(T_fk:フリッカ縞の1周期分に相当するライン数)に達するまでの間にハイ・レベルとするイネーブル信号DETECT_ENを生成して、検出・低減処理部22に供給する。イネーブル信号DETECT_ENは、検出・低減処理部22での画像信号のサンプリング期間を示し、検出・低減処理部22内の検波系ブロック(後述)は、このサンプリング期間を基準として動作する。   In the present embodiment, the internal reference signal generation unit 21 calculates a count number (T_fk described later) corresponding to one cycle of flicker fringes according to the imaging mode set by the system controller 15, and enables the enable signal VEN1. Alternatively, the enable signal DETECT_EN is generated and detected until the VEN2 is at the high level and the count value VCOUNT reaches the count number (T_fk: the number of lines corresponding to one cycle of flicker stripes). Supply to the reduction processing unit 22. The enable signal DETECT_EN indicates a sampling period of the image signal in the detection / reduction processing unit 22, and a detection block (described later) in the detection / reduction processing unit 22 operates based on this sampling period.

なお、内部基準信号生成部21がシステム・コントローラ1から通知される撮影モードに応じてイネーブル信号DETECT_ENがハイ・レベルとなる期間を決めるカウント数(T_fk)を設定するのではなく、システム・コントローラ15がカウント数(T_fk)を直接設定するようにしてもよい。   The internal reference signal generation unit 21 does not set the count number (T_fk) that determines the period during which the enable signal DETECT_EN is at the high level according to the imaging mode notified from the system controller 1, but the system controller 15 May directly set the count number (T_fk).

検出・低減処理部22は、イネーブル信号DETECT_ENでアサートされるサンプリング期間において、入力画像信号をサンプリングし、そのサンプリング・データからフリッカ波形を推定して、画像信号のゲインを調整して、フリッカ成分を低減もしくは除去する処理を実行する。フリッカ成分の検出と低減に関する一連の処理は、イネーブル信号DETECT_EN及びカウント値VCOUNTなど、内部基準信号生成部21からの各種基準信号に基づいて実行される。   The detection / reduction processing unit 22 samples the input image signal in the sampling period asserted by the enable signal DETECT_EN, estimates the flicker waveform from the sampling data, adjusts the gain of the image signal, and extracts the flicker component. A process to reduce or eliminate is executed. A series of processing relating to detection and reduction of flicker components is executed based on various reference signals from the internal reference signal generation unit 21 such as the enable signal DETECT_EN and the count value VCOUNT.

図3には、検出・低減処理部20の内部構成を示している。以下では、どう図を参照しながら、検出・低減処理部20内の各部の構成と画像信号のサンプリング動作について説明する。   FIG. 3 shows an internal configuration of the detection / reduction processing unit 20. Hereinafter, the configuration of each unit in the detection / reduction processing unit 20 and the sampling operation of the image signal will be described with reference to the drawings.

図示の検出・低減処理部22は、画像信号を検波し、その検波値を正規化して出力する正規化積分値算出部110と、正規化された検波値にDFT処理を施すDFT処理部120と、DFTによるスペクトル解析の結果からフリッカ成分を推定するフリッカ生成部130と、フリッカ成分の推定値を一時的に記憶するバッファ140と、推定されたフリッカ成分を画像信号から除去する演算部150を備えている。   The illustrated detection / reduction processing unit 22 detects an image signal, normalizes the detection value and outputs the normalized detection value, and a DFT processing unit 120 performs DFT processing on the normalized detection value. , A flicker generation unit 130 that estimates a flicker component from the result of spectrum analysis by DFT, a buffer 140 that temporarily stores an estimated value of the flicker component, and a calculation unit 150 that removes the estimated flicker component from the image signal. ing.

正規化積分値算出部110は、積分処理部111と、積分値保持部112と、平均値演算部113と、差分演算部114と、正規化処理部115で構成される。   The normalized integral value calculation unit 110 includes an integration processing unit 111, an integration value holding unit 112, an average value calculation unit 113, a difference calculation unit 114, and a normalization processing unit 115.

積分処理部111は、フリッカ成分を含んだ入力画像信号In´(x,y)を、イネーブル信号DETECT_ENがハイ・レベルとなるサンプリング期間(前述)にわたってライン毎に積分する。積分値保持部112は、2つのサンプリング期間に算出された積分値Fn_1(y)及びFn_2(y)を一時的に保持する。   The integration processing unit 111 integrates the input image signal In ′ (x, y) including the flicker component for each line over a sampling period (described above) in which the enable signal DETECT_EN is at a high level. The integral value holding unit 112 temporarily holds the integral values Fn_1 (y) and Fn_2 (y) calculated in two sampling periods.

平均値演算部113は、直近のサンプリング期間に算出された積分値を平均化する機能ブロックであり、積分処理部111からの出力に、フリッカ縞の繰り返し周期に相当する過去の積分処理部111からの出力分(積分値保持部112から与えられる)を加算して、その平均値を出力する。   The average value calculation unit 113 is a functional block that averages the integration values calculated during the most recent sampling period. The output from the integration processing unit 111 is output from the past integration processing unit 111 corresponding to the flicker fringe repetition period. Are added to each other (given from the integrated value holding unit 112), and the average value is output.

差分演算部114は、直近の2つのサンプリング期間に算出された積分値の差分を算出する機能ブロックであり、積分処理部111からの出力から、積分処理部111からの1フィールド前の出力(積分値保持部112から与えられる)を差し引くことで背景成分を取り除く、純粋にフリッカ成分だけを抽出する。   The difference calculation unit 114 is a functional block that calculates the difference between the integration values calculated in the two most recent sampling periods. From the output from the integration processing unit 111, the output (integration) one field before from the integration processing unit 111 is calculated. The background component is removed by subtracting (provided from the value holding unit 112), and only the flicker component is extracted.

正規化処理部115は、平均値演算部113で得られた平均値を用いて、差分演算部114により算出された差分値を正規化する。   The normalization processing unit 115 normalizes the difference value calculated by the difference calculation unit 114 using the average value obtained by the average value calculation unit 113.

DFT処理部120は、正規化された差分値にDFTを施して周波数解析し、フリッカ成分の振幅γm及び初期位相φmnを推定する。フリッカ生成部130は、周波数解析による推定値から、画像信号に含まれるフリッカ成分の割合を示す補正係数を算出する。演算部150は、算出された補正係数に基づいて、入力画像信号In´(x,y)からフリッカ成分を除去するための演算を行ない、フリッカ成分が低減され若しくは除去された画像信号In(x,y)を出力する。   The DFT processing unit 120 performs DFT on the normalized difference value and performs frequency analysis to estimate the flicker component amplitude γm and the initial phase φmn. The flicker generation unit 130 calculates a correction coefficient indicating the ratio of flicker components included in the image signal from the estimated value obtained by frequency analysis. The calculation unit 150 performs a calculation for removing the flicker component from the input image signal In ′ (x, y) based on the calculated correction coefficient, and the image signal In (x) in which the flicker component is reduced or removed. , Y).

図4には、平均値演算部113の内部構成を示している。平均値演算部113は、入力画像信号から背景成分のみを抽出するために、積分処理部111からの出力に、フリッカ縞の繰り返し周期に相当する過去の積分処理部111からの出力分(積分値保持部112から与えられる)を加算して、その平均値を出力する。本実施形態では、現サンプリング期間における各ラインyの入力画像信号の積分値Fn(y)とこれに直近する過去2つのサンプリング期間における同一ラインyの積分値Fn_1(y)及びFn_2(y)との3V平均に相当する平均化処理Aと並列して、現サンプリング期間とその1つ前のサンプリング期間におけるライン毎の積分値の2V平均に相当する平均化処理Bを設け、選択部(SEL)が外部からの指示によりそれぞれの平均化処理A又はBのいずれかの出力を平均値演算部113の出力Ave[Fn(y)]として選ぶことができる構成になっている。   FIG. 4 shows an internal configuration of the average value calculation unit 113. In order to extract only the background component from the input image signal, the average value calculation unit 113 outputs to the output from the integration processing unit 111 the output from the past integration processing unit 111 corresponding to the flicker fringe repetition cycle (integrated value). And the average value is output. In the present embodiment, the integrated value Fn (y) of the input image signal of each line y in the current sampling period and the integrated values Fn_1 (y) and Fn_2 (y) of the same line y in the two most recent sampling periods. In parallel with the averaging process A corresponding to the 3V average, an averaging process B corresponding to the 2V average of the integrated value for each line in the current sampling period and the immediately preceding sampling period is provided, and a selection unit (SEL) However, the output of either of the averaging processes A or B can be selected as the output Ave [Fn (y)] of the average value calculation unit 113 by an instruction from the outside.

平均化処理Aでは、サンプリング位相の順に3つの波形Fn(y)、Fn_1(y)、及びFn_2(y)を加算平均するだけである(図5Aを参照のこと)。すなわち平均化処理Aは下式(5)で表される。   In the averaging process A, the three waveforms Fn (y), Fn_1 (y), and Fn_2 (y) are simply added and averaged in the order of the sampling phase (see FIG. 5A). That is, the averaging process A is expressed by the following formula (5).

Figure 2009017167
Figure 2009017167

一方、平均化処理Bでは、単純にサンプリング位相の順に2つの波形Fn(y)及びFn_1(y)を加算平均するのではなく、サンプリング位相をフリッカ周期の半周期分ずらして加算平均化する。すなわち、平均化処理Bでは、ラインyのサンプリング位相に応じて計算式が異なり、フリッカ位相0〜πに相当する0≦y<T_fk/2の領域では下式(6)によって1つ前のサンプリング期間の半周期だけ先の波形Fn_1(y+T_fk/2)との平均化を行なうが(図5Bを参照のこと)、フリッカ位相π〜2πに相当するT_fk/2≦y<T_fkの領域では下式(7)により1つ前のサンプリング期間の半周期だけ後の波形Fn_1(y−T_fk/2)との平均化を行なう(図5Cを参照のこと)。平均化処理Bは、フリッカ及び背景ともに同じとなる信号の加重平均をとることを回避することを目的とする。言い換えると背景が同じでちょうどフリッカ信号が逆相となる信号の加算平均をとることに相当する(後述)。   On the other hand, in the averaging process B, instead of simply averaging the two waveforms Fn (y) and Fn_1 (y) in the order of the sampling phase, the sampling phase is shifted and averaged by shifting the half of the flicker period. That is, in the averaging process B, the calculation formula differs according to the sampling phase of the line y. In the region of 0 ≦ y <T_fk / 2 corresponding to the flicker phase 0 to π, the previous sampling is performed by the following formula (6). Although averaging with the previous waveform Fn_1 (y + T_fk / 2) is performed for a half cycle of the period (see FIG. 5B), in the region of T_fk / 2 ≦ y <T_fk corresponding to flicker phases π to 2π By (7), averaging is performed with the waveform Fn_1 (y-T_fk / 2) after a half cycle of the previous sampling period (see FIG. 5C). The purpose of the averaging process B is to avoid taking a weighted average of signals that are the same for both flicker and background. In other words, this is equivalent to taking an average of signals having the same background and having the flicker signal in reverse phase (described later).

Figure 2009017167
Figure 2009017167

Figure 2009017167
Figure 2009017167

このように加算するサンプリング位相の組み合わせを変えた状態で平均化処理を行なう。なお、位相をずらすべき側は本質的には現サンプリング期間における積分値Fn(y)であっても構わないが、以下では上式(6)並びに(7)に示したように1つ前のサンプリング期間の積分値Fn_1(y)の位相をずらすものとして説明する。   The averaging process is performed in such a state that the combination of sampling phases to be added is changed. The phase shift side may be essentially the integrated value Fn (y) in the current sampling period, but in the following, as shown in the above equations (6) and (7), A description will be given assuming that the phase of the integration value Fn_1 (y) in the sampling period is shifted.

図6には、差分演算部114の内部構成を示している。差分演算部114はフリッカ成分のみを抽出するために、積分処理部111からの出力から、1つ前の積分処理部111からの出力(積分値保持部112から与えられる)を差し引くことで背景成分を取り除いて、純粋にフリッカ成分だけを抽出する。本実施形態では、サンプリング期間における各ラインyの入力画像信号の積分値Fn(y)からその1つ前の前のサンプリング期間における同一ラインyの積分値Fn_1(y)を差し引く差分処理Aと並列して、現サンプリング期間とその1つ前のサンプリング期間におけるライン毎の差分を行なう差分処理Bを設け、選択部(SEL)が外部からの指示によりそれぞれの差分処理A又はBのいずれかの出力を差分演算部114の出力[Fn(y)−Fn_1(y)]として選ぶことができる構成になっている。   FIG. 6 shows an internal configuration of the difference calculation unit 114. In order to extract only the flicker component, the difference calculation unit 114 subtracts the output from the previous integration processing unit 111 (given from the integration value holding unit 112) from the output from the integration processing unit 111, thereby extracting the background component. And only the flicker component is extracted. In the present embodiment, in parallel with the difference processing A in which the integral value Fn_1 (y) of the same line y in the immediately preceding sampling period is subtracted from the integral value Fn (y) of the input image signal of each line y in the sampling period. Then, a difference process B for performing a difference for each line in the current sampling period and the immediately preceding sampling period is provided, and the selection unit (SEL) outputs either of the difference processes A or B according to an instruction from the outside. Can be selected as the output [Fn (y) -Fn_1 (y)] of the difference calculation unit 114.

差分処理Aでは、サンプリング位相の順に2つの波形Fn(y)とFn_1(y)の差分をとるだけである(図5Aを参照のこと)。すなわち、差分処理Aは下式(8)で表される。   In the difference process A, only the difference between the two waveforms Fn (y) and Fn_1 (y) is taken in the order of the sampling phase (see FIG. 5A). That is, the difference process A is expressed by the following equation (8).

Figure 2009017167
Figure 2009017167

一方、差分処理Bでは、単純にサンプリング位相の順に2つの波形Fn(y)及びFn_1(y)の差分をとるのではなく、サンプリング位相をフリッカ周期の半周期分ずらして差分をとる。すなわち、差分処理Bでは、ラインyのサンプリング位相に応じて計算式が異なり、フリッカ位相0〜πに相当する0≦y<T_fk/2の領域では下式(9)によって1つ前のサンプリング期間の半周期だけ先の波形Fn_1(y+T_fk/2)との差分をとるが(図5Bを参照のこと)、フリッカ位相π〜2πに相当するT_fk/2≦y<T_fkの領域では下式(10)により1つ前のサンプリング期間の半周期だけ後の波形Fn_1(y−T_fk/2)との差分をとる(図5Cを参照のこと)。差分処理Bは、フリッカ及び背景ともに同じとなる信号の差分をとることを回避することを目的とする。言い換えると背景が同じでちょうどフリッカ信号が逆相となる信号の差分をとることに相当する(後述)。   On the other hand, in the difference processing B, instead of simply taking the difference between the two waveforms Fn (y) and Fn_1 (y) in the order of the sampling phase, the difference is obtained by shifting the sampling phase by a half cycle of the flicker cycle. That is, in the difference process B, the calculation formula differs depending on the sampling phase of the line y, and in the region of 0 ≦ y <T_fk / 2 corresponding to the flicker phase 0 to π, the previous sampling period is obtained by the following formula (9). (See FIG. 5B), but in the region of T_fk / 2 ≦ y <T_fk corresponding to the flicker phase π to 2π, the following equation (10 ) To obtain a difference from the waveform Fn_1 (y-T_fk / 2) after a half cycle of the previous sampling period (see FIG. 5C). The difference process B is intended to avoid taking a difference between signals that are the same for both flicker and background. In other words, this is equivalent to taking the difference between the signals having the same background and the flicker signal having the opposite phase (described later).

Figure 2009017167
Figure 2009017167

Figure 2009017167
Figure 2009017167

このように差分をとるサンプリング位相の組み合わせを変えた状態で差分処理を行なう。なお、位相をずらすべき側は本質的には現サンプリング期間における積分値Fn(y)であっても構わないが、以下では上式(9)並びに(10)に示したように1つ前のサンプリング期間の積分値Fn_1(y)の位相をずらすものとして説明する。   Difference processing is performed in such a state that the combination of sampling phases for obtaining the difference is changed. The phase shift side may be essentially the integrated value Fn (y) in the current sampling period, but in the following, as shown in the above equations (9) and (10), A description will be given assuming that the phase of the integration value Fn_1 (y) in the sampling period is shifted.

なお、図3に示した各機能ブロックによる処理の少なくとも一部は、システム・コントローラ15におけるソフトウェア処理という形態でも実現することができる。また、図1に示した撮像装置では、画像信号を構成する輝度信号、色差信号毎に、図3に示した各機能ブロックによる処理が実行される。あるいは、少なくとも輝度信号について図3に示した各機能ブロックによる処理を実行し、必要に応じて色差信号や各色信号について実行するようにしてもよい。また、輝度信号については、輝度信号に合成する前の色信号の段階で図3に示した各機能ブロックによる処理を実行してもよい。また、この色信号の段階における処理では、原色による色信号、補色による色信号のいずれの段階で図3に示した各機能ブロックによる処理を実行してもよい。これらの色信号について図3に示した各機能ブロックによる処理を実行する場合には、色信号毎に当該処理が実行される。   Note that at least a part of the processing by each functional block shown in FIG. 3 can also be realized in the form of software processing in the system controller 15. Further, in the imaging apparatus shown in FIG. 1, processing by each functional block shown in FIG. 3 is executed for each luminance signal and color difference signal constituting the image signal. Alternatively, at least the luminance signal may be processed by each functional block shown in FIG. 3, and may be executed for the color difference signal and each color signal as necessary. Further, with respect to the luminance signal, processing by each functional block shown in FIG. 3 may be executed at the stage of the color signal before being combined with the luminance signal. Further, in the process at the stage of the color signal, the process by each functional block shown in FIG. 3 may be executed at any stage of the color signal by the primary color and the color signal by the complementary color. When these color signals are processed by the functional blocks shown in FIG. 3, the processing is executed for each color signal.

続いて、図3に示した検出・低減処理部22によって高速撮影時のフリッカ検出を行なう動作について説明する。以下では、周波数50Hz並びに60Hzそれぞれの商用交流電源による蛍光灯の照明下で240fps撮像を行なった場合の各例を挙げる。   Next, an operation for detecting flicker during high-speed shooting by the detection / reduction processing unit 22 shown in FIG. 3 will be described. Below, each example at the time of performing 240 fps imaging under the illumination of the fluorescent lamp by the commercial alternating current power supply of each frequency 50Hz and 60Hz is given.

まず、電源周波数50Hz地域における高速撮像モードの例として240fpsで撮像した場合のサンプリング動作について、図7及び図8を参照しながら説明する。   First, a sampling operation in the case of imaging at 240 fps as an example of a high-speed imaging mode in a power supply frequency 50 Hz region will be described with reference to FIGS.

図7には、高速撮像モード(240fps)でのサンプリング動作を説明するための第1のタイミングチャートを示している。図示の例では、フレームレートの高速化に伴って、イネーブル信号VEN1で示される垂直方向に対する画像信号の有効データ領域の長さも短くなっている。ここで、内部基準信号生成部21のカウンタ21aにおいて、イネーブル信号としてVEN1を選択し、このイネーブル信号VEN1がハイ・レベルとなる期間内に水平同期信号HDをカウントした場合について検討してみる。カウント値VCOUNTは、通常撮像モードのときと同様に、有効データ領域の期間毎にライン数Mまでのカウントアップが繰り返される。   FIG. 7 shows a first timing chart for explaining the sampling operation in the high-speed imaging mode (240 fps). In the illustrated example, as the frame rate increases, the length of the effective data area of the image signal in the vertical direction indicated by the enable signal VEN1 also decreases. Here, let us consider a case where the counter 21a of the internal reference signal generation unit 21 selects VEN1 as the enable signal and counts the horizontal synchronization signal HD within a period in which the enable signal VEN1 is at a high level. The count value VCOUNT is repeatedly counted up to the number M of lines for each period of the effective data area, as in the normal imaging mode.

しかしながら、図16Bに示したように、FPS>2×fなる関係が成立している場合には(但し、蛍光灯の電源周波数をfとし、フレームレートをFPSとする)、フリッカ1周期分より1フィールドの有効データ領域の期間の方が短くなってしまう。このため、カウント値VCOUNTは、フリッカ1周期に対応するT_fkまでカウントされる前にリセットされるので、フリッカ1周期分のサンプリング・タイミングを生成することができなくなる。すなわち、検出・低減処理部22の検波系ブロックは、画像信号をフリッカ1周期分毎に処理することができない。   However, as shown in FIG. 16B, when the relationship of FPS> 2 × f is established (however, the power supply frequency of the fluorescent lamp is set to f and the frame rate is set to FPS), from one cycle of flicker The period of the effective data area of one field becomes shorter. For this reason, the count value VCOUNT is reset before being counted up to T_fk corresponding to one flicker cycle, so that it is impossible to generate sampling timing for one flicker cycle. That is, the detection system block of the detection / reduction processing unit 22 cannot process the image signal every flicker period.

また、図8には、高速撮像モード(240fps)でのサンプリング動作を説明するための第2のタイミングチャートを示している。図示の例では、フレームレートに応じた有効データ領域を示すイネーブル信号VEN1の他に、60fpsの通常撮像モードでの有効データ領域を示すイネーブル信号VEN2を、基準信号生成部30からフリッカ低減部20に供給させる。そして、内部基準信号生成部21のカウンタ21aは、FPS>2×fが成立する高速撮像モードに設定されたときには、入力されるイネーブル信号としてVEN2を選択し、このイネーブル信号VEN2がハイ・レベルとなる期間に水平同期信号HDをカウントしてカウント値VCOUNTを出力する。   FIG. 8 shows a second timing chart for explaining the sampling operation in the high-speed imaging mode (240 fps). In the illustrated example, in addition to the enable signal VEN1 indicating the effective data area corresponding to the frame rate, the enable signal VEN2 indicating the effective data area in the normal imaging mode of 60 fps is sent from the reference signal generation unit 30 to the flicker reduction unit 20. Supply. When the counter 21a of the internal reference signal generation unit 21 is set to the high-speed imaging mode in which FPS> 2 × f is established, VEN2 is selected as the input enable signal, and the enable signal VEN2 is set to the high level. During this period, the horizontal synchronizing signal HD is counted and the count value VCOUNT is output.

したがって、検出・低減処理部22は、イネーブル信号VEN2がハイ・レベルとなるフリッカ1周期分以上の長さを持つサンプリング期間にわたってサンプリング動作を行なうので、図7で説明したような、フリッカ1周期分より1フィールドの有効データ領域の期間の方が短いために画像信号をフリッカ1周期分毎に処理することができないという問題点を解決することができる。   Therefore, the detection / reduction processing unit 22 performs the sampling operation over a sampling period having a length equal to or longer than one period of flicker in which the enable signal VEN2 becomes high level. Therefore, as described with reference to FIG. In addition, since the period of the effective data area of one field is shorter, the problem that the image signal cannot be processed every one flicker period can be solved.

図8に示した例では、イネーブル信号VEN2は、イネーブル信号VEN1を基準に、例えば同期タイミングをカウントするなどして生成されたものなどである。但し、イネーブル信号VEN2は、常に通常撮像モードでの同期信号を基に生成される、通常撮像モードでの有効データ領域を正確に示す信号であってもよい。言い換えれば、高速撮影モード下での有効データ領域を規定するイネーブル信号VEN2としては、あるフィールドでの有効データ領域の開始時を起点に、フリッカ1周期以上の期間だけハイ・レベルとなる信号であればよい。また、内部基準信号生成部21のカウンタ21aは、イネーブル信号を選択するのではなく、常時イネーブル信号VEN2を基にカウント値VCOUNTを生成する構成としてもよい。   In the example shown in FIG. 8, the enable signal VEN2 is generated by counting the synchronization timing, for example, based on the enable signal VEN1. However, the enable signal VEN2 may be a signal that is always generated based on the synchronization signal in the normal imaging mode and that accurately indicates the effective data area in the normal imaging mode. In other words, the enable signal VEN2 that defines the effective data area in the high-speed shooting mode may be a signal that becomes a high level only for a period of one flicker period or more from the start of the effective data area in a certain field. That's fine. In addition, the counter 21a of the internal reference signal generation unit 21 may be configured to generate the count value VCOUNT based on the always enable signal VEN2 instead of selecting the enable signal.

このようなイネーブル信号VEN2を利用することにより、カウント値VCOUNTの上限値はフリッカ1周期に対応するT_fk以上となる。そして、カウント値VCOUNTのカウントアップが開始されてから、そのカウント値がT_fkに達するまでの間、イネーブル信号DETECT_ENがハイ・レベルとなる。したがって、検出・低減処理部22では、このようなイネーブル信号DETECT_ENを用いることで、常に1周期分以上のフリッカ成分を含む画像信号を各検波系の機能ブロックで取り込んで、フリッカ成分の検出処理を行なうことが可能となる。   By using such an enable signal VEN2, the upper limit value of the count value VCOUNT becomes T_fk or more corresponding to one flicker cycle. The enable signal DETECT_EN becomes high level from when the count value VCOUNT starts to be counted up until the count value reaches T_fk. Therefore, the detection / reduction processing unit 22 uses such an enable signal DETECT_EN to always capture an image signal including a flicker component for one cycle or more in a functional block of each detection system, and perform a flicker component detection process. Can be performed.

但し、イネーブル信号DETECT_ENがハイ・レベルとなる期間には、画像データが無効となる垂直ブランキング期間が存在するため、この期間では画像信号のサンプリング値が不確定となる。このため、本実施形態では、サンプリング(積分)処理ブロックの最終段において、当該無効期間における画像信号をその前後の信号から補間して、1周期分のフリッカ成分が滑らかにつながるようにしている。この補間処理の詳細については後述に譲る。   However, during the period in which the enable signal DETECT_EN is at the high level, there is a vertical blanking period in which the image data is invalid, and thus the sampling value of the image signal is uncertain during this period. For this reason, in the present embodiment, in the final stage of the sampling (integration) processing block, the image signal in the invalid period is interpolated from the preceding and succeeding signals so that the flicker components for one cycle are smoothly connected. Details of this interpolation processing will be described later.

続いて、電源周波数60Hz地域における高速撮像モードの例として240fpsで撮像した場合のサンプリング動作について、図9及び図10を参照しながら説明する。   Next, a sampling operation in the case of imaging at 240 fps as an example of the high-speed imaging mode in the power supply frequency 60 Hz region will be described with reference to FIGS. 9 and 10.

図9には、高速撮像モード(240fps)でのサンプリング動作を説明するための第1のタイミングチャートを示している。図7に示したタイミングチャートと同様に、フレームレートの高速化に伴って、イネーブル信号VEN1で示される垂直方向に対する画像信号の有効データ領域の長さも短くなっている。ここで、内部基準信号生成部21のカウンタ21aにおいて、イネーブル信号としてVEN1を選択し、このイネーブル信号VEN1がハイ・レベルとなる期間内に水平同期信号HDをカウントした場合について検討してみる。カウント値VCOUNTは、通常撮像モードのときと同様に、有効データ領域の期間毎にライン数Mまでのカウントアップが繰り返される。   FIG. 9 shows a first timing chart for explaining the sampling operation in the high-speed imaging mode (240 fps). Similar to the timing chart shown in FIG. 7, as the frame rate increases, the length of the effective data area of the image signal in the vertical direction indicated by the enable signal VEN1 also decreases. Here, let us consider a case where the counter 21a of the internal reference signal generation unit 21 selects VEN1 as the enable signal and counts the horizontal synchronization signal HD within a period in which the enable signal VEN1 is at a high level. The count value VCOUNT is repeatedly counted up to the number M of lines for each period of the effective data area, as in the normal imaging mode.

しかしながら、図16Bに示したように、FPS>2×fなる関係が成立しているので、フリッカ1周期分より1フィールドの有効データ領域の期間の方が短くなってしまう。このため、カウント値VCOUNTは、フリッカ1周期に対応するT_fkまでカウントされる前にリセットされるので、フリッカ1周期分のサンプリング・タイミングを生成することができなくなる。すなわち、検出・低減処理部22の検波系ブロックは、画像信号をフリッカ1周期分毎に処理することができない(同上)。   However, as shown in FIG. 16B, since the relationship of FPS> 2 × f is established, the period of the effective data area of one field becomes shorter than one flicker period. For this reason, the count value VCOUNT is reset before being counted up to T_fk corresponding to one flicker cycle, so that it is impossible to generate sampling timing for one flicker cycle. That is, the detection system block of the detection / reduction processing unit 22 cannot process the image signal for each flicker cycle (same as above).

また、図10には、高速撮像モード(240fps)でのサンプリング動作を説明するための第2のタイミングチャートを示している。図示の例では、フレームレートに応じた有効データ領域を示すイネーブル信号VEN1の他に、60fpsの通常撮像モードでの有効データ領域を示すイネーブル信号VEN2を、基準信号生成部30からフリッカ低減部20に供給させる。そして、内部基準信号生成部21のカウンタ21aは、FPS>2×fが成立する高速撮像モードに設定されたときには、入力されるイネーブル信号としてVEN2を選択し、このイネーブル信号VEN2がハイ・レベルとなる期間に水平同期信号HDをカウントしてカウント値VCOUNTを出力する。   FIG. 10 shows a second timing chart for explaining the sampling operation in the high-speed imaging mode (240 fps). In the illustrated example, in addition to the enable signal VEN1 indicating the effective data area corresponding to the frame rate, the enable signal VEN2 indicating the effective data area in the normal imaging mode of 60 fps is sent from the reference signal generation unit 30 to the flicker reduction unit 20. Supply. When the counter 21a of the internal reference signal generation unit 21 is set to the high-speed imaging mode in which FPS> 2 × f is established, VEN2 is selected as the input enable signal, and the enable signal VEN2 is set to the high level. During this period, the horizontal synchronizing signal HD is counted and the count value VCOUNT is output.

したがって、検出・低減処理部22は、イネーブル信号VEN2がハイ・レベルとなるフリッカ1周期分以上の長さを持つサンプリング期間にわたってサンプリング動作を行なうので、図9で説明したような、フリッカ1周期分より1フィールドの有効データ領域の期間の方が短いために画像信号をフリッカ1周期分毎に処理することができないという問題点を解決することができる。   Accordingly, the detection / reduction processing unit 22 performs the sampling operation over a sampling period having a length equal to or longer than one period of flicker in which the enable signal VEN2 becomes high level. Therefore, as described in FIG. In addition, since the period of the effective data area of one field is shorter, the problem that the image signal cannot be processed every one flicker period can be solved.

図10に示した例では、イネーブル信号VEN2は、イネーブル信号VEN1を基準に、例えば同期タイミングをカウントするなどして生成されたものなどである。但し、イネーブル信号VEN2は、常に通常撮像モードでの同期信号を基に生成される、通常撮像モードでの有効データ領域を正確に示す信号であってもよい。言い換えれば、高速撮影モード下での有効データ領域を規定するイネーブル信号VEN2としては、あるフィールドでの有効データ領域の開始時を起点に、フリッカ1周期以上の期間だけハイ・レベルとなる信号であればよい。また、内部基準信号生成部21のカウンタ21aは、イネーブル信号を選択するのではなく、常時イネーブル信号VEN2を基にカウント値VCOUNTを生成する構成としてもよい(同上)。   In the example shown in FIG. 10, the enable signal VEN2 is generated by counting the synchronization timing, for example, based on the enable signal VEN1. However, the enable signal VEN2 may be a signal that is always generated based on the synchronization signal in the normal imaging mode and that accurately indicates the effective data area in the normal imaging mode. In other words, the enable signal VEN2 that defines the effective data area in the high-speed shooting mode may be a signal that becomes a high level only for a period of one flicker period or more from the start of the effective data area in a certain field. That's fine. The counter 21a of the internal reference signal generation unit 21 may be configured to generate the count value VCOUNT based on the enable signal VEN2 at all times, instead of selecting the enable signal (same as above).

このようなイネーブル信号VEN2を利用することにより、カウント値VCOUNTの上限値はフリッカ1周期に対応するT_fk以上となる。そして、カウント値VCOUNTのカウントアップが開始されてから、そのカウント値がT_fkに達するまでの間、イネーブル信号DETECT_ENがハイ・レベルとなる。したがって、検出・低減処理部22では、このようなイネーブル信号DETECT_ENを用いることで、常に1周期分以上のフリッカ成分を含む画像信号を各検波系の機能ブロックで取り込んで、フリッカ成分の検出処理を行なうことが可能となる(同上)。   By using such an enable signal VEN2, the upper limit value of the count value VCOUNT becomes T_fk or more corresponding to one flicker cycle. The enable signal DETECT_EN becomes high level from when the count value VCOUNT starts to be counted up until the count value reaches T_fk. Therefore, the detection / reduction processing unit 22 uses such an enable signal DETECT_EN to always capture an image signal including a flicker component for one cycle or more in a functional block of each detection system, and perform a flicker component detection process. (Same as above).

但し、イネーブル信号DETECT_ENがハイ・レベルとなる期間には、画像データが無効となる垂直ブランキング期間が存在するため、サンプリング(積分)処理ブロックの最終段において、当該無効期間における画像信号をその前後の信号から補間するようにしている(同上)。   However, since there is a vertical blanking period during which the image data is invalid during the period when the enable signal DETECT_EN is at the high level, the image signal in the invalid period is before and after that in the final stage of the sampling (integration) processing block. Is interpolated from the signal (same as above).

ところで、図8に示した電源周波数50Hz地域における高速撮影モード下でのサンプリング動作と、図10に示した電源周波数60Hz地域における高速撮影モード下でのサンプリング動作とを比較すると、60Hz地域におけるフリッカの場合、DETECT_EN期間にサンプリングされる波形は、垂直同期期間に対して毎回同じ位相になってしまう「固定フリッカ縞」であることが分かる。これはフレームレートとフリッカの1周期に相当する時間がちょうど整数倍の関係にあるためである。すなわち、フリッカに繰り返し性はあるもの、検波単位で考えると毎回同じ位相でフリッカが発生するため、正規化処理を行なう際にフィールド間の差分を取った時点で、背景とともにフリッカ縞の情報もなくなってしまう(前述)。   By the way, comparing the sampling operation under the high-speed shooting mode in the power supply frequency 50 Hz region shown in FIG. 8 with the sampling operation under the high-speed shooting mode in the power supply frequency 60 Hz region shown in FIG. In this case, the waveform sampled during the DETECT_EN period is a “fixed flicker fringe” that has the same phase every time in the vertical synchronization period. This is because the time corresponding to one cycle of the frame rate and flicker is exactly an integer multiple. In other words, although flicker has repeatability, flicker occurs at the same phase every time when considered in terms of detection units, so when the difference between fields is taken during normalization processing, there is no flicker fringe information along with the background. (See above).

具体的には、上式(5)に従って平均化処理Aを行なうと、フリッカ及び背景ともに同じ信号となる3つの波形Fn(y)、Fn_1(y)、及びFn_2(y)を加算平均するので、目的とする背景成分を抽出することができない。また、上式(8)に従って差分処理Aを行なうと、フリッカ及び背景ともに同じ信号となる2つの波形Fn(y)及びFn_1(y)の差分をとるので、目的とするフリッカ成分の抽出(若しくは背景成分の除去)を行なうことができない。すなわち、フリッカ現象の繰り返し性を使って背景とフリッカ縞の区別を行なうアルゴリズムに対し、垂直同期とフリッカ縞が同期してしまうような上記条件では、たとえ繰り返し性があっても背景と区別することができず、所望の検出動作を行なうことができない。   Specifically, when the averaging process A is performed according to the above equation (5), the three waveforms Fn (y), Fn_1 (y), and Fn_2 (y) that are the same signal in the flicker and the background are averaged. The target background component cannot be extracted. Further, when the difference processing A is performed according to the above equation (8), the difference between the two waveforms Fn (y) and Fn_1 (y) having the same signal in both the flicker and the background is obtained. (Removal of background component) cannot be performed. In other words, the algorithm that distinguishes the background from the flicker fringe using the repeatability of the flicker phenomenon is distinguished from the background even if there is repeatability under the above conditions where the vertical synchronization and the flicker fringe are synchronized. The desired detection operation cannot be performed.

そこで、本実施形態では、フレームレートとフリッカの1周期に相当する時間がちょうど整数倍の関係にあり、垂直同期とフリッカ縞が同期してしまう撮影条件下では、平均値演算部113では平均化処理Bを実施するとともに、差分演算部114では差分処理Bを実施するようにする。   Therefore, in this embodiment, the time corresponding to one cycle of the frame rate and flicker is exactly an integer multiple, and the average value calculation unit 113 performs averaging under shooting conditions in which vertical synchronization and flicker fringe are synchronized. While performing the process B, the difference calculation unit 114 performs the difference process B.

図4を参照しながら既に説明したように、平均化処理Bでは、フリッカ及び背景ともに同じとなる信号の加重平均をとることを回避している。ラインyのサンプリング位相に応じて計算式が異なり、フリッカ位相0〜πに相当する0≦y<T_fk/2の領域では下式(11)によって1つ前のサンプリング期間の半周期だけ先の波形Fn_1(y+T_fk/2)との平均化を行なうが(図5Bを参照のこと)、フリッカ位相π〜2πに相当するT_fk/2≦y<T_fkの領域では下式(12)により1つ前のサンプリング期間の半周期だけ後の波形Fn_1(y−T_fk/2)との平均化を行なう(図5Cを参照のこと)。   As already described with reference to FIG. 4, the averaging process B avoids taking a weighted average of signals that are the same in both flicker and background. The calculation formula differs depending on the sampling phase of the line y, and in the region of 0 ≦ y <T_fk / 2 corresponding to the flicker phase 0 to π, the following waveform (11) indicates the waveform ahead by the half cycle of the previous sampling period. Fn_1 (y + T_fk / 2) is averaged (see FIG. 5B), but in the region of T_fk / 2 ≦ y <T_fk corresponding to the flicker phase π to 2π, the following equation (12) Averaging with the waveform Fn_1 (y-T_fk / 2) after a half cycle of the sampling period is performed (see FIG. 5C).

Figure 2009017167
Figure 2009017167

Figure 2009017167
Figure 2009017167

また、図6を参照しながら既に説明したように、差分処理Bでは、位相をフリッカ周期の半周期分ずらして差分をとることで、フリッカ及び背景ともに同じとなる信号の差分をとることを回避している。ラインyのサンプリング位相に応じて計算式が異なり、フリッカ位相0〜πに相当する0≦y<T_fk/2の領域では下式(13)によって1つ前のサンプリング期間の半周期だけ先の波形Fn_1(y+T_fk/2)との差分をとるが(図5Bを参照のこと)、フリッカ位相π〜2πに相当するT_fk/2≦y<T_fkの領域では下式(14)により1つ前のサンプリング期間の半周期だけ後の波形Fn_1(y−T_fk/2)との差分をとる(図5Cを参照のこと)。   Further, as already described with reference to FIG. 6, in the difference processing B, the difference is obtained by shifting the phase by a half cycle of the flicker cycle, thereby taking the difference between the signals that are the same in both the flicker and the background. is doing. The calculation formula differs depending on the sampling phase of the line y, and in the region of 0 ≦ y <T_fk / 2 corresponding to the flicker phase 0 to π, the following waveform (13) indicates the waveform ahead by the half cycle of the previous sampling period. The difference from Fn_1 (y + T_fk / 2) is obtained (see FIG. 5B), but in the region of T_fk / 2 ≦ y <T_fk corresponding to the flicker phase π to 2π, the previous sampling is performed by the following equation (14). The difference from the waveform Fn_1 (y-T_fk / 2) after a half period is taken (see FIG. 5C).

Figure 2009017167
Figure 2009017167

Figure 2009017167
Figure 2009017167

図11には、電源周波数60Hz地域における高速撮像モード(240fps)で平均化処理B及び差分処理Bを行なうことで得られる検出波形の様子を示している。但し、フリッカ波形のサンプリング動作は図10に示したタイミングチャートと同様である。また、説明の便宜上、図11では垂直ブランキング期間を省略して描いている。   FIG. 11 shows a state of a detection waveform obtained by performing the averaging process B and the difference process B in the high-speed imaging mode (240 fps) in the power supply frequency 60 Hz region. However, the sampling operation of the flicker waveform is the same as the timing chart shown in FIG. For convenience of explanation, the vertical blanking period is omitted in FIG.

平均化処理Bでは、フリッカ位相0〜πに相当する0≦y<T_fk/2の領域では下式(15)によって1つ前のサンプリング期間の半周期だけ先の波形Fn_1(y+T_fk/2)との加重平均を行ない、フリッカ位相π〜2πに相当するT_fk/2≦y<T_fkの領域では下式(16)により1つ前のサンプリング期間の半周期だけ後の波形Fn_1(y−T_fk/2)との加重平均を行なう。   In the averaging process B, in the region of 0 ≦ y <T_fk / 2 corresponding to the flicker phase 0 to π, the waveform Fn_1 (y + T_fk / 2) which is the half cycle of the previous sampling period is obtained by the following equation (15). In the region of T_fk / 2 ≦ y <T_fk corresponding to the flicker phase π to 2π, the waveform Fn_1 (y−T_fk / 2) after the half cycle of the previous sampling period is obtained by the following equation (16). ) And the weighted average.

Figure 2009017167
Figure 2009017167

Figure 2009017167
Figure 2009017167

したがって、平均化処理Bでは、フリッカ位相の0〜πに相当する部分は図11中の「(C)+(B)」になり、フリッカ位相のπ〜2πに相当する部分は図11中の「(D)+(A)」となる。   Therefore, in the averaging process B, the portion corresponding to 0 to π of the flicker phase becomes “(C) + (B)” in FIG. 11, and the portion corresponding to π to 2π of the flicker phase is shown in FIG. “(D) + (A)”.

また、差分処理Bでは、フリッカ位相0〜πに相当する0≦y<T_fk/2の領域では下式(17)によって1つ前のサンプリング期間の半周期だけ先の波形Fn_1(y+T_fk/2)との差分をとり、フリッカ位相π〜2πに相当するT_fk/2≦y<T_fkの領域では下式(18)により1つ前のサンプリング期間の半周期だけ後の波形Fn_1(y−T_fk/2)との差分をとる。   Further, in the difference processing B, in the region of 0 ≦ y <T_fk / 2 corresponding to the flicker phase 0 to π, the waveform Fn_1 (y + T_fk / 2) ahead by the half cycle of the previous sampling period by the following equation (17). In the region of T_fk / 2 ≦ y <T_fk corresponding to the flicker phase π to 2π, the waveform Fn_1 (y−T_fk / 2) after the half cycle of the previous sampling period is obtained by the following equation (18). ) And the difference.

Figure 2009017167
Figure 2009017167

Figure 2009017167
Figure 2009017167

したがって、差分処理Bでは、フリッカ位相の0〜πに相当する部分は図11中の「(C)−(B)」になり、フリッカ位相のπ〜2πに相当する部分は図11中の「(D)−(A)」となる。   Therefore, in the difference processing B, the portion corresponding to 0 to π of the flicker phase is “(C) − (B)” in FIG. 11, and the portion corresponding to π to 2π of the flicker phase is “ (D)-(A) ".

図11から分かるように、(A)と(D)、及び(B)と(C)の組み合わせは、背景が同じでフリッカ位相が逆方向となる。したがって、(A)と(D)、及び(B)と(C)の組み合わせで平均化及び差分の演算を行なうと、フレームレートとフリッカの1周期に相当する時間がちょうど整数倍の関係にあるため固定フリッカが発生する撮影条件下でも、入力された画像信号から背景成分及びフリッカ成分のみを抽出することができるようになる。   As can be seen from FIG. 11, the combinations of (A) and (D) and (B) and (C) have the same background and the reverse flicker phase. Therefore, when averaging and difference calculation are performed with a combination of (A) and (D), and (B) and (C), the time corresponding to one cycle of the frame rate and flicker is exactly an integral multiple. Therefore, only the background component and the flicker component can be extracted from the input image signal even under shooting conditions in which fixed flicker occurs.

図11では、説明の便宜上、背景がフラットな例について示している。実際には背景が映りこむため、図11のようなフラットな背景成分及び綺麗なフリッカ波形とはならないが、後段の正規化処理及びDFT処理によって高精度なフリッカ検出、及びフリッカ補正を実現することができることを理解されたい。また、図11からも分かるように、差分処理Bにより得られるフリッカ成分は振幅が2倍になってしまうので、補正係数を算出する際にはその分を考慮した形で補正係数を求める点に注意が必要である。   FIG. 11 shows an example in which the background is flat for convenience of explanation. Since the background is actually reflected, the flat background component and the beautiful flicker waveform as shown in FIG. 11 are not obtained, but high-precision flicker detection and flicker correction are realized by the subsequent normalization processing and DFT processing. Please understand that you can. In addition, as can be seen from FIG. 11, the flicker component obtained by the difference processing B has an amplitude that is doubled. Therefore, when calculating the correction coefficient, the correction coefficient is calculated in consideration of that amount. Caution must be taken.

上述したように、本実施形態によれば、フレームレートとフリッカの1周期に相当する時間がちょうど整数倍の関係にあるため固定フリッカが発生する撮影条件下でも、平均化演算及び差分演算を適切に実施することができる。それ以降の正規化処理、DFT処理、フリッカ生成処理、フリッカ補正処理の詳細については、例えば本出願人に既に譲渡されている特開2004−222228号公報(特許文献1)の段落0092〜0111を参照されたい。   As described above, according to the present embodiment, since the time corresponding to one cycle of the frame rate and flicker is exactly an integer multiple, averaging and difference calculations are appropriately performed even under shooting conditions in which fixed flicker occurs. Can be implemented. For details of normalization processing, DFT processing, flicker generation processing, and flicker correction processing thereafter, refer to paragraphs 0092 to 0111 of JP-A-2004-222228 (Patent Document 1) already assigned to the present applicant, for example. Please refer.

なお、あらかじめ50Hz地域と60Hz地域のいずれかが分かっている状態で高速撮像モードに入れた場合には、平均化処理AとBあるいは差分処理AとBのどちらを使えばよいかは上記の通りである。また、どちらの電源周波数であるのかが分からない状態においても、例えば高速撮像に入れた後に、以下の手順を踏めば自動的に適切な補正をかけることもできる。   In addition, when the high-speed imaging mode is entered in a state where either the 50 Hz region or the 60 Hz region is known in advance, which of the averaging processing A and B or the difference processing A and B should be used is as described above. It is. Even in a state where the power supply frequency is unknown, for example, after entering high-speed imaging, appropriate correction can be automatically applied by following the procedure below.

(1)まず、平均化処理A、差分処理Aという設定でフリッカ検出を行なう。被写体の撮影を行なっている場所が50Hz地域であれば、この設定でフリッカ成分を検出することが可能である。
(2)この時点で、フリッカ成分に相当するDFTスペクトルが定常的に発生しないときには、60Hz地域のフリッカあるいはフリッカ非発生状態のいずれかであることが推定される。そこで、平均化処理B及び差分処理Bという設定に切り替え、60Hz地域であればフリッカ成分を検出可能な装置状態にする。
(3)この時点で、フリッカ成分に相当するDFTスペクトルが定常的に発生しないときには、フリッカ非発生状態であることが断定的となる。したがって、フリッカ検出値が出力されず、その結果として入力画像信号に対し不要な補正がかかることもない。
(1) First, flicker detection is performed with settings of averaging process A and difference process A. If the place where the subject is photographed is a 50 Hz region, the flicker component can be detected with this setting.
(2) At this time, when the DFT spectrum corresponding to the flicker component does not constantly occur, it is estimated that the flicker is in the 60 Hz region or the flicker is not generated. Therefore, the setting is switched to the setting of the averaging process B and the difference process B, and the apparatus is set in a state where the flicker component can be detected in the 60 Hz region.
(3) At this time, when the DFT spectrum corresponding to the flicker component does not constantly occur, it is determined that the flicker is not generated. Therefore, the flicker detection value is not output, and as a result, unnecessary correction is not applied to the input image signal.

図2に示したカメラ処理回路14構成の場合、図10に示したタイミングチャートからも分かるように、60fpsの通常撮像モードでの有効データ領域を示すイネーブル信号VEN2を使ってサンプリング期間を規定するDETECT_ENを発生させている。このような場合、DETECT_ENの発生間隔はVEN2の発生間隔である1/60秒間隔に制限されてしまうが、60Hz地域で発生するフリッカの場合はDETECT_ENを1/60秒間隔にする必要は無い。何故なら、図10あるいは図11を見て分かるように、1/120秒間隔で全く同じフリッカ位相になるからであり、わざわざ1/60秒間隔でサンプリング処理を行わなくても、1/120秒間隔で同等の処理を行なうようにしてもよい。   In the case of the configuration of the camera processing circuit 14 shown in FIG. 2, as can be seen from the timing chart shown in FIG. 10, DETECT_EN that defines the sampling period using the enable signal VEN <b> 2 indicating the effective data area in the normal imaging mode of 60 fps. Is generated. In such a case, the generation interval of DETECT_EN is limited to 1/60 second interval which is the generation interval of VEN2, but in the case of flicker occurring in the 60 Hz region, it is not necessary to set DETECT_EN to 1/60 second interval. This is because, as can be seen from FIG. 10 or FIG. 11, the same flicker phase is obtained at 1/120 second intervals, and even if sampling processing is not performed at 1/60 second intervals, it is 1/120 seconds. Equivalent processing may be performed at intervals.

図12には、カメラ処理回路14の変形例を示している。図示のカメラ処理回路14では、VEN1並びにVEN2に加えて基準信号生成部30よりVEN3(VEN2のちょうど半分に相当する時間だけハイ・レベルになるになるような信号)をカウンタ21aに供給する。内部基準信号生成部21のカウンタ21aは、FPS>2×fが成立する高速撮像モードに設定された場合に、入力されるイネーブル信号としてVEN2の代わりにVEN3を選択し、このイネーブル信号VEN3がハイ・レベルの期間に水平同期信号HDをカウントしてカウント値VCOUNTを出力するようになっている。   FIG. 12 shows a modification of the camera processing circuit 14. In the illustrated camera processing circuit 14, in addition to VEN1 and VEN2, the reference signal generation unit 30 supplies VEN3 (a signal that becomes high level for a time corresponding to exactly half of VEN2) to the counter 21a. The counter 21a of the internal reference signal generation unit 21 selects VEN3 instead of VEN2 as an input enable signal when the high-speed imaging mode in which FPS> 2 × f is established, and the enable signal VEN3 is high. The horizontal synchronization signal HD is counted during the level period and the count value VCOUNT is output.

また、図13には、図12に示したカメラ処理回路14を用いた場合において、電源周波数60Hz地域における高速撮像モード(240fps)でのサンプリング動作を示している。図示の例では、VEN2のちょうど半分に相当する時間だけハイ・レベルになるになるVEN3を、基準信号生成部30からフリッカ低減部20に供給させる。そして、内部基準信号生成部21のカウンタ21aは、FPS>2×fが成立する高速撮像モードに設定されたときには、入力されるイネーブル信号としてVEN3を選択し、このイネーブル信号VEN3がハイ・レベルとなる期間に水平同期信号HDをカウントしてカウント値VCOUNTを出力する。この場合、検出・低減処理部22は、イネーブル信号VEN3がハイ・レベルとなるフリッカ1周期分以上の長さを持つサンプリング期間にわたってサンプリング動作を行なうことができる。   FIG. 13 shows a sampling operation in the high-speed imaging mode (240 fps) in the region where the power supply frequency is 60 Hz when the camera processing circuit 14 shown in FIG. 12 is used. In the example shown in the figure, VEN3 that becomes high level for a time corresponding to exactly half of VEN2 is supplied from the reference signal generation unit 30 to the flicker reduction unit 20. When the counter 21a of the internal reference signal generation unit 21 is set to the high-speed imaging mode in which FPS> 2 × f is established, VEN3 is selected as the input enable signal, and the enable signal VEN3 is set to the high level. During this period, the horizontal synchronizing signal HD is counted and the count value VCOUNT is output. In this case, the detection / reduction processing unit 22 can perform the sampling operation over a sampling period having a length equal to or longer than one cycle of flicker in which the enable signal VEN3 becomes high level.

図10に示したタイミングチャートでは1周期だけ隔たったフリッカ波形同士での平均化・差分の演算となる。これに対し、図13に示したタイミングチャートでは、直近のフリッカ波形同士での平均化・差分の演算となることから、検出精度が高まる(背景動きにも強くなる方向)。   In the timing chart shown in FIG. 10, the averaging / difference calculation is performed between flicker waveforms separated by one period. On the other hand, in the timing chart shown in FIG. 13, since the calculation is performed for averaging / difference between the latest flicker waveforms, the detection accuracy is increased (in the direction of being stronger against the background motion).

また、図10並びに図13に示した実施形態ではいずれも、60Hz地域で240fpsにより撮影するようになっているが、本発明の要旨は、高速撮影時に限定されるものではない。   Further, in both of the embodiments shown in FIGS. 10 and 13, shooting is performed at 240 fps in a 60 Hz region, but the gist of the present invention is not limited to high-speed shooting.

例えば、60Hz地域において60fpsの撮影を行なうなど通常撮影においても、フリッカ波形は検波枠単位で見たときに、各検波枠単位のフリッカ縞が同期に対して全く同じ位置となる固定フリッカ縞が発生するため、サンプリング期間毎の積分値をサンプリング位相の順に単純に差分をとって正規化処理を行なうと、フィールド間の差分を取った時点で背景と共にフリッカ縞の情報もなくなってしまうことになる。すなわち繰り返し性を使って背景とフリッカ縞の区別を行うアルゴリズムに対し、垂直同期とフリッカ縞が同期してしまう条件では、たとえフリッカ波形に繰り返し性があっても背景と区別することができない。   For example, even in normal shooting such as shooting at 60 fps in a 60 Hz region, when the flicker waveform is viewed in units of detection frames, fixed flicker fringes in which the flicker patterns in each detection frame unit are exactly the same position with respect to synchronization are generated. For this reason, if the normalization process is performed by simply taking the difference between the integration values for each sampling period in the order of the sampling phase, the flicker fringe information is lost together with the background when the difference between the fields is obtained. In other words, when the vertical synchronization and the flicker fringe are synchronized with the algorithm that distinguishes the background from the flicker fringe using the repeatability, even if the flicker waveform is repeatable, it cannot be distinguished from the background.

これに対し、本発明では、通常撮影時において垂直同期とフリッカ縞が同期してしまう条件下でも同様に、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして加算平均化及び差分を演算することによって、ゲイン補正方式による高精度なフリッカ検出及び補正処理を実現することができる。   On the other hand, in the present invention, the sampling phase of one of the integral values in two consecutive sampling periods is similarly shifted by a half period of the flicker period even under the condition that the vertical synchronization and the flicker fringe are synchronized during normal shooting. Thus, by calculating the averaging and the difference, it is possible to realize high-precision flicker detection and correction processing by the gain correction method.

図14には、電源周波数60Hz地域における通常撮像モード(60fps)でのサンプリング動作例を示している。但し、同図に示すサンプリング動作は、均一被写体に対して適用することはできるが、自然画に対しては適用が困難である(異なる背景部分で演算することになってしまうことが直接の原因である)。   FIG. 14 shows an example of the sampling operation in the normal imaging mode (60 fps) in the region where the power frequency is 60 Hz. However, although the sampling operation shown in the figure can be applied to a uniform subject, it is difficult to apply to a natural image (the direct cause is that the calculation is performed with different background parts). Is).

図示の例では、フレームレートに応じた有効データ領域を示すイネーブル信号VEN1の他に、60fpsの通常撮像モードでの有効データ領域を示すイネーブル信号VEN2を、基準信号生成部30からフリッカ低減部20に供給させる。内部基準信号生成部21のカウンタ21aは、FPS>2×fが成立しない通常撮影モードに設定されているときには、入力されるイネーブル信号としてVEN1を選択し、このイネーブル信号VEN1がハイ・レベルとなる期間に水平同期信号HDをカウントしてカウント値VCOUNTを出力する。そして、検出・低減処理部22は、DETECT_ENがハイ・レベルとなるサンプリング期間にわたってフリッカ1周期分のサンプリング動作を行なうことができる。   In the illustrated example, in addition to the enable signal VEN1 indicating the effective data area corresponding to the frame rate, the enable signal VEN2 indicating the effective data area in the normal imaging mode of 60 fps is sent from the reference signal generation unit 30 to the flicker reduction unit 20. Supply. The counter 21a of the internal reference signal generation unit 21 selects VEN1 as an input enable signal when the normal photographing mode in which FPS> 2 × f is not established, and the enable signal VEN1 becomes a high level. The horizontal synchronization signal HD is counted during the period, and the count value VCOUNT is output. Then, the detection / reduction processing unit 22 can perform a sampling operation for one cycle of flicker over a sampling period in which DETECT_EN is at a high level.

ここで、図14中のフリッカ波形Fn(y)、及びFn_1(y)を見れば、図10に示したフリッカ波形Fn(y)及びFn_1(y)の関係と全く同じであることが分かる。つまり、固定フリッカ発生条件において、加算平均化処理及び差分処理において背景とフリッカの分離ができないという問題に対し、サンプリング位相をフリッカ周期の半周期分ずらして加算平均化及び差分を演算する方法を適用することによって、画像信号を背景とフリッカに分離することが可能となる。したがって、正規化後の積分値又は差分値から抽出されるスペクトルを基にフリッカ成分を推定する方法(特許文献1を参照のこと)によって、高精度なフリッカ検出・補正が使えるようになる。   Here, it can be seen from the flicker waveforms Fn (y) and Fn_1 (y) in FIG. 14 that the relationship between the flicker waveforms Fn (y) and Fn_1 (y) shown in FIG. 10 is exactly the same. In other words, for the problem that the background and flicker cannot be separated in addition averaging and difference processing under fixed flicker generation conditions, a method of calculating addition averaging and difference by shifting the sampling phase by half a flicker cycle is applied. By doing so, it is possible to separate the image signal into the background and the flicker. Therefore, high-precision flicker detection / correction can be used by a method of estimating the flicker component based on the spectrum extracted from the normalized integral value or difference value (see Patent Document 1).

なお、図14に示した実施形態においても、図10に示した実施形態と同様に、あらかじめ50Hz地域と60Hz地域のいずれかが分かっている状態で高速撮像モードに入れた場合には、平均化処理AとBあるいは差分処理AとBのどちらを使えばよいかは上記の通りである。また、どちらの電源周波数であるのかが分からない状態においても、例えば高速撮像に入れた後に、以下の手順を踏めば自動的に適切な補正をかけることもできる。   In the embodiment shown in FIG. 14 as well, as in the embodiment shown in FIG. 10, when the high-speed imaging mode is entered in a state where either 50 Hz region or 60 Hz region is known in advance, averaging is performed. Which of the processes A and B or the difference processes A and B should be used is as described above. Even in a state where the power supply frequency is unknown, for example, after entering high-speed imaging, appropriate correction can be automatically applied by following the procedure below.

(1)まず、平均化処理A、差分処理Aという設定でフリッカ検出を行なう。被写体の撮影を行なっている場所が50Hz地域であれば、この設定でフリッカ成分を検出することが可能である。
(2)この時点で、フリッカ成分に相当するDFTスペクトルが定常的に発生しないときには、60Hz地域のフリッカあるいはフリッカ非発生状態のいずれかであることが推定される。そこで、平均化処理B及び差分処理Bという設定に切り替え、60Hz地域であればフリッカ成分を検出可能な装置状態にする。
(3)この時点で、フリッカ成分に相当するDFTスペクトルが定常的に発生しないときには、フリッカ非発生状態であることが断定的となる。したがって、フリッカ検出値が出力されず、その結果として入力画像信号に対し不要な補正がかかることもない。
(1) First, flicker detection is performed with settings of averaging process A and difference process A. If the place where the subject is photographed is a 50 Hz region, the flicker component can be detected with this setting.
(2) At this time, when the DFT spectrum corresponding to the flicker component does not constantly occur, it is estimated that the flicker is in the 60 Hz region or the flicker is not generated. Therefore, the setting is switched to the setting of the averaging process B and the difference process B, and the apparatus is set in a state where the flicker component can be detected in the 60 Hz region.
(3) At this time, when the DFT spectrum corresponding to the flicker component does not constantly occur, it is determined that the flicker is not generated. Therefore, the flicker detection value is not output, and as a result, unnecessary correction is not applied to the input image signal.

以上、特定の実施形態を参照しながら、本発明について詳解してきた。しかしながら、本発明の要旨を逸脱しない範囲で当業者が該実施形態の修正や代用を成し得ることは自明である。   The present invention has been described in detail above with reference to specific embodiments. However, it is obvious that those skilled in the art can make modifications and substitutions of the embodiment without departing from the gist of the present invention.

本明細書では、デジタルカメラに適用した実施形態を中心に説明してきたが、本発明の要旨はこれに限定されるものではない。例えば、携帯電話機やPDA(Personal Digital Assistant)、あるいはその他のカメラ機能を備えたさまざまな情報機器に対して本発明を同様に適用することができる。   In the present specification, the embodiment applied to the digital camera has been mainly described, but the gist of the present invention is not limited to this. For example, the present invention can be similarly applied to various information devices having a mobile phone, a PDA (Personal Digital Assistant), or other camera functions.

要するに、例示という形態で本発明を開示してきたのであり、本明細書の記載内容を限定的に解釈するべきではない。本発明の要旨を判断するためには、特許請求の範囲を参酌すべきである。   In short, the present invention has been disclosed in the form of exemplification, and the description of the present specification should not be interpreted in a limited manner. In order to determine the gist of the present invention, the claims should be taken into consideration.

図1は、本発明を適用するのに適した撮像装置の構成を模式的に示した図である。FIG. 1 is a diagram schematically showing a configuration of an imaging apparatus suitable for applying the present invention. 図2は、カメラ処理回路14の内部構成を示した図である。FIG. 2 is a diagram showing an internal configuration of the camera processing circuit 14. 図3は、検出・低減処理部20の内部構成を示した図である。FIG. 3 is a diagram showing an internal configuration of the detection / reduction processing unit 20. 図4は、平均値演算部113の内部構成を示した図である。FIG. 4 is a diagram showing an internal configuration of the average value calculation unit 113. 図5Aは、平均化処理並びに差分処理の仕組みを説明するための図である。FIG. 5A is a diagram for explaining the mechanism of the averaging process and the difference process. 図5Bは、平均化処理並びに差分処理の仕組みを説明するための図である。FIG. 5B is a diagram for explaining the mechanism of the averaging process and the difference process. 図5Cは、平均化処理並びに差分処理の仕組みを説明するための図である。FIG. 5C is a diagram for explaining the mechanism of the averaging process and the difference process. 図6は、差分演算部114の内部構成を示した図である。FIG. 6 is a diagram illustrating an internal configuration of the difference calculation unit 114. 図7は、電源周波数50Hz地域における高速撮像モード(240fps)でのサンプリング動作を説明するための第1のタイミングチャートを示した図である。FIG. 7 is a diagram showing a first timing chart for explaining the sampling operation in the high-speed imaging mode (240 fps) in the region where the power frequency is 50 Hz. 図8は、電源周波数50Hz地域における高速撮像モード(240fps)でのサンプリング動作を説明するための第2のタイミングチャートを示した図である。FIG. 8 is a diagram showing a second timing chart for explaining the sampling operation in the high-speed imaging mode (240 fps) in the region where the power supply frequency is 50 Hz. 図9は、電源周波数60Hz地域における高速撮像モード(240fps)でのサンプリング動作を説明するための第1のタイミングチャートを示した図である。FIG. 9 is a diagram showing a first timing chart for explaining the sampling operation in the high-speed imaging mode (240 fps) in the power supply frequency 60 Hz region. 図10は、電源周波数60Hz地域における高速撮像モード(240fps)でのサンプリング動作を説明するための第2のタイミングチャートを示した図である。FIG. 10 is a diagram showing a second timing chart for explaining the sampling operation in the high-speed imaging mode (240 fps) in the power supply frequency 60 Hz region. 図11は、電源周波数60Hz地域における高速撮像モード(240fps)で平均化処理B及び差分処理Bを行なうことで得られる検出波形の様子を示した図である。FIG. 11 is a diagram illustrating a state of a detection waveform obtained by performing the averaging process B and the difference process B in the high-speed imaging mode (240 fps) in the power supply frequency 60 Hz region. 図12は、カメラ処理回路14の変形例を示した図である。FIG. 12 is a diagram showing a modification of the camera processing circuit 14. 図13は、図12に示したカメラ処理回路14を用いた場合に、電源周波数60Hz地域における高速撮像モード(240fps)でのサンプリング動作を説明するためのタイミングチャートを示した図である。FIG. 13 is a diagram showing a timing chart for explaining the sampling operation in the high-speed imaging mode (240 fps) in the region where the power supply frequency is 60 Hz when the camera processing circuit 14 shown in FIG. 12 is used. 図14は、電源周波数60Hz地域における通常撮像モード(60fps)でのサンプリング動作を説明するための図である。FIG. 14 is a diagram for explaining the sampling operation in the normal imaging mode (60 fps) in the region where the power frequency is 60 Hz. 図15は、XYアドレス走査型の撮像素子を持つカメラにより蛍光灯照明下で撮影したときのフリッカ・レベルとシャッタ速度との関係についてのコンピュータ・シミュレーション結果を示した図である。FIG. 15 is a diagram showing a computer simulation result regarding the relationship between the flicker level and the shutter speed when a camera having an XY address scanning type image pickup device is used for photographing under fluorescent lamp illumination. 図16Aは、NTSC方式のフレームレートである60fpsの垂直同期信号VDとフリッカ波形との関係を示した図である。FIG. 16A is a diagram showing the relationship between the vertical synchronization signal VD of 60 fps, which is the NTSC frame rate, and the flicker waveform. 図16Bは、高速撮影の例として標準の4倍のフレームレートである240fpsで撮像を行なったときの垂直同期信号とフリッカ波形との関係を示した図である。FIG. 16B is a diagram illustrating a relationship between a vertical synchronization signal and a flicker waveform when imaging is performed at 240 fps, which is a frame rate four times higher than a standard, as an example of high-speed imaging. 図17Aは、NTSC方式のフレームレートである60fpsの垂直同期信号VDとフリッカ波形との関係を示した図である。FIG. 17A is a diagram showing the relationship between the vertical synchronization signal VD of 60 fps, which is the NTSC frame rate, and the flicker waveform. 図17Bは、高速撮影の例として標準の4倍のフレームレートである240fpsで撮像を行なったときの垂直同期信号とフリッカ波形との関係を示した図である。FIG. 17B is a diagram illustrating a relationship between a vertical synchronization signal and a flicker waveform when imaging is performed at 240 fps, which is a frame rate four times the standard as an example of high-speed imaging.

符号の説明Explanation of symbols

11…光学ブロック
11a…ドライバ
12…CMOS型イメージ・センサ
12a…タイミング・ジェネレータ
13…アナログ・フロント・エンド(AFE)回路
14…カメラ処理回路
15…システム・コントローラ
16…入力部
17…グラフィックI/F(インターフェース)
17a…ディスプレイ
20…フリッカ低減部
21…内部基準信号生成部
21a…カウンタ
22…検出・低減処理部
110…正規化積分値算出部
111…積分処理部
112…積分値保持部
113…平均値演算部
114…差分演算部
115…正規化処理部
120…DFT処理部
130…フリッカ生成部
140…バッファ
150…演算部
DESCRIPTION OF SYMBOLS 11 ... Optical block 11a ... Driver 12 ... CMOS type image sensor 12a ... Timing generator 13 ... Analog front end (AFE) circuit 14 ... Camera processing circuit 15 ... System controller 16 ... Input part 17 ... Graphic I / F (interface)
17a ... Display 20 ... Flicker reduction unit 21 ... Internal reference signal generation unit 21a ... Counter 22 ... Detection / reduction processing unit 110 ... Normalized integration value calculation unit 111 ... Integration processing unit 112 ... Integration value holding unit 113 ... Average value calculation unit 114: Difference calculation unit 115 ... Normalization processing unit 120 ... DFT processing unit 130 ... Flicker generation unit 140 ... Buffer 150 ... Calculation unit

Claims (13)

フリッカ成分を含んだ画像信号を処理する画像処理装置であって、
フリッカ1周期分以上の長さを持つサンプリング期間にわたってライン毎に画像信号を積分する積分処理部と、
過去のサンプリング期間における前記積分処理部による積分値を保持する積分値保持部と、
連続する2以上のサンプリング期間における積分値を平均化する平均値演算部と、
前記の連続する2以上のサンプリング期間における積分値の差分をとる差分演算部と、
前記平均値演算部で得られた平均値を用いて、前記差分演算部により算出された差分値を正規化する正規化演算部と、
前記の正規化された積分値の差分値を周波数解析する周波数解析手段と、
前記周波数解析手段による周波数解析した結果に基づいて画像信号に含まれるフリッカ成分を検出するフリッカ検出手段と、
前記フリッカ検出手段により検出されたフリッカ成分を画像信号から除去するための演算を行なう演算部と、
を備え、
画像信号のフレームレートとフリッカ波形の1周期に相当する時間がちょうど整数倍の関係にあり、若しくはフリッカ波形が垂直同期期間に対して毎回同じ位相になる撮影環境下において、
前記平均値演算部は、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして加算平均化し、
前記差分演算部は、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして差分をとる、
ことを特徴とする画像処理装置。
An image processing apparatus for processing an image signal including a flicker component,
An integration processing unit that integrates an image signal for each line over a sampling period having a length of one flicker or longer;
An integration value holding unit that holds an integration value by the integration processing unit in a past sampling period;
An average value calculation unit that averages integral values in two or more consecutive sampling periods;
A difference calculation unit that takes a difference between integral values in two or more consecutive sampling periods;
A normalization calculation unit that normalizes the difference value calculated by the difference calculation unit using the average value obtained by the average value calculation unit;
Frequency analysis means for frequency analysis of the difference value of the normalized integral value;
Flicker detection means for detecting a flicker component included in the image signal based on the result of frequency analysis by the frequency analysis means;
A calculation unit for performing a calculation for removing the flicker component detected by the flicker detection unit from the image signal;
With
In a shooting environment where the frame rate of the image signal and the time corresponding to one cycle of the flicker waveform are exactly an integer multiple, or the flicker waveform is in the same phase each time with respect to the vertical synchronization period,
The average value calculation unit shifts the sampling phase of one of the integral values in two consecutive sampling periods by a half period of the flicker period, and performs averaging.
The difference calculation unit obtains a difference by shifting one sampling phase of the integral value in two consecutive sampling periods by a half period of the flicker period.
An image processing apparatus.
商用交流電源により点灯される蛍光灯などの点滅する光源の照明下でXYアドレス走査型撮像素子によって撮影して得られる画像信号を処理する、
ことを特徴とする請求項1に記載の画像処理装置。
Processing an image signal obtained by photographing with an XY address scanning image pickup device under illumination of a blinking light source such as a fluorescent lamp that is turned on by a commercial AC power source;
The image processing apparatus according to claim 1.
フリッカ波形が垂直同期期間に対して同じ位相にならない撮影環境下において、
前記平均値演算部は、連続する2以上のサンプリング期間における積分値をサンプリング位相の順に加算平均し、
前記差分演算部は、連続する2つのサンプリング期間における積分値の差分をサンプリング位相の順にとる、
ことを特徴とする請求項1に記載の画像処理装置。
In the shooting environment where the flicker waveform is not in the same phase with respect to the vertical synchronization period,
The average value calculation unit adds and averages integration values in two or more consecutive sampling periods in the order of sampling phases,
The difference calculation unit takes a difference between integral values in two consecutive sampling periods in the order of sampling phases.
The image processing apparatus according to claim 1.
前記平均値演算部が連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして加算平均化するとともに、前記差分演算部が連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして差分をとる第1の正規化積分値算出モードと、前記平均値演算部が連続する2以上のサンプリング期間における積分値をサンプリング位相の順に加算平均するとともに、前記差分演算部が連続する2つのサンプリング期間における積分値の差分をサンプリング位相の順にとる第2の正規化積分値算出モードを切り替えるモード切替手段をさらに備える、
ことを特徴とする請求項3に記載の画像処理装置。
The sampling phase of one of the integral values in the two sampling periods in which the average value calculation unit is continuous is shifted and averaged by a half cycle of the flicker cycle, and the integration value in the two sampling periods in which the difference calculation unit is continuous is calculated. A first normalized integral value calculation mode in which one sampling phase is shifted by a half cycle of the flicker period and a difference is obtained, and an integral value in two or more sampling periods in which the average value calculation unit is continuous is added and averaged in the order of sampling phases And a mode switching means for switching a second normalized integral value calculation mode in which the difference calculation unit takes the difference between the integral values in two consecutive sampling periods in the order of the sampling phase.
The image processing apparatus according to claim 3.
商用交流電源により点灯される蛍光灯などの点滅する光源の照明下でXYアドレス走査型撮像素子によって撮影して得られる画像信号の処理を行ない、
前記モード切替手段は、前記商用交流電源の周波数に基づくフリッカ波形の1周期とフレームレートが整数倍の関係となるときに前記第1の正規化積分値算出モードに設定し、それ以外のときは前記第2の正規化積分値算出モードに設定する、
ことを特徴とする請求項4に記載の画像処理装置。
Processing an image signal obtained by photographing with an XY address scanning image sensor under illumination of a blinking light source such as a fluorescent lamp that is turned on by a commercial AC power source,
The mode switching means sets the first normalized integral value calculation mode when one cycle of the flicker waveform based on the frequency of the commercial AC power supply and the frame rate have an integer multiple relationship, and otherwise Set to the second normalized integral value calculation mode,
The image processing apparatus according to claim 4.
前記モード切替手段は、まず前記第2の正規化積分値算出モードに設定し、画像信号に含まれるフリッカ成分の検出を試み、画像信号に含まれるフリッカ成分に相当する周波数スペクトルが前記周波数解析手段によって定常的に発生したときには前記第2の正規化積分値算出モードに設定したままとするが、画像信号に含まれるフリッカ成分に相当する周波数スペクトルが前記周波数解析手段によって定常的に発生しなかったときには前記第1の正規化積分値算出モードに切り替える、
ことを特徴とする請求項4に記載の画像処理装置。
The mode switching unit first sets the second normalized integral value calculation mode, tries to detect a flicker component included in the image signal, and a frequency spectrum corresponding to the flicker component included in the image signal is the frequency analysis unit. However, a frequency spectrum corresponding to a flicker component included in the image signal was not generated constantly by the frequency analysis means. Sometimes switch to the first normalized integral value calculation mode,
The image processing apparatus according to claim 4.
フリッカ成分を含んだ画像信号を処理する画像処理方法であって、
フリッカ1周期分以上の長さを持つサンプリング期間にわたってライン毎に画像信号を積分する積分処理ステップと、
連続する2以上のサンプリング期間における積分値を平均化する平均値演算ステップと、
前記の連続する2以上のサンプリング期間における積分値の差分をとる差分演算ステップと、
前記平均値演算ステップで得られた平均値を用いて、前記差分演算ステップにより算出された差分値を正規化する正規化演算ステップと、
前記の正規化された積分値の差分値を周波数解析する周波数解析ステップと、
前記周波数解析ステップによる周波数解析した結果に基づいて画像信号に含まれるフリッカ成分を検出するフリッカ検出ステップと、
前記フリッカ検出ステップにより検出されたフリッカ成分を画像信号から除去するための演算を行なう演算ステップと、
を備え、
画像信号のフレームレートとフリッカ波形の1周期に相当する時間がちょうど整数倍の関係にあり、若しくはフリッカ波形が垂直同期期間に対して毎回同じ位相になる撮影環境下において、
前記平均値演算ステップでは、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして加算平均化し、
前記差分演算ステップでは、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして差分をとる、
ことを特徴とする画像処理方法。
An image processing method for processing an image signal including a flicker component,
An integration step for integrating the image signal line by line over a sampling period having a length of one flicker period or more;
An average value calculating step for averaging the integral values in two or more consecutive sampling periods;
A difference calculating step for calculating a difference between integral values in the two or more consecutive sampling periods;
A normalization calculation step for normalizing the difference value calculated in the difference calculation step using the average value obtained in the average value calculation step;
A frequency analysis step for frequency analysis of the difference value of the normalized integral value;
A flicker detection step for detecting a flicker component included in the image signal based on a result of frequency analysis by the frequency analysis step;
A calculation step for performing a calculation for removing the flicker component detected by the flicker detection step from the image signal;
With
In a shooting environment where the frame rate of the image signal and the time corresponding to one cycle of the flicker waveform are exactly an integer multiple, or the flicker waveform is in the same phase each time with respect to the vertical synchronization period,
In the average value calculating step, one of the sampling phases of the integral values in two consecutive sampling periods is shifted and averaged by shifting by a half period of the flicker period,
In the difference calculation step, a difference is obtained by shifting one sampling phase of the integral value in two consecutive sampling periods by a half period of the flicker period.
An image processing method.
商用交流電源により点灯される蛍光灯などの点滅する光源の照明下でXYアドレス走査型撮像素子によって撮影して得られる画像信号を処理する、
ことを特徴とする請求項7に記載の画像処理方法。
Processing an image signal obtained by photographing with an XY address scanning image pickup device under illumination of a blinking light source such as a fluorescent lamp that is turned on by a commercial AC power source;
The image processing method according to claim 7.
フリッカ波形が垂直同期期間に対して同じ位相にならない撮影環境下において、
前記平均値演算ステップでは、連続する2以上のサンプリング期間における積分値をサンプリング位相の順に加算平均し、
前記差分演算ステップでは、連続する2つのサンプリング期間における積分値の差分をサンプリング位相の順にとる、
ことを特徴とする請求項7に記載の画像処理方法。
In the shooting environment where the flicker waveform is not in the same phase with respect to the vertical synchronization period,
In the average value calculating step, the integration values in two or more consecutive sampling periods are averaged in the order of sampling phases,
In the difference calculation step, a difference between integral values in two consecutive sampling periods is taken in the order of sampling phases.
The image processing method according to claim 7.
前記平均値演算ステップにおいて連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして加算平均化するとともに、前記差分演算ステップにおいて連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして差分をとる第1の正規化積分値算出モードと、前記平均値演算ステップにおいて連続する2以上のサンプリング期間における積分値をサンプリング位相の順に加算平均するとともに、前記差分演算ステップにおいて連続する2つのサンプリング期間における積分値の差分をサンプリング位相の順にとる第2の正規化積分値算出モードを切り替えるモード切替ステップをさらに備える、
ことを特徴とする請求項9に記載の画像処理方法。
In the mean value calculating step, one sampling phase of the integrated values in two consecutive sampling periods is shifted by half a flicker period and added and averaged, and in the difference calculating step, the integrated values in two consecutive sampling periods are calculated. A first normalized integral value calculation mode in which one sampling phase is shifted by a half cycle of the flicker period and a difference is obtained, and an integral value in two or more consecutive sampling periods in the average value calculating step is added and averaged in the order of the sampling phase. And a mode switching step of switching a second normalized integral value calculation mode in which the difference between integral values in two consecutive sampling periods in the difference calculation step is taken in the order of sampling phases.
The image processing method according to claim 9.
商用交流電源により点灯される蛍光灯などの点滅する光源の照明下でXYアドレス走査型撮像素子によって撮影して得られる画像信号の処理を行ない、
前記モード切替手ステップでは、前記商用交流電源の周波数に基づくフリッカ波形の1周期とフレームレートが整数倍の関係となるときに前記第1の正規化積分値算出モードに設定し、それ以外のときは前記第2の正規化積分値算出モードに設定する、
ことを特徴とする請求項10に記載の画像処理方法。
Processing an image signal obtained by photographing with an XY address scanning image sensor under illumination of a blinking light source such as a fluorescent lamp that is turned on by a commercial AC power source,
In the mode switching step, the first normalized integral value calculation mode is set when one cycle of the flicker waveform based on the frequency of the commercial AC power supply and the frame rate have an integer multiple relationship, and otherwise Is set to the second normalized integral value calculation mode,
The image processing method according to claim 10.
前記モード切替ステップでは、まず前記第2の正規化積分値算出モードに設定し、画像信号に含まれるフリッカ成分の検出を試み、画像信号に含まれるフリッカ成分に相当する周波数スペクトルが前記周波数解析ステップによって定常的に発生したときには前記第2の正規化積分値算出モードに設定したままとするが、画像信号に含まれるフリッカ成分に相当する周波数スペクトルが前記周波数解析ステップによって定常的に発生しなかったときには前記第1の正規化積分値算出モードに切り替える、
ことを特徴とする請求項10に記載の画像処理方法。
In the mode switching step, first, the second normalized integral value calculation mode is set, detection of a flicker component included in the image signal is attempted, and a frequency spectrum corresponding to the flicker component included in the image signal is detected in the frequency analysis step. However, a frequency spectrum corresponding to a flicker component included in the image signal was not generated constantly by the frequency analysis step. Sometimes switch to the first normalized integral value calculation mode,
The image processing method according to claim 10.
XYアドレス走査型の撮像素子と、
前記撮像素子を用いて被写体を撮影することによって得られた画像信号を、害画像信号に含まれるフリッカ波形の1周期分以上の長さを持つサンプリング期間にわたってライン毎に画像信号を積分する積分処理部と、
過去のサンプリング期間における前記積分処理部による積分値を保持する積分値保持部と、
連続する2以上のサンプリング期間における積分値を平均化する平均値演算部と、
前記の連続する2以上のサンプリング期間における積分値の差分をとる差分演算部と、
前記平均値演算部で得られた平均値を用いて、前記差分演算部により算出された差分値を正規化する正規化演算部と、
前記の正規化された積分値の差分値を周波数解析する周波数解析手段と、
前記周波数解析手段による周波数解析した結果に基づいて画像信号に含まれるフリッカ成分を検出するフリッカ検出手段と、
前記フリッカ検出手段により検出されたフリッカ成分を画像信号から除去するための演算を行なう演算部と、
を備え、
画像信号のフレームレートとフリッカ波形の1周期に相当する時間がちょうど整数倍の関係にあり、若しくはフリッカ波形が垂直同期期間に対して毎回同じ位相になる撮影環境下において、
前記平均値演算部は、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして加算平均化し、
前記差分演算部は、連続する2つのサンプリング期間における積分値の片方のサンプリング位相をフリッカ周期の半周期分ずらして差分をとる、
ことを特徴とする撮像装置。
An XY address scanning type imaging device;
Integration processing for integrating an image signal for each line over a sampling period having a length of one cycle or more of a flicker waveform included in a harmful image signal, obtained by photographing an object using the image sensor And
An integration value holding unit that holds an integration value by the integration processing unit in a past sampling period;
An average value calculation unit that averages integral values in two or more consecutive sampling periods;
A difference calculation unit for calculating a difference between integral values in two or more consecutive sampling periods;
A normalization calculation unit that normalizes the difference value calculated by the difference calculation unit using the average value obtained by the average value calculation unit;
Frequency analysis means for frequency analysis of the difference value of the normalized integral value;
Flicker detection means for detecting a flicker component included in the image signal based on the result of frequency analysis by the frequency analysis means;
A calculation unit for performing a calculation for removing the flicker component detected by the flicker detection unit from the image signal;
With
In a shooting environment in which the frame rate of the image signal and the time corresponding to one cycle of the flicker waveform are exactly an integral multiple, or the flicker waveform is in the same phase each time with respect to the vertical synchronization period,
The average value calculation unit shifts the sampling phase of one of the integral values in two consecutive sampling periods by a half period of the flicker period, and performs averaging.
The difference calculation unit obtains a difference by shifting one sampling phase of the integral value in two consecutive sampling periods by a half period of the flicker period.
An imaging apparatus characterized by that.
JP2007175860A 2007-07-04 2007-07-04 Image processing apparatus, image processing method, and imaging apparatus Expired - Fee Related JP4867822B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007175860A JP4867822B2 (en) 2007-07-04 2007-07-04 Image processing apparatus, image processing method, and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007175860A JP4867822B2 (en) 2007-07-04 2007-07-04 Image processing apparatus, image processing method, and imaging apparatus

Publications (2)

Publication Number Publication Date
JP2009017167A true JP2009017167A (en) 2009-01-22
JP4867822B2 JP4867822B2 (en) 2012-02-01

Family

ID=40357516

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007175860A Expired - Fee Related JP4867822B2 (en) 2007-07-04 2007-07-04 Image processing apparatus, image processing method, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP4867822B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130123221A (en) * 2012-05-02 2013-11-12 삼성전자주식회사 Apparatus and method for detecting flicker in a camera module
JP2015023577A (en) * 2013-07-19 2015-02-02 富士通株式会社 Flicker detection method and flicker detection apparatus
JP2015041823A (en) * 2013-08-20 2015-03-02 キヤノン株式会社 Imaging apparatus, control method of the same, program, and storage medium
US9654697B2 (en) 2012-09-14 2017-05-16 Canon Kabushiki Kaisha Solid-state imaging apparatus and driving method of solid-state imaging apparatus

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007060585A (en) * 2005-08-26 2007-03-08 Sony Corp Exposure control method, exposure control apparatus, and imaging apparatus

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007060585A (en) * 2005-08-26 2007-03-08 Sony Corp Exposure control method, exposure control apparatus, and imaging apparatus

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130123221A (en) * 2012-05-02 2013-11-12 삼성전자주식회사 Apparatus and method for detecting flicker in a camera module
KR101919479B1 (en) 2012-05-02 2018-11-19 삼성전자주식회사 Apparatus and method for detecting flicker in a camera module
US9654697B2 (en) 2012-09-14 2017-05-16 Canon Kabushiki Kaisha Solid-state imaging apparatus and driving method of solid-state imaging apparatus
US10547794B2 (en) 2012-09-14 2020-01-28 Canon Kabushiki Kaisha Solid-state imaging apparatus and method of operating solid-state imaging apparatus to set a pluratlity of charge accumulation periods in accordance with a flicker period
JP2015023577A (en) * 2013-07-19 2015-02-02 富士通株式会社 Flicker detection method and flicker detection apparatus
JP2015041823A (en) * 2013-08-20 2015-03-02 キヤノン株式会社 Imaging apparatus, control method of the same, program, and storage medium

Also Published As

Publication number Publication date
JP4867822B2 (en) 2012-02-01

Similar Documents

Publication Publication Date Title
JP4539449B2 (en) Image processing apparatus and imaging apparatus
US9794493B2 (en) Image capturing apparatus, image capturing method, and control method
JP4856765B2 (en) Imaging apparatus and flicker detection method
JP4149528B2 (en) Automatic focus detection device
JP5523124B2 (en) Imaging device
KR20060129954A (en) Image-processing apparatus and image-pickup apparatus
US20110080494A1 (en) Imaging apparatus detecting foreign object adhering to lens
KR101044647B1 (en) Imaging device
JP2014003548A (en) Image pick-up device
JP2016213661A (en) Imaging apparatus, method for detecting change in quantity of light and program
JP2014232972A (en) Imaging device, flicker detection method, and information processing device
JP2011135185A (en) Imaging device
JP4867822B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP2013031010A (en) Imaging apparatus, imaging method, and program
JP3908606B2 (en) Imaging device, imaging method, and portable terminal device including the same
JP5440245B2 (en) Imaging device
JP5088361B2 (en) Image processing apparatus and imaging apparatus
JP2007158964A (en) Image processing apparatus and imaging device
US11102423B2 (en) Image pickup apparatus that performs flicker detection, control method for image pickup apparatus, and storage medium
JP2000295535A (en) Solid-state image pickup device and photographing control method
JP4871664B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2014036357A (en) Image processing device and image processing method
JP2006243745A (en) Automatic focus detector
JP2010273147A (en) Imaging signal specific state detector, imaging apparatus, detection method for imaging signal specific state, program and integrated circuit
JP2010161572A (en) Imaging apparatus, control method thereof, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100423

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110712

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110809

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: 20111018

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111031

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141125

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees