JP2017085462A - Imaging apparatus, flicker detection method, and program - Google Patents

Imaging apparatus, flicker detection method, and program Download PDF

Info

Publication number
JP2017085462A
JP2017085462A JP2015214173A JP2015214173A JP2017085462A JP 2017085462 A JP2017085462 A JP 2017085462A JP 2015214173 A JP2015214173 A JP 2015214173A JP 2015214173 A JP2015214173 A JP 2015214173A JP 2017085462 A JP2017085462 A JP 2017085462A
Authority
JP
Japan
Prior art keywords
flicker
phase
period
frame
frame images
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2015214173A
Other languages
Japanese (ja)
Inventor
丈史 塚越
Takefumi Tsukagoshi
丈史 塚越
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2015214173A priority Critical patent/JP2017085462A/en
Publication of JP2017085462A publication Critical patent/JP2017085462A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To more accurately detect a flicker generation factor in a state where an affection (flicker stripe) of a flicker during photographing a moving image (including a live vies display) is reduced as much as possible.SOLUTION: A flicker detection method comprises the steps of: determining whether or not a phase of a flicker stripe generated in each of two flame images is an inverse phase by using difference data of two flame image in an interval of N+0.5 times of a period of the flicker in a state where the period of a photographing flame at flicker detection is set to N+0.5 times (N is an integer number) of the flicker period as a detection target (steps A12 to A14); and determining that a light of the flicker period as the detection target becomes the factor of flicker generation (step A15), if the phase is the inverse phase (step A14 is YES).SELECTED DRAWING: Figure 3

Description

本発明は、撮像されたフレーム画像の明るさ変化に基づいてフリッカの発生要因を検出する撮像装置、フリッカ検出方法及びプログラムに関する。   The present invention relates to an imaging apparatus, a flicker detection method, and a program for detecting a flicker occurrence factor based on a change in brightness of a captured frame image.

デジタルビデオカメラなどの撮像装置は、商用電源周波数(例えば、50Hz、60Hz)に応じて周期的に明るさが変化する光源(例えば、蛍光管など)の環境下で撮像を行うと、商用電源周波数が50Hzの場合には、1/100秒周期で光源の明るさが変化し、60Hzの場合には、1/120秒周期で光源の明るさが変化するために、その画像信号内に明暗の縞(フリッカ縞)が現れることがある。この場合、ローリングシャッタ方式(ライン露光順次読み出し方式)の撮像素子(CMOS)では、蛍光灯などのフリッカ発生要因の有無を検出する場合に、撮影された画像に生じる明暗の縞の発生状態を解析し、被写体の動きなどによる縞の影響を排除して、蛍光灯によるフリッカ成分だけを検出する技術が知られている(特許文献1参照)。   When an imaging device such as a digital video camera captures an image in an environment of a light source (for example, a fluorescent tube) whose brightness changes periodically according to a commercial power frequency (for example, 50 Hz, 60 Hz), the commercial power frequency. Is 50 Hz, the brightness of the light source changes in a cycle of 1/100 seconds, and in the case of 60 Hz, the brightness of the light source changes in a cycle of 1/120 seconds. Stripes (flicker stripes) may appear. In this case, in the imaging device (CMOS) of the rolling shutter method (line exposure sequential readout method), when detecting the presence or absence of flicker generation factors such as a fluorescent lamp, the state of occurrence of bright and dark stripes generated in the photographed image is analyzed. In addition, there is known a technique for detecting only a flicker component by a fluorescent lamp while eliminating the influence of stripes due to movement of a subject (see Patent Document 1).

特開2004−7402号公報JP 2004-7402 A

しかしながら、上述した特許文献のフリッカ検出方法は、シャッタ時間(露光時間)の異なる2つの画像において、その明るさの比の変動を周波数分析するようにしたもので、意図的にフリッカによる影響が発生しやすい撮影条件を設定しているために、検出中にフリッカによる影響(フリッカ縞)が動画データやモニタ画面に顕著に現れてしまい、動画撮影中(ライブビュー表示中を含む)にフリッカ検出を行うことは適切ではなかった。   However, the flicker detection method described in the above-mentioned patent document frequency-analyzes the fluctuation of the brightness ratio of two images with different shutter times (exposure times), and the influence of flicker intentionally occurs. Because the shooting conditions are set to be easy to perform, the flicker effect (flicker fringes) appears prominently on the movie data and monitor screen during detection, and flicker detection is performed during movie shooting (including live view display). It was not appropriate to do.

本発明の課題は、動画撮影中(ライブビュー表示中を含む)でのフリッカの影響(フリッカ縞)を極力少なくした状態で、より正確にフリッカの発生要因を検出できるようにすることである。   An object of the present invention is to make it possible to detect a flicker occurrence factor more accurately in a state where the influence (flicker fringes) of flicker during moving image shooting (including live view display) is minimized.

上述した課題を解決するために本発明は、
ローリングシャッタ方式の撮像素子を備えた撮像装置において、
フリッカ検出時における撮影フレームの周期を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定する設定手段と、
前記設定手段によって設定されたフリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差又は比の情報を用いて、この2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを判別する判別手段と、
前記判別手段によって逆位相であると判別された場合に、検出対象となるフリッカ周期の光がフリッカの発生要因となっていると判定する判定手段と、
を備えることを特徴とする。
In order to solve the above-described problems, the present invention
In an imaging device including a rolling shutter type imaging device,
Setting means for setting the period of the shooting frame at the time of flicker detection to N + 0.5 times (N is an integer) the flicker period to be detected;
Using the information of the difference or ratio between the two frame images at an interval of N + 0.5 times the flicker period set by the setting means, the fringe phase generated in each of the two frame images is opposite in phase. Determination means for determining whether or not,
Determining means for determining that the light of the flicker cycle to be detected is a cause of flicker when the determining means determines that the phase is opposite;
It is characterized by providing.

本発明によれば、動画撮影中(ライブビュー表示中を含む)でのフリッカの影響(フリッカ縞)を極力少なくした状態で、より正確にフリッカの発生要因を検出することができる。   According to the present invention, it is possible to more accurately detect the cause of flicker while reducing the influence of flicker (flicker fringes) during moving image shooting (including live view display) as much as possible.

撮像装置として適用したデジタルカメラの基本的な構成要素を示したブロック図。The block diagram which showed the basic component of the digital camera applied as an imaging device. 撮影モード下での一部の動作(本実施形態の特徴的であるフリッカ検出動作)を説明するためのフローチャート。6 is a flowchart for explaining a part of the operation under a photographing mode (flicker detection operation that is characteristic of the present embodiment). 図2の動作に続くフローチャート。The flowchart following the operation | movement of FIG. 2つのフレーム画像に発生する縞の位相を比較する処理(図3のステップA10、A13)を詳述するためのフローチャート。The flowchart for explaining in detail the process (step A10, A13 of FIG. 3) which compares the phase of the fringe which generate | occur | produces in two frame images. 本実施形態に変形例として、2つのフレーム画像に発生する縞の位相を比較する処理(図3のステップA10、A13)における他の例を示したフローチャート。The flowchart which showed the other example in the process (step A10 of FIG. 3, A13) which compares the phase of the fringe which generate | occur | produces in two frame images as a modification to this embodiment.

以下、図1〜図4を参照して本発明の実施形態を説明する。
図1は、撮像装置として適用したデジタルカメラの基本的な構成要素を示したブロック図である。
撮像装置は、静止画や動画を撮像する撮像機能、記録保存されている画像を表示する再生機能、計時情報を得る計時機能などの他、フリッカ検出機能を備えたデジタルカメラである。このフリッカ検出機能は、商用電源周波数に応じて周期的に明るさが変化する光源(例えば、蛍光管など)の環境下で撮像された画像内に現れるフリッカに起因する縞を検出する機能である。
Hereinafter, an embodiment of the present invention will be described with reference to FIGS.
FIG. 1 is a block diagram showing basic components of a digital camera applied as an imaging apparatus.
The imaging device is a digital camera provided with a flicker detection function in addition to an imaging function for capturing still images and moving images, a playback function for displaying recorded and stored images, a timing function for obtaining timing information, and the like. This flicker detection function is a function for detecting fringes caused by flicker appearing in an image captured in the environment of a light source (for example, a fluorescent tube) whose brightness periodically changes according to the commercial power supply frequency. .

本実施形態は、後で詳述するが、ローリングシャッタ方式(ライン露光順次読み出し方式)の撮像素子(CMOS)を用いて撮像する場合のフリッカ検出時における撮影フレーム周期として特殊なフレーム周期を一時的に設定するようにしたことを特徴としている。制御部1は、電源部(二次電池)2からの電力供給によって動作し、記憶部3内の各種のプログラムに応じてこのデジタルカメラの全体動作を制御するもので、この制御部1には図示しないCPU(中央演算処理装置)やメモリなどが設けられている。   In the present embodiment, as will be described in detail later, a special frame period is temporarily used as a shooting frame period at the time of flicker detection in the case of imaging using a rolling shutter type (line exposure sequential readout type) imaging device (CMOS). It is characterized by being set to. The control unit 1 operates by supplying power from the power source unit (secondary battery) 2 and controls the overall operation of the digital camera in accordance with various programs in the storage unit 3. A CPU (Central Processing Unit) and a memory (not shown) are provided.

記憶部3は、例えば、ROM、フラッシュメモリなどを有する構成で、後述する図2〜図4に示した動作手順に応じて本実施形態を実現するためのプログラムや各種のアプリケーションなどが格納されているプログラムメモリ3A、このカメラが動作するために必要となる各種の情報(例えば、フラグなど)を一時的に記憶するワークメモリ3Bなどを有している。なお、記憶部3は、例えば、SDカード、USBメモリなど、着脱自在な可搬型メモリ(記録メディア)を含む構成であってもよく、図示しないが、通信機能を介してネットワークに接続されている状態においては所定のサーバ装置側の記憶領域を含むものであってもよい。   The storage unit 3 includes, for example, a ROM, a flash memory, and the like, and stores programs and various applications for realizing the present embodiment in accordance with operation procedures shown in FIGS. A program memory 3A, and a work memory 3B for temporarily storing various kinds of information (for example, flags) necessary for the operation of the camera. The storage unit 3 may include a removable portable memory (recording medium) such as an SD card or a USB memory, and is connected to a network via a communication function (not shown). The state may include a storage area on a predetermined server device side.

操作部4は、図示省略したが、撮影が可能な動作モード(撮影モード)と、撮影済み画像(保存画像)を再生する動作モード(再生モード)を切り替えるモード変更ボタンと、撮影開始を指示するレリーズボタンの他に、露出やシャッタスピード、絞り、ISO感度などの撮影条件の設定操作などを行う各種のキーを備えたもので、制御部1は、この操作部4からの入力操作信号に応じた処理として、例えば、モード変更処理、撮影処理、撮影条件の設定などを行う。表示部5は、高精細液晶ディスプレイあるいは有機EL(Electro Luminescence)ディスプレイなどで、撮像された画像データ(ライブビュー画像)をリアルタイムに表示するモニタ画面(ライブビュー画面)となったり、撮影済みの画像データを再生する再生画面となったりする。   Although not shown, the operation unit 4 instructs a mode change button for switching between an operation mode (shooting mode) in which shooting can be performed and an operation mode (playback mode) for playing back a captured image (stored image), and to start shooting. In addition to the release button, it is equipped with various keys for performing operations such as setting exposure conditions, shutter speed, aperture, ISO sensitivity, and other shooting conditions. The control unit 1 responds to input operation signals from the operation unit 4. As the processing, for example, mode change processing, shooting processing, setting of shooting conditions, and the like are performed. The display unit 5 is a high-definition liquid crystal display or an organic EL (Electro Luminescence) display, or a monitor screen (live view screen) that displays captured image data (live view image) in real time, or a captured image. It may be a playback screen for playing back data.

撮像部6は、被写体を高精細に撮影可能なカメラ部を構成するもので、そのレンズユニット6Aには、ズームレンズ6B、フォーカスレンズ(合焦レンズ)6C、絞り・シャッタ6D、撮像素子6Eが設けられている。撮像素子6Eは、行列のマトリックス状に各画素を二次元配置したもので、水平ライン(行ライン)と垂直ライン(列ライン)上に配置された各画素を、垂直方向に並ぶ水平ライン(1ライン又は数ライン)毎に露光タイミングをずらしながら撮像を行うローリングシャッタ方式のCMOSイメージセンサである。   The imaging unit 6 constitutes a camera unit capable of photographing a subject with high definition. The lens unit 6A includes a zoom lens 6B, a focus lens (focusing lens) 6C, an aperture / shutter 6D, and an imaging element 6E. Is provided. The imaging device 6E is a two-dimensional arrangement of pixels in a matrix form of a matrix, and each pixel arranged on a horizontal line (row line) and a vertical line (column line) is arranged in a horizontal line (1 This is a rolling shutter type CMOS image sensor that performs imaging while shifting the exposure timing for each line or several lines).

そして、撮像素子6Eは、図示省略したが、電荷蓄積部及び電荷転送部を有し、その先頭ライン(最上端(行)の水平ライン)から最終ライン(最下端(行)の水平ライン)までを所定時間毎にタイミングをずらしながら水平ライン毎に順次露光・読み出しを行うにしている。なお、ここで言う「垂直」、「水平」とは、ローリングシャッタ方式の撮像素子において上記のような露光を行う場合の画素データの読み出し方向を便宜的に示した呼び方であって、重力方向や撮像素子の取り付け方向などに限定されるものではない。以下、水平ラインのことを単にラインと呼ぶ場合もある。   Although not shown, the image sensor 6E includes a charge storage unit and a charge transfer unit, and extends from the first line (horizontal line at the top end (row)) to the last line (horizontal line at the bottom end (row)). Are sequentially exposed and read out for each horizontal line while shifting the timing every predetermined time. The terms “vertical” and “horizontal” used herein refer to the pixel data readout direction for the sake of convenience when performing exposure as described above in a rolling shutter type imaging device. It is not limited to the mounting direction of the image sensor or the like. Hereinafter, the horizontal line may be simply referred to as a line.

この撮像素子6Eから読み出された画像信号(アナログ値の信号)は、図示省略のA/D変換部によってデジタル信号(画像信号)に変換されて所定の画像表示処理が施された後、表示部5にライブビュー画像としてリアルタイムにモニタ表示される。制御部1は、レリーズボタン(図示省略)の操作に応じて、撮像された画像に対して所定の画像処理(現像処理など)を施して撮影画像を生成すると共に、画像圧縮処理を施して標準的なファイル形式に変換した後、記憶部3の記録メディアに記録保存させる。   The image signal (analog signal) read out from the image sensor 6E is converted into a digital signal (image signal) by an A / D converter (not shown) and subjected to predetermined image display processing, and then displayed. The monitor 5 displays the live view image in real time on the unit 5. In response to an operation of a release button (not shown), the control unit 1 performs a predetermined image process (development process, etc.) on the captured image to generate a captured image, and performs an image compression process to perform a standard operation. After being converted into a typical file format, it is recorded and saved on a recording medium in the storage unit 3.

このようにローリングシャッタ方式の撮像素子6Eを備えた撮像装置(デジタルカメラ)においてそのフリッカ検出機能は、撮像した画像に生じる縞の発生状態、つまり、後で詳述するが、2つのフレーム画像の各々に生じる縞の位相が同位相及び逆位相となったことを確認し、被写体と撮像装置との相対的な動きなどによる縞の影響を排除してフリッカに起因する縞の発生状態を検出するもので、動画撮影中(ライブビュー表示中を含む)でのフリッカの影響(フリッカ縞)を極力少なくするために画像に生じる縞の強さが小さくてもより正確にフリッカの発生要因を検出できるようにしたものである。   As described above, the flicker detection function in the imaging apparatus (digital camera) including the imaging device 6E of the rolling shutter system is the state of occurrence of fringes generated in the captured image, that is, as described in detail later, Confirm that the phase of the fringes generated in each phase is the same and opposite, and eliminate the influence of the fringes due to relative movement between the subject and the imaging device, and detect the occurrence of the fringes caused by flicker In order to minimize the flicker effect (flicker fringes) during movie shooting (including live view display), the flicker occurrence factor can be detected more accurately even if the strength of the fringes generated in the image is small. It is what I did.

ところで、一般に、商用電源周波数(例えば、50Hz、60Hz)に応じて周期的に明るさが変化する光源(例えば、蛍光管など)の環境下で動画撮影(又はライブビュ撮影)を行った場合に、撮像素子6Eへの露光時間に応じてフリッカ縞が無い画像と、フリッカ縞が有る画像が得られる。すなわち、商用電源周波数50Hz(フリッカ周期1/100s)、又は商用電源周波数60Hz(フリッカ周期1/120s)の場合に、フリッカ周期(10ms、又は8.3ms)の整数倍の露光時間(例えば、商用電源周波数が50Hzの環境下ならば、露光時間10ms、20ms、30msなど、60Hzの環境下ならば、8.3ms、16.7ms、25msなど)で撮影した場合には、どのラインの画素でも露光中に累積されるフリッカの影響は等しくなるためにフリッカ縞の発生の無い画像が得られる。また、フリッカ周期の整数倍を除く他の値の露光時間で撮影した場合には、ライン毎にフリッカの影響が異なるためにフリッカ縞の有る画像が得られる。   By the way, in general, when video shooting (or live view shooting) is performed in an environment of a light source (for example, a fluorescent tube) whose brightness periodically changes according to a commercial power supply frequency (for example, 50 Hz, 60 Hz), An image without flicker fringes and an image with flicker fringes are obtained according to the exposure time to the image sensor 6E. That is, when the commercial power source frequency is 50 Hz (flicker cycle 1/100 s) or the commercial power source frequency is 60 Hz (flicker cycle 1/120 s), the exposure time (for example, commercial frequency) is an integral multiple of the flicker cycle (10 ms or 8.3 ms). If the power frequency is 50 Hz, the exposure time is 10 ms, 20 ms, 30 ms, etc. If the image is taken at 60 Hz, 8.3 ms, 16.7 ms, 25 ms, etc. Since the effects of flicker accumulated therein are equal, an image free from flicker fringes can be obtained. In addition, when shooting is performed with an exposure time other than an integral multiple of the flicker cycle, an image with flicker fringes is obtained because the influence of flicker differs for each line.

そして、このフリッカ縞は、フレームレートによってフレーム毎に明滅位置が異なる。なお、以下、商用電源周波数50Hz(フリッカ周波数100Hz:フリッカ周期10ms)を単に50z電源、また、商用電源周波数60Hz(フリッカ周波数120Hz:フリッカ周期8.3ms)を単に60Hz電源と呼称するものとすると、例えば、フレームレートが30fps(33ms周期)の場合には、3フレーム(100ms)毎に50Hz電源(周期10ms)のフリッカ縞がフレーム内の同じ位置に出現し、その間の2フレームにはそれぞれ1/3周期ずれた位置にフリッカ縞が出現するようになる。このことを利用することにより30fps(33ms周期)の動作時には、50Hz電源(周期10ms)のフリッカを検出することが可能となる。すなわち、3フレーム分離れたフレーム画像を比較することによって被写体と撮像装置との相対的な移動(被写体のぶれ)が無いことを確認してから隣接するフレーム同士を比較し、その比較結果から50Hz電源(周期10ms)のフリッカを検出することが可能となる。   The flicker stripes have different blinking positions for each frame depending on the frame rate. In the following description, the commercial power supply frequency 50 Hz (flicker frequency 100 Hz: flicker cycle 10 ms) is simply referred to as a 50z power supply, and the commercial power supply frequency 60 Hz (flicker frequency 120 Hz: flicker cycle 8.3 ms) is simply referred to as a 60 Hz power supply. For example, when the frame rate is 30 fps (a cycle of 33 ms), a flicker stripe of a 50 Hz power supply (cycle 10 ms) appears every 3 frames (100 ms) at the same position in the frame, and 1 / Flicker stripes appear at positions shifted by three cycles. By utilizing this fact, it is possible to detect flicker of a 50 Hz power supply (cycle 10 ms) at the time of operation at 30 fps (cycle 33 ms). That is, by comparing the frame images separated by three frames and confirming that there is no relative movement between the subject and the imaging device (subject blur), the adjacent frames are compared with each other, and the comparison result is 50 Hz. It becomes possible to detect the flicker of the power supply (cycle 10 ms).

フリッカ縞は1/3周期ずれた位置に出現するため、この1/3程度のずれ量(明滅の変化量)では十分に大きな値とはならず、検出精度にも影響を与えてしまう。他方、50Hz電源(周期10ms)のフリッカを検出する場合、被写体の撮像装置との相対的な移動が無いことを確認するためには、少なくとも100msの時間を要してしまう。すなわち、動画撮影のフレームレートが30fps(周期33ms)の場合において、50Hz電源(フリッカ周波数100Hz、フリッカ周期10ms)と同期するのが、100ms毎(33msと10msの最小公倍数)であり、同期した同じ位相の2つのフレーム画像に変化が無ければ被写体の移動が無いと判断しているために100msの時間を要してしまう。   Since flicker fringes appear at a position shifted by 1/3 period, a shift amount of about 1/3 (a blinking change amount) does not have a sufficiently large value and affects detection accuracy. On the other hand, when detecting flicker of a 50 Hz power supply (period 10 ms), it takes at least 100 ms to confirm that there is no relative movement of the subject with the imaging device. That is, when the frame rate of moving image shooting is 30 fps (cycle 33 ms), the synchronization with the 50 Hz power supply (flicker frequency 100 Hz, flicker cycle 10 ms) is every 100 ms (the least common multiple of 33 ms and 10 ms), and the same synchronized If there is no change in the two frame images of the phase, it is determined that there is no movement of the subject, and thus it takes 100 ms.

そこで、本実施形態においては、フリッカ検出時における撮影フレームの周期(フリッカ検出用のフレーム周期)を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に一時的に設定するようにしている。すなわち、例えば、検出対象となるフリッカ周期が50Hz電源(10ms)の場合、フリッカ検出用フレームレート(フレーム周期)として、N=0で200fps(5ms)、N=1で67fps(15ms)、N=2で40fps(25ms)、N=3で29fps(35ms)、N4で22fps(45ms)、…、のいずれかを設定するようにしている。同様に、検出対象となるフリッカ周期が60Hz電源(8.3ms)の場合、フリッカ検出用フレームレート(フレーム周期)として、N=0で240fps(4.1ms)、N=1で80fps(12.5ms)、N=2で48fps(20.8ms)、N=3で34fps(29.2ms)、N=4で27fps(37.5ms)、N=5で22fps(45.8ms)、…、のいずれかを設定するようにしている。   Therefore, in the present embodiment, the period of the photographic frame (flicker detection frame period) at the time of flicker detection is temporarily set to N + 0.5 times (N is an integer) the flicker period to be detected. ing. That is, for example, when the flicker cycle to be detected is a 50 Hz power supply (10 ms), the flicker detection frame rate (frame cycle) is N = 0, 200 fps (5 ms), N = 1, 67 fps (15 ms), N = 2 is set to 40 fps (25 ms), N = 3 is set to 29 fps (35 ms), N4 is set to 22 fps (45 ms),... Similarly, when the flicker cycle to be detected is a 60 Hz power supply (8.3 ms), the flicker detection frame rate (frame cycle) is 240 fps (4.1 ms) when N = 0, and 80 fps (12.12) when N = 1. 5 ms), N = 2 to 48 fps (20.8 ms), N = 3 to 34 fps (29.2 ms), N = 4 to 27 fps (37.5 ms), N = 5 to 22 fps (45.8 ms),. Either one is set.

そして、本実施形態においては、上述のようにフリッカ検出用フレームレート(フレーム周期)を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に一時的に設定した状態において、露光、転送した画像として、N+0.5倍の間隔にある2つのフレーム画像を比較し、その画像の明るさの差のデータを用いて、この2つのフレーム画像の各々に生じる縞の位相が逆位相であるか同位相であるかを判別する。この場合、1フレーム毎に逆位相、同位相となる。ここで、画像の明るさの差とは、画像全体を平均した明るさの差ではなく、画素毎の明るさの差が画像全体ではどのくらいであるかを示す明るさの差である。被写体ぶれなどを考慮すると、必ずしも1画素単位ではなく複数画素を単位として比較してもよく、フリッカで生じる縞のように、一方向の明るさ変化が主な問題となる場合には、1または複数ライン単位で比較される画像全体の明るさの差をいう。   In this embodiment, as described above, in the state where the flicker detection frame rate (frame period) is temporarily set to N + 0.5 times (N is an integer) the flicker period to be detected, exposure, As a transferred image, two frame images with an interval of N + 0.5 times are compared, and using the brightness difference data of the images, the phase of the fringes generated in each of the two frame images is opposite in phase. It is determined whether it is in phase or in phase. In this case, each frame has an opposite phase and the same phase. Here, the difference in brightness of the image is not a difference in brightness obtained by averaging the entire image, but is a difference in brightness indicating how much the difference in brightness for each pixel is in the entire image. Considering subject blur, etc., comparison may be made in units of a plurality of pixels, not necessarily in units of one pixel. If a change in brightness in one direction is a major problem, such as a stripe caused by flicker, 1 or The difference in brightness of the entire image compared in units of multiple lines.

N+0.5倍の間隔にある2つのフレーム画像の各々に生じる縞の位相が逆位相となると、つまり、縞の位相が180°異なると、画像の明るさの差は最大となるため、上述したように1/3の位相のずれがある2つのフレーム画像を用いる場合に比べて、フリッカの検出が確実なものとなり、また、2フレーム毎に縞の位相が同位相となるため、2フレームという短い間隔で2つのフレーム画像の差を比較することが可能となる。更に、本実施形態では、フリッカの検出をより確実なものとするために、例えば、隣接する2つのフレーム画像を対象としてそれらの縞の位相が逆位相であるか否かを判別する他に、1フレーム隔てた2つのフレーム画像の各々に生じる縞の位相が同位相であるか否かを判別し、1フレーム隔てた2つのフレーム画像の各々に生じる縞の位相が同位相であることを確認(被写体と撮像装置との相対的な移動が無いことを確認)した上で、隣接する2つのフレーム画像の各々に生じる縞の位相が逆位相である場合に、検出対象となるフリッカ周期のフリッカ発生要因があると判定するようにしている。   When the phase of the fringes generated in each of the two frame images having an interval of N + 0.5 times is reversed, that is, when the phase of the fringes is different by 180 °, the difference in image brightness is maximized. Thus, compared to the case of using two frame images having a phase shift of 1/3, the detection of flicker is more reliable, and the fringe phase is the same for every two frames. It is possible to compare the difference between two frame images at short intervals. Further, in the present embodiment, in order to make flicker detection more reliable, for example, in addition to determining whether or not the phases of the fringes are opposite phases for two adjacent frame images, It is determined whether or not the phase of the fringes generated in each of the two frame images separated by one frame is the same phase, and the phase of the fringes generated in each of the two frame images separated by one frame is confirmed to be the same phase. After confirming that there is no relative movement between the subject and the imaging device, when the phase of the fringes generated in each of the two adjacent frame images is opposite, the flicker of the flicker cycle to be detected It is determined that there is a cause.

次に、本実施形態における撮像装置の動作概念を図2〜図4に示すフローチャートを参照して説明する。ここで、これらのフローチャートに記述されている各機能は、読み取り可能なプログラムコードの形態で格納されており、このプログラムコードにしたがった動作が逐次実行される。また、ネットワークなどの伝送媒体を介して伝送されてきた上述のプログラムコードに従った動作を逐次実行することもできる。すなわち、記録媒体の他に、伝送媒体を介して外部供給されたプログラム/データを利用して本実施形態特有の動作を実行することもできる。なお、図2及び図3は、撮像装置の全体動作のうち、本実施形態の特徴部分の動作概要を示したフローチャートであり、この図2及び図3のフローから抜けた際には、全体動作のメインフロー(図示省略)に戻る。   Next, the operation concept of the imaging apparatus in the present embodiment will be described with reference to the flowcharts shown in FIGS. Here, each function described in these flowcharts is stored in the form of a readable program code, and operations according to the program code are sequentially executed. Further, it is possible to sequentially execute the operation according to the above-described program code transmitted via a transmission medium such as a network. In other words, in addition to the recording medium, an operation unique to the present embodiment can be executed using a program / data supplied externally via a transmission medium. 2 and 3 are flowcharts showing an outline of the operation of the characteristic part of the present embodiment in the entire operation of the imaging apparatus. When the flow of FIG. 2 and FIG. Return to the main flow (not shown).

図2及び図3は、撮影モード下での一部の動作(本実施形態の特徴的であるフリッカ検出動作)を説明するためのフローチャートであり、動画撮影の開始に先立って実行される。
まず、制御部1は、現在モード(各種の動画撮影モードの中から任意に選択された撮影モード)に応じて対応する撮影用フレームレートを設定する(ステップA1)。その際、ライブビュー表示の撮影モードであれば、その撮影用フレームレートとして30fpsを設定する。次に、現在モードに応じた撮影動作を開始し、ライブビュー表示の撮影モードであれば、更に撮像された画像の表示動作を開始する(ステップA2)。この状態において、予め決められているフリッカ検出タイミング(例えば、1秒間隔)であるかを調べ(ステップA3)、検出タイミングでなければ(ステップA3でNO)、撮影モード下での他の動作に移行するが、検出タイミングであれば(ステップA3でYES)、以下のフリッカ検出処理(ステップA4〜A17)に移り、検出対象となるフリッカの周期の光がフリッカの発生要因となっているか否かを判定する。
2 and 3 are flowcharts for explaining a part of the operation under the shooting mode (flicker detection operation which is characteristic of the present embodiment), and is executed prior to the start of moving image shooting.
First, the control unit 1 sets a shooting frame rate corresponding to the current mode (shooting mode arbitrarily selected from various moving image shooting modes) (step A1). At this time, if the shooting mode is the live view display, 30 fps is set as the shooting frame rate. Next, the shooting operation corresponding to the current mode is started, and if the shooting mode is the live view display mode, the display operation of the captured image is further started (step A2). In this state, it is checked whether it is a predetermined flicker detection timing (for example, every 1 second) (step A3). If it is not the detection timing (NO in step A3), another operation in the shooting mode is performed. If it is the detection timing (YES in step A3), the process proceeds to the following flicker detection process (steps A4 to A17), and whether or not the light of the flicker cycle to be detected is a flicker occurrence factor. Determine.

制御部1は、検出対象となるフリッカ周期の50Hz電源(10ms)、60Hz電源(8.3ms)の中からその1つを今回の検出対象として選択する(ステップA4)。そして、この選択した検出対象のフリッカ周期のN+0.5倍(N=0、1、2、3、…)の各値を、フリッカ検出用のフレームレート(フレーム周期)の候補として決定(ステップA5)した後、上述のステップA1で設定されている撮影用のフレームレートに最も近いフレームレートをその候補の中から選択する(ステップA6)。   The control unit 1 selects one of the 50 Hz power source (10 ms) and 60 Hz power source (8.3 ms) of the flicker cycle to be detected as the current detection target (step A4). Then, each value of N + 0.5 times (N = 0, 1, 2, 3,...) Of the selected flicker cycle of the detection target is determined as a flicker detection frame rate (frame cycle) candidate (step A5). After that, the frame rate closest to the shooting frame rate set in step A1 is selected from the candidates (step A6).

すなわち、今回の検出対象のフリッカ検出用のフレームレート(フレーム周期)を決定する際に、撮影用フレームレートを極力落とさずにフリッカ検出を可能とするために、撮影用のフレームレートに最も近いフレームレートをその候補の中から選択する。例えば、撮影用のフレームレートが30fpsの場合に、検出対象となるフリッカ周期が50Hz電源(10ms)であれば、フリッカ検出用のフレームレート(フレーム周期)としてN=3の29fps(35ms)を選択し、60Hz電源(8.3ms)であれば、フリッカ検出用のフレームレート(フレーム周期)としてN=3の27fps(37.5ms)を選択する。   That is, when determining the flicker detection frame rate (frame period) to be detected this time, in order to enable flicker detection without reducing the shooting frame rate as much as possible, the frame closest to the shooting frame rate is used. Select a rate from the candidates. For example, if the shooting frame rate is 30 fps and the flicker cycle to be detected is a 50 Hz power supply (10 ms), N = 3 29 fps (35 ms) is selected as the flicker detection frame rate (frame cycle). If the power source is 60 Hz (8.3 ms), N = 3 27 fps (37.5 ms) is selected as the flicker detection frame rate (frame period).

そして、選択したフリッカ検出用のフレームレート(フレーム周期)を一時的に設定(ステップA7)した後、このフリッカ検出用フレームレートによって連続的に撮像された3つのフレーム画像を取得してワークメモリ3Bに一時記憶させる(ステップA8)。そして、フリッカ周期のM倍(Mは整数)の間隔にある2つのフレーム画像、例えば、M=1では、1フレーム隔てた2つのフレーム画像(1番目のフレーム画像と3番目のフレーム画像)を比較対象として指定し(ステップA9)、この2つのフレーム画像に発生する縞の位相を比較する処理に移る(ステップA10)。   Then, the selected flicker detection frame rate (frame period) is temporarily set (step A7), and then three frame images continuously captured at the flicker detection frame rate are acquired to obtain the work memory 3B. (Step A8). Then, two frame images having an interval of M times the flicker cycle (M is an integer), for example, when M = 1, two frame images separated by one frame (the first frame image and the third frame image) Designation is made as a comparison target (step A9), and the process proceeds to a process of comparing the phase of the fringes generated in the two frame images (step A10).

図4は、2つのフレーム画像に発生する縞の位相比較処理(図3のステップA10、A13)を詳述するためのフローチャートである。
まず、制御部1は、比較対象の2つのフレーム画像を水平ライン毎に積分して垂直方向の明るさ変動データを抽出する(ステップB1)。すなわち、フリッカに起因とする縞は、フレーム画像の垂直方向に現れるために画像解析を行う場合には、一方のフレーム画像を対象として、各水平ライン内の水平方向に並ぶ全ての画素データを水平ライン毎に積分し、複数の水平ラインに対応する複数の積分値を垂直方向の明るさ変動データとして抽出する。次に、他方のフレーム画像を対象として、同様に、各水平ライン内の水平方向に並ぶ全ての画素データを水平ライン毎に積分し、複数の水平ラインに対応する複数の積分値を垂直方向の明るさ変動データとして抽出する。なお、上述した各積分は、1ライン毎に行う場合に限らず、複数ライン毎に行うようにしてもよい。
FIG. 4 is a flowchart for explaining in detail the phase comparison process (steps A10 and A13 in FIG. 3) of fringes generated in two frame images.
First, the control unit 1 integrates the two frame images to be compared for each horizontal line, and extracts brightness variation data in the vertical direction (step B1). That is, since the fringes caused by flicker appear in the vertical direction of the frame image, when image analysis is performed, all the pixel data arranged in the horizontal direction in each horizontal line is horizontally processed for one frame image. Integration is performed for each line, and a plurality of integration values corresponding to a plurality of horizontal lines are extracted as brightness fluctuation data in the vertical direction. Next, for the other frame image, similarly, all the pixel data arranged in the horizontal direction in each horizontal line are integrated for each horizontal line, and a plurality of integration values corresponding to the plurality of horizontal lines are integrated in the vertical direction. Extracted as brightness fluctuation data. Each integration described above is not limited to being performed for each line, but may be performed for each of a plurality of lines.

次に、上述のようにして抽出した2つの明るさ変動データを水平ライン毎に比較して水平ライン毎の差分を求め、この水平ライン毎の差分を垂直方向に積分してその累積値を求め(ステップB2)、この差分累積値と所定の閾値とを比較することによって2つのフレーム画像に生じる縞が同位相であるか逆位相であるかの判定を行う(ステップB3〜B7)。すなわち、2つの画像の差分累積値と予め設定されている第1閾値(同位相判定用の基準値)とを比較し、この差分累積値は第1閾値以内であるかを調べ(ステップB3)、この差分累積値が第1閾値以内であれば(ステップB3でYES)、2つのフレーム画像に生じる縞の位相は同位相であると判定する(ステップB7)。   Next, the two brightness fluctuation data extracted as described above are compared for each horizontal line to obtain a difference for each horizontal line, and the difference for each horizontal line is integrated in the vertical direction to obtain the accumulated value. (Step B2), it is determined whether the fringes generated in the two frame images have the same phase or the opposite phase by comparing the accumulated difference value with a predetermined threshold (Steps B3 to B7). That is, the difference accumulated value of the two images is compared with a preset first threshold value (reference value for in-phase determination) to check whether the difference accumulated value is within the first threshold value (step B3). If the accumulated difference value is within the first threshold (YES in step B3), it is determined that the fringe phases generated in the two frame images are the same phase (step B7).

一方、2つの画像の差分累積値が第1閾値以内でなければ(ステップB3でNO)、この差分累積値と予め設定されている第2閾値(逆位相判定用の基準値)とを比較し、この差分累積値は第2閾値以上であるかを調べる(ステップB4)。ここで、差分累積値が第2閾値以上であれば(ステップB4でYES)、2つのフレーム画像に生じる縞の位相は逆位相であると判定する(ステップB5)。なお、2つの画像の差分累積値が第1閾値よりも大きく(ステップB3でNO)、かつ第2閾値よりも小さければ(ステップB4でNO)、同位相及び逆位相以外であると判定する(ステップB6)。   On the other hand, if the difference accumulated value of the two images is not within the first threshold value (NO in step B3), the difference accumulated value is compared with a preset second threshold value (reference value for antiphase determination). Then, it is checked whether the difference accumulated value is equal to or greater than the second threshold (step B4). If the accumulated difference value is equal to or greater than the second threshold value (YES in step B4), it is determined that the fringe phases generated in the two frame images are opposite phases (step B5). If the accumulated difference value of the two images is larger than the first threshold value (NO in step B3) and smaller than the second threshold value (NO in step B4), it is determined that the phase is other than the same phase and the opposite phase ( Step B6).

このような位相比較処理(図3のステップA10)が終わると、この位相比較処理で判定された結果は、同位相であるかを調べ(ステップA11)、同位相でなければ(ステップA11でNO)、上述のステップA8に戻り、新らに連続撮像された3つのフレーム画像を取得した後、以下、1番目のフレーム画像と3番目のフレーム画像に発生する縞の位相が同位相と判定するまで上述の動作を繰り返す(ステップA8〜A11)。なお、この繰り返し回数を計数し、その計数値が所定値以上となった際に検出不能として図4のフローを強制的に終了するようにしてもよい。   When such a phase comparison process (step A10 in FIG. 3) is completed, it is checked whether the result determined in this phase comparison process is the same phase (step A11). If the result is not the same phase (NO in step A11) ), Returning to the above step A8, and after acquiring three newly captured continuous frame images, the phase of fringes generated in the first frame image and the third frame image is determined to be the same phase. The above-described operation is repeated until the above (steps A8 to A11). Note that the number of repetitions may be counted, and the flow of FIG. 4 may be forcibly terminated when detection is impossible when the count value exceeds a predetermined value.

いま、1フレーム隔てた2つのフレーム画像(1番目のフレーム画像と3番目のフレーム画像)を比較対象として指定した場合に(ステップA9)、上述の位相比較処理(図3のステップA10)の実行に移ると、この2つのフレーム画像にフリッカに起因する縞が発生していれば、この2つの画像の差分累積値は第1閾値以下となり(図4のステップB3でYES)、その縞の位相は同位相であると判定する(ステップB7)。すなわち、検出対象となるフリッカ周期のN+0.5倍の間隔にある2つのフレーム画像に生じるフリッカに起因する縞の位相は、2フレーム毎に同位相となるため、1フレーム隔てた2つのフレーム画像(1番目のフレーム画像と3番目のフレーム画像)にフリッカに起因する縞が生じていれば、その縞の位相は同位相となる。   When two frame images separated by one frame (the first frame image and the third frame image) are designated as comparison targets (step A9), the above-described phase comparison process (step A10 in FIG. 3) is executed. If there is a fringe attributed to flicker in the two frame images, the difference accumulated value of the two images becomes equal to or less than the first threshold (YES in step B3 in FIG. 4), and the phase of the fringe Are determined to be in phase (step B7). That is, since the phase of fringes caused by flicker occurring in two frame images at an interval of N + 0.5 times the flicker cycle to be detected becomes the same phase every two frames, two frame images separated by one frame If a fringe due to flicker occurs in (the first frame image and the third frame image), the phase of the fringe is the same phase.

このように1フレーム隔てた2つのフレーム画像に発生する縞の位相が同位相である場合には(ステップA11でYES)、次のステップA12に移り、時間的に前後に隣接する2つのフレーム画像(例えば、1番目のフレーム画像と2番目のフレーム画像)を比較対象として指定した後、この隣接する2つのフレーム画像に発生する縞の位相を比較する処理に移る(ステップA13)。この場合の位相比較処理も上述した図4のフローと同様である。   Thus, when the phase of the fringes generated in two frame images separated by one frame is the same phase (YES in step A11), the process proceeds to the next step A12, and two frame images adjacent to each other temporally before and after. After specifying (for example, the first frame image and the second frame image) as a comparison target, the process proceeds to a process of comparing the phase of the fringes generated in the two adjacent frame images (step A13). The phase comparison process in this case is also the same as the flow of FIG. 4 described above.

すなわち、2つのフレーム画像を水平ライン毎に積分して垂直方向の明るさ変動データを抽出し(図4のステップB1)、抽出した2つの明るさ変動データを水平ライン毎に比較して水平ライン毎の差分を垂直方向に積分してその累積値を求める(ステップB2)。この場合、この2つのフレーム画像にフリッカに起因する縞が発生していれば、差分累積値は第2閾値以上となり(ステップB4でYES)、隣接する2つのフレーム画像の各々に生じる縞の位相は逆位相であると判定する(ステップB6)。すなわち、検出対象となるフリッカ周期のN+0.5倍の間隔にある2つのフレーム画像に生じるフリッカに起因する縞の位相は、1フレーム毎に同位相、逆位相となるため、隣接する2つのフレーム画像(1番目のフレーム画像と2番目のフレーム画像)にフリッカに起因する縞が生じていれば、その縞の位相は逆位相となる。   That is, two frame images are integrated for each horizontal line to extract brightness fluctuation data in the vertical direction (step B1 in FIG. 4), and the extracted two brightness fluctuation data are compared for each horizontal line to compare the horizontal line. Each difference is integrated in the vertical direction to obtain the accumulated value (step B2). In this case, if a fringe due to flicker occurs in these two frame images, the difference accumulated value is equal to or greater than the second threshold (YES in step B4), and the phase of the fringe generated in each of the two adjacent frame images Is determined to be in opposite phase (step B6). That is, the fringe phase caused by flicker occurring in two frame images at an interval of N + 0.5 times the flicker cycle to be detected has the same phase and opposite phase for each frame. If the image (the first frame image and the second frame image) has stripes due to flicker, the phases of the stripes are opposite to each other.

この位相比較処理(図3のステップA13)が終わると、この位相比較処理で判定された結果は逆位相であるかを調べ(ステップA14)、逆位相であれば(ステップA14でYES)、検出対象となるフリッカ周期の光に起因するフリッカが有ると判定、つまり、検出対象となるフリッカ周期の光がフリッカの発生要因となっていると判定するが(ステップA15)、逆位相でなければ(ステップA14でNO)、検出対象となるフリッカ周期の光に起因するフリッカが無いと判定する(ステップA16)。   When this phase comparison process (step A13 in FIG. 3) is completed, it is checked whether the result determined by this phase comparison process is in reverse phase (step A14). If it is in reverse phase (YES in step A14), detection is performed. Although it is determined that there is flicker due to the light with the flicker cycle to be detected, that is, it is determined that the light with the flicker cycle to be detected is the cause of flicker generation (step A15), but is not in reverse phase ( NO in step A14), it is determined that there is no flicker due to the light of the flicker cycle to be detected (step A16).

その後、ステップA17に移り、他に検出すべきフリッカ周期が有るか、つまり、全てのフリッカ周期を検出対象として選択し終わったか(検出対象として未選択のフリッカ周期が存在しているか)を調べる。いま、最初に50Hz電源のフリッカ周期(10ms)を選択した場合には、60Hz電源のフリッカ周期(8.3ms)が未選択であるから(ステップA17でYES)、上述のステップA4に戻り、そのフリッカ周期を検出対象として選択する。以下、この選択したフリッカ周期のN+0.5倍(N=1、2、3、…)を、フリッカ検出用フレームレート(フレーム周期)の候補として決定(ステップA5)した後、上述の動作を繰り返す(ステップA6〜A17)。これによって全てのフリッカ周期を検出対象として選択し終わった場合には(ステップA17でNO)、フリッカ検出用のフレームレートから撮影用のフレームレートに戻す処理(ステップA18)を行った後、図2及び図3のフローから抜け、撮影モード下での他の動作(図示省略)に移る。   Thereafter, the process proceeds to step A17 to check whether there are other flicker cycles to be detected, that is, whether all flicker cycles have been selected as detection targets (whether there are unselected flicker cycles as detection targets). Now, when the flicker cycle (10 ms) of the 50 Hz power supply is selected for the first time, the flicker cycle (8.3 ms) of the 60 Hz power supply is not selected (YES in step A17), so the process returns to the above step A4. A flicker cycle is selected as a detection target. Thereafter, N + 0.5 times the selected flicker cycle (N = 1, 2, 3,...) Is determined as a flicker detection frame rate (frame cycle) candidate (step A5), and then the above operation is repeated. (Steps A6 to A17). When all the flicker periods have been selected as detection targets (NO in step A17), the process of returning from the flicker detection frame rate to the shooting frame rate (step A18) is performed, and then FIG. 3 and the operation moves to another operation (not shown) under the photographing mode.

この場合、上述のフリッカ検出処理によって検出されたフリッカの発生有無及びフリッカの種類(50Hz電源のフリッカ、60Hz電源のフリッカ)に基づいて撮影条件(露光時間など)を変更する処理を行う。これによって露光時間(シャッター速度)は、検出したフリッカの種類(50Hz電源のフリッカ、60Hz電源のフリッカ)に基づいてそのフリッカ周期(10ms、又は8.3ms)の整数倍に変更される。例えば、50Hz電源の環境下ならば、露光時間は、10ms、20ms、30msなどのいずれかに変更され、60Hz電源の環境下ならば、8.3ms、16.7ms、25msなどのいずれかに変更される。この状態において、撮影開始が指示されると、上述の撮影条件で動画撮影を開始する。   In this case, processing for changing shooting conditions (exposure time, etc.) is performed based on the occurrence of flicker detected by the above-described flicker detection processing and the type of flicker (flicker of 50 Hz power supply, flicker of 60 Hz power supply). Thus, the exposure time (shutter speed) is changed to an integral multiple of the flicker cycle (10 ms or 8.3 ms) based on the type of flicker detected (flicker of 50 Hz power supply, flicker of 60 Hz power supply). For example, the exposure time is changed to any one of 10 ms, 20 ms, 30 ms, etc. under a 50 Hz power supply environment, and is changed to any one of 8.3 ms, 16.7 ms, 25 ms, etc. under a 60 Hz power supply environment. Is done. In this state, when the start of shooting is instructed, moving image shooting is started under the above-described shooting conditions.

以上のように、本実施形態において制御部1は、フリッカ検出時における撮影フレームの周期(フリッカ検出用のフレーム周期)を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定した状態において、このフリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差のデータを用いて、この2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを判別し、逆位相であれば、検出対象となるフリッカ周期の光がフリッカの発生要因となっていると判定するようにしたので、動画撮影中(ライブビュー表示中を含む)のフリッカの影響を極力少なくするために画像に生じる縞の強さを小さくしたとしてもより正確にフリッカの発生要因を検出することが可能となる。すなわち、N+0.5倍の間隔にある2つのフレーム画像にフリッカに起因する縞が生じていれば、その縞の位相が逆位相となって180°異なった場合に、画像の明るさの差が最大となるため、例えば、1/3の位相のずれがある2つのフレーム画像を用いる場合に比べて、フリッカ検出が確実なものとなる。   As described above, in the present embodiment, the control unit 1 sets the period of the shooting frame (flicker detection frame period) at the time of flicker detection to N + 0.5 times (N is an integer) the flicker period to be detected. In this state, using the difference data between the two frame images at intervals of N + 0.5 times the flicker period, it is determined whether or not the fringe phase generated in each of the two frame images is opposite in phase. If it is discriminated and the phase is reversed, it is determined that the flicker cycle light to be detected is the cause of flicker. Therefore, the influence of flicker during movie shooting (including live view display) is affected. Even if the intensity of the fringes generated in the image is reduced in order to reduce it as much as possible, it is possible to detect the flicker occurrence factor more accurately. That is, if there are fringes due to flicker in two frame images that are N + 0.5 times apart, the difference in image brightness is different when the phases of the fringes are opposite and 180 ° apart. For example, flicker detection is more reliable than when two frame images having a phase shift of 1/3 are used.

制御部1は、隣接する2つのフレーム画像を対象としてそれらの縞の位相が逆位相であるか否かの判別を行うようにしたので、例えば、1/3の位相のずれがある2つのフレーム画像を用いる場合に比べて、2フレームという短い間隔で2つのフレーム画像の差を比較することが可能となり、フリッカ検出を迅速に行うことができ、被写体のぶれ(被写体と撮像装置との相対的な移動)及び手ぶれによる影響をそれだけ少なくすることもできる。   Since the control unit 1 determines whether or not the phases of the fringes are opposite phases for two adjacent frame images, for example, two frames having a phase shift of 1/3 Compared to the case of using an image, the difference between two frame images can be compared at a short interval of two frames, flicker detection can be performed quickly, and subject blur (relative between the subject and the imaging device) can be detected. And the effects of camera shake can be reduced accordingly.

制御部1は、フリッカ周期のN+0.5倍の間隔にある2つのフレーム画像の各々に生じる縞の位相が逆位相であり、かつ、フリッカ周期のM倍(Mは整数)の間隔にある2つのフレーム画像の各々に生じる縞の位相が同位相であると判別した場合に、検出対象となるフリッカ周期のフリッカ発生要因があると判定するようにしたので、同位相であることを確認(被写体と撮像装置との相対的な移動が無いことを確認)した上で逆位相を確認することができ、被写体の撮像位置が大きく変化した場合のようにフリッカ検出に適さないタイミングを避けてフリッカ検出を行うことができ、フリッカ検出がより一層正確なものとなる。   The control unit 1 has a phase of fringes generated in each of two frame images at an interval of N + 0.5 times the flicker cycle and an antiphase, and is at an interval of M times the flicker cycle (M is an integer). When it is determined that the phase of the fringes generated in each of the two frame images is the same phase, it is determined that there is a flicker generation factor of the flicker cycle to be detected. The phase can be confirmed after confirming that there is no relative movement between the image pickup apparatus and the image pickup device, and flicker detection is avoided by avoiding timing that is not suitable for flicker detection, such as when the image pickup position of the subject changes greatly. And flicker detection becomes even more accurate.

制御部1は、隣接する2つのフレーム画像の各々に生じるフリッカ縞の位相が逆位相であり、かつ、1フレーム隔てた2つのフレーム画像の各々に生じるフリッカ縞の位相が同位相である場合に、検出対象となるフリッカ周期のフリッカ発生要因があると判定するようにしたので、同位相であることを確認してから逆位相を確認する場合でも2フレームという短い間隔で2つのフレーム画像の差を比較することができ、フリッカ検出を迅速に行うことが可能となる。   When the phase of the flicker fringe generated in each of the two adjacent frame images is opposite in phase and the phase of the flicker fringe generated in each of the two frame images separated by one frame is the same phase, the control unit 1 Since it is determined that there is a flicker generation factor of the flicker cycle to be detected, even if the opposite phase is confirmed after confirming that the phase is the same, the difference between the two frame images is as short as two frames. And flicker detection can be performed quickly.

制御部1は、50Hz電源(10ms)、60Hz電源(8.3ms)のように検出対象となるフリッカ周期が複数ある場合、このフリッカ周期毎に、フリッカ検出時における撮影フレームの周期を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定し、検出対象となるフリッカ周期のN+0.5倍の間隔にある2つのフレーム画像の差のデータを用いて、この2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを、検出対象となるフリッカ周期毎にそれぞれ判別するようにしたので、商用電源周波数が異なる環境下でもフリッカ検出用のフレーム周期を共通の「フリッカ周期のN+0.5倍」を用いて設定することが可能となる。   When there are a plurality of flicker periods to be detected such as 50 Hz power supply (10 ms) and 60 Hz power supply (8.3 ms), the control unit 1 determines the period of the shooting frame at the time of flicker detection for each flicker period. Is set to N + 0.5 times the flicker cycle (N is an integer) and the difference between the two frame images at the interval N + 0.5 times the flicker cycle to be detected is used. Whether or not the phase of the fringes generated in each of them is an opposite phase is determined for each flicker cycle to be detected, so that the frame cycle for flicker detection can be shared even under an environment where the commercial power supply frequency is different. It is possible to set using “N + 0.5 times flicker cycle”.

制御部1は、2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを判別する場合に、2つのフレーム画像の明るさの差分を累積し、その累積値を判定用の閾値と比較することにより行うようにしたので、逆位相であるか否かの判別が容易かつ確実なものとなる。   When determining whether or not the phase of the fringes generated in each of the two frame images is opposite in phase, the control unit 1 accumulates the difference in brightness between the two frame images and uses the accumulated value for determination. Since it is performed by comparing with the threshold value, it is easy and reliable to determine whether or not the phase is opposite.

制御部1は、隣接する2つのフレーム画像の明るさの差分の累積値が所定の閾値以上である場合に縞の位相が逆位相であると判別し、1フレーム隔てた2つのフレーム画像の明るさの差分の累積値が所定の閾値未満である場合に縞の位相が同位相であると判別するようにしたので、逆位相であるか同位相であるか判別が容易かつ確実なものとなる。   The control unit 1 determines that the fringe phase is an opposite phase when the cumulative value of the difference in brightness between two adjacent frame images is equal to or greater than a predetermined threshold, and determines the brightness of two frame images separated by one frame. Since the fringe phase is determined to be the same phase when the accumulated difference value is less than the predetermined threshold, it is easy and reliable to determine whether the phase is the opposite phase or the same phase. .

制御部1は、検出対象となるフリッカ周期のN+0.5倍によって求められる複数のフレーム周期のうち、予め設定されている撮影用のフレームレートに相当するフレーム周期に最も近いフレーム周期を、フリッカ検出時における撮影フレームの周期(フリッカ検出用のフレーム周期)として設定するようにしたので、撮影用フレームレートを極力落とさずにフリッカ検出が可能となる。   The control unit 1 performs flicker detection on a frame period closest to a frame period corresponding to a preset shooting frame rate among a plurality of frame periods obtained by N + 0.5 times the flicker period to be detected. Since it is set as the period of the shooting frame at that time (frame period for flicker detection), it is possible to detect flicker without reducing the shooting frame rate as much as possible.

なお、上述した実施形態においては、フリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差のデータ(明るさの差分累積値)を用いて、この2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを判別するようにしたが、図5のフローチャートに示すように、2つのフレーム画像の比のデータ(明るさの比)を用いて、この2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを判別するようにしてもよい。   In the above-described embodiment, the difference data (brightness difference accumulated value) between two frame images at intervals of N + 0.5 times the flicker cycle is used to generate each of the two frame images. Although it is determined whether or not the phase of the fringes is an antiphase, as shown in the flowchart of FIG. 5, the two frames are used by using the ratio data (brightness ratio) of the two frame images. You may make it discriminate | determine whether the phase of the fringe which arises in each of an image is an antiphase.

図5は、本実施形態に変形例として、2つのフレーム画像に発生する縞の位相比較処理(図3のステップA10、A13)における他の例を示したフローチャートである。
まず、制御部1は、図3のステップA1と同様に、フリッカに起因とする縞は、フレーム画像の垂直方向に現れるために、比較対象のそれぞれのフレーム画像を水平ライン毎に積分して垂直方向の明るさ変動データを抽出する(ステップC1)。次に、上述のようにして抽出した2つの明るさ変動データの水平ライン毎の明るさの比を算出し(ステップC2)、算出した水平ライン毎の比データの中から、検出対象となるフリッカ周期のN(整数)倍に相当する範囲をサンプリングして、周波数Nでフーリエスペクトル解析を行う(ステップC3)。
FIG. 5 is a flowchart showing another example of phase comparison processing (steps A10 and A13 in FIG. 3) of fringes generated in two frame images as a modification of the present embodiment.
First, similarly to step A1 in FIG. 3, the control unit 1 integrates each frame image to be compared for each horizontal line in order to cause stripes caused by flicker to appear in the vertical direction of the frame image. Direction brightness variation data is extracted (step C1). Next, the brightness ratio for each horizontal line of the two brightness fluctuation data extracted as described above is calculated (step C2), and the flicker to be detected is detected from the calculated ratio data for each horizontal line. A range corresponding to N (integer) times the period is sampled, and Fourier spectrum analysis is performed at frequency N (step C3).

すなわち、比較対象の2つのフレーム画像を水平ライン毎に積分した値を水平ライン毎に比較して、水平ライン毎の明るさの比を求め、その中からフーリエスペクトル解析の対象となる画像エリアとして、検出対象となるフリッカ周期のN(整数)倍に相当する範囲を特定し、この特定された画像エリア内の複数の比のデータを抽出する。この場合、明るさの変化はフリッカ周期に応じて周期的に現れるために、フリッカ周期10msの検出時には10ms以上、できれば、その2倍以上の整数倍の時間に相当する画像エリアから抽出された比のデータを必要とし、フリッカ周期8.3msの検出時には8.3ms以上、できれば、その2倍以上の整数倍の時間に相当する画像エリア内から抽出された比のデータを必要とする。   In other words, the value obtained by integrating the two frame images to be compared for each horizontal line is compared for each horizontal line, and the brightness ratio for each horizontal line is obtained. A range corresponding to N (integer) times the flicker period to be detected is specified, and data of a plurality of ratios in the specified image area are extracted. In this case, since a change in brightness periodically appears according to the flicker cycle, the ratio extracted from the image area corresponding to an integral multiple of 10 ms or more, preferably twice or more of the time when the flicker cycle is 10 ms is detected. When the flicker cycle is detected at 8.3 ms, data of a ratio extracted from the image area corresponding to an integral multiple of 8.3 ms or more, preferably twice or more of that time is required.

そして、この画像エリア内から抽出した比のデータの垂直方向の明るさ変化(明るさ比の変動データ)を、フリッカ周期に対応する周波数N(N=1、2、3、…の整数)でフーリエスペクトル解析してスペクトル化する(画像エリア全体を1周期とした場合に、その何倍の周波数に対応する周波数成分が含まれているかを解析する)。このフーリエスペクトル解析の結果、周波数Nのスペクトル値と予め設定されている第3の閾値(同位相判定用の基準値)とを比較し、周波数Nのスペクトル値は第3の閾値以下であるかを判別する(ステップC4)。   Then, the brightness change in the vertical direction (brightness ratio fluctuation data) of the ratio data extracted from the image area is represented by the frequency N (N = 1, 2, 3,... Integer) corresponding to the flicker cycle. The spectrum is analyzed by Fourier spectrum analysis (analyze how many times the frequency component corresponding to the frequency is included when the entire image area is one period). As a result of the Fourier spectrum analysis, the spectrum value of frequency N is compared with a preset third threshold value (reference value for in-phase determination), and is the spectrum value of frequency N equal to or less than the third threshold value? Is discriminated (step C4).

周波数Nのスペクトル値が第1閾値以下であれば(ステップC3でYES)、2つのフレーム画像に生じる縞の位相は同位相であると判定する(ステップC8)。一方、周波数Nのスペクトル値が第1閾値以下でなければ(ステップC4でNO)、周波数Nのスペクトル値と予め設定されている第4閾値(逆位相判定用の基準値)とを比較し、周波数Nのスペクトル値は第4閾値以上であるかを調べる(ステップC5)。ここで、第4閾値以上であれば(ステップC5でYES)、2つのフレーム画像に生じる縞の位相は逆位相であると判定する(ステップC6)。なお、周波数Nのスペクトル値が第3閾値よりも大きく(ステップC4でNO)、かつ第4閾値よりも小さければ(ステップC5でNO)、同位相、逆位相以外であると判定する(ステップC7)。   If the spectrum value of the frequency N is less than or equal to the first threshold value (YES in step C3), it is determined that the phase of the fringes generated in the two frame images is the same phase (step C8). On the other hand, if the spectrum value of frequency N is not less than or equal to the first threshold value (NO in step C4), the spectrum value of frequency N is compared with a preset fourth threshold value (reference value for antiphase determination), It is checked whether the spectrum value of the frequency N is greater than or equal to the fourth threshold value (step C5). Here, if it is greater than or equal to the fourth threshold value (YES in step C5), it is determined that the phase of the fringes generated in the two frame images is opposite (step C6). If the spectrum value of frequency N is larger than the third threshold value (NO in step C4) and smaller than the fourth threshold value (NO in step C5), it is determined that the phase is other than in-phase and anti-phase (step C7). ).

このように2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを判別する場合に、2つの画像の明るさの比をフーリエスペクトル解析し、フリッカ周期に対応するフーリエスペクトル値を判定用の閾値と比較するようにすれば、被写体そのものの明るさが垂直方向に対して周期的に変動するような場合であっても逆位相か否かを精度良く判定することができる。   In this way, when determining whether or not the phase of the fringes generated in each of the two frame images is opposite, the ratio of the brightness of the two images is subjected to Fourier spectrum analysis, and the Fourier spectrum value corresponding to the flicker period Is compared with the threshold for determination, it is possible to accurately determine whether or not the subject is in reverse phase even when the brightness of the subject itself periodically varies in the vertical direction.

また、隣接する2つの画像の明るさの比のフーリエスペクトル値が所定の閾値以上である場合にフリッカ縞の位相が逆位相であると判別し、1フレーム隔てた2つのフレーム画像の比のフーリエスペクトル値が所定の閾値未満である場合にフリッカ縞の位相が同位相であると判別するようにすれば、逆位相であるか同位相であるか判別が容易かつ確実なものとなる。   Further, when the Fourier spectrum value of the brightness ratio of two adjacent images is equal to or greater than a predetermined threshold, it is determined that the phase of the flicker fringe is opposite, and the Fourier of the ratio of the two frame images separated by one frame. If it is determined that the phase of the flicker fringe is the same phase when the spectrum value is less than the predetermined threshold value, it is easy and reliable to determine whether the phase is the opposite phase or the same phase.

上述した実施形態においては、検出対象としてフリッカ周期が50Hz電源(10ms)、60Hz電源(8.3ms)のうち、その一方のフリッカ周期(例えば、10ms)に対するフリッカ検出を行ってから他方のフリッカ周期(例えば、8.3ms)するフリッカ検出を行うようにしたが、これに限らず、以下のようにしてもよい。すなわち、前回の電源オン時に検出された前回のフリッカ検出結果を電源オフ後も記憶保持している状態において、今回の電源オン時に前回のフリッカ検出結果を読み出し、前回の検出結果が50Hzフリッカ有りの場合(50Hz電源のフリッカ周期によるフリッカが有りと判断された場合)には、50Hz電源のフリッカ周期を検出対象として選択し、前回の検出結果が60Hzフリッカ有りの場合(60Hz電源のフリッカ周期によるフリッカが有りと判断された場合)には、60Hz電源のフリッカ周期を検出対象として選択して、フリッカ検出を行うようにしてもよい。このように前回の検出結果を参照して今回の検出対象を選択するようにすれば、今回の電源オン時には前回に引き続いてフリッカの発生を抑えることが可能となる。   In the above-described embodiment, the flicker cycle is 50 Hz power source (10 ms) and 60 Hz power source (8.3 ms) as a detection target, and flicker detection is performed for one flicker cycle (for example, 10 ms), and then the other flicker cycle. Flicker detection (for example, 8.3 ms) is performed. However, the present invention is not limited to this, and the following may be performed. That is, in the state where the previous flicker detection result detected at the previous power on is stored and retained after the power is turned off, the previous flicker detection result is read at the current power on, and the previous detection result is 50 Hz flicker present. If the flicker cycle of the 50 Hz power supply is determined to be present, the flicker cycle of the 50 Hz power supply is selected as the detection target, and if the previous detection result is 60 Hz flicker (the flicker due to the flicker cycle of the 60 Hz power supply). If it is determined that there is a flicker), the flicker cycle of the 60 Hz power supply may be selected as a detection target to perform flicker detection. Thus, by selecting the current detection target with reference to the previous detection result, it is possible to suppress the occurrence of flicker following the previous time when the power is turned on this time.

また、上述した実施形態においては、撮像装置としてデジタルカメラに適用した場合を示したが、これに限らず、カメラ機能付きパーソナルコンピュータ・PDA(個人向け携帯型情報通信機器)・タブレット端末装置・スマートフォンなどの携帯電話機・電子ゲーム・音楽プレイヤーなどであってもよい。   In the above-described embodiment, the case where the present invention is applied to a digital camera as an imaging device has been described. However, the present invention is not limited thereto, and a personal computer with a camera function, a PDA (personal portable information communication device), a tablet terminal device, and a smartphone. It may be a mobile phone, an electronic game, a music player, or the like.

また、上述した実施形態において示した“装置”や“部”とは、機能別に複数の筐体に分離されていてもよく、単一の筐体に限らない。また、上述したフローチャートに記述した各ステップは、時系列的な処理に限らず、複数のステップを並列的に処理したり、別個独立して処理したりするようにしてもよい。   Further, the “apparatus” and “unit” shown in the above-described embodiments may be separated into a plurality of cases by function, and are not limited to a single case. In addition, each step described in the above-described flowchart is not limited to time-series processing, and a plurality of steps may be processed in parallel or separately.

以上、この発明の実施形態について説明したが、この発明は、これに限定されるものではなく、特許請求の範囲に記載された発明とその均等の範囲を含むものである。
以下、本願出願の特許請求の範囲に記載された発明を付記する。
(付記)
(請求項1)
請求項1に記載の発明は、
ローリングシャッタ方式の撮像素子を備えた撮像装置において、
フリッカ検出時における撮影フレームの周期を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定する設定手段と、
前記設定手段によって設定されたフリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差又は比の情報を用いて、この2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを判別する判別手段と、
前記判別手段によって逆位相であると判別された場合に、検出対象となるフリッカ周期の光がフリッカの発生要因となっていると判定する判定手段と、
を備えることを特徴とする。
(請求項2)
請求項2に記載の発明は、請求項1に記載の撮像装置において、
前記判別手段は、隣接する2つのフレーム画像を対象としてそれらの縞の位相が逆位相であるか否かの判別を行う、
ことを特徴とする。
(請求項3)
請求項3に記載の発明は、請求項1又は2に記載の撮像装置において、
前記判定手段は、前記判別手段によってフリッカ周期のN+0.5倍の間隔にある2つのフレーム画像の各々に生じる縞の位相が逆位相であり、かつ、フリッカ周期のM倍(Mは整数)の間隔にある2つのフレーム画像の各々に生じる縞の位相が同位相であると判別された場合に、検出対象となるフリッカ周期のフリッカ発生要因があると判定する、
ことを特徴とする。
(請求項4)
請求項4に記載の発明は、請求項3に記載の撮像装置において、
前記判定手段は、前記判別手段によって隣接する2つのフレーム画像の各々に生じるフリッカ縞の位相が逆位相であり、かつ、1フレーム隔てた2つのフレーム画像の各々に生じるフリッカ縞の位相が同位相であると判別された場合に、検出対象となるフリッカ周期のフリッカ発生要因があると判定する、
ことを特徴とする。
(請求項5)
請求項5に記載の発明は、請求項1乃至4のいずれか1項に記載の撮像装置において、
前記設定手段は、検出対象となるフリッカ周期が複数ある場合に、このフリッカ周期毎に、フリッカ検出時における撮影フレームの周期を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定し、
前記判別手段は、前記設定手段によって検出対象となるフリッカ周期毎に設定されたフリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差又は比の情報を用いて、この2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを、検出対象となるフリッカ周期毎にそれぞれ判別する、
ことを特徴とする。
(請求項6)
請求項6に記載の発明は、請求項1乃至5のいずれか1項に記載の撮像装置において、
前記判別手段は、2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを判別する場合に、2つのフレーム画像の明るさの差分を累積し、その累積値を判定用の閾値と比較することにより行う、
ことを特徴とする。
(請求項7)
請求項7に記載の発明は、請求項6に記載の撮像装置において、
前記判別手段は、隣接する2つのフレーム画像の明るさの差分の累積値が所定の閾値以上である場合に縞の位相が逆位相であると判別し、1フレーム隔てた2つのフレーム画像の明るさの差分の累積値が所定の閾値未満である場合に縞の位相が同位相であると判別する、
ことを特徴とする。
(請求項8)
請求項8に記載の発明は、請求項1乃至7のいずれか1項に記載の撮像装置において、
前記判別手段は、2つの画像の明るさの比をフーリエスペクトル解析し、フリッカ周期に対応するフーリエスペクトル値を判定用の閾値と比較することにより行う、
ことを特徴とする。
(請求項9)
請求項9に記載の発明は、請求項8に記載の撮像装置において、
前記判別手段は、隣接する2つの画像の明るさの比のフーリエスペクトル値が所定の閾値以上である場合にフリッカ縞の位相が逆位相であると判別し、1フレーム隔てた2つのフレーム画像の比のフーリエスペクトル値が所定の閾値未満である場合にフリッカ縞の位相が同位相であると判別する、
ことを特徴とする。
(請求項10)
請求項10に記載の発明は、請求項1乃至9のいずれか1項に記載の撮像装置において、
前記設定手段は、検出対象となるフリッカ周期のN+0.5倍によって求められる複数のフレーム周期のうち、予め設定されている撮影用のフレームレートに相当するフレーム周期に最も近いフレーム周期を、フリッカ検出時における撮影フレームの周期として設定する、
ことを特徴とする。
(請求項11)
請求項11に記載の発明は、
ローリングシャッタ方式の撮像素子を備えた撮像装置におけるフリッカ検出方法であって、
フリッカ検出時における撮影フレームの周期を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定する処理と、
前記設定されたフリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差又は比の情報を用いて、この2つのフレーム画像の各々に生じるフリッカ縞の位相が逆位相であるか否かを判別する処理と、
前記逆位相であると判別された場合に、検出対象となるフリッカ周期の光がフリッカの発生要因となっていると判定する処理と、
を含むことを特徴とする。
(請求項12)
請求項12に記載の発明は、
ローリングシャッタ方式の撮像素子を備えた撮像装置のコンピュータに対して、
フリッカ検出時における撮影フレームの周期を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定する機能と、
前記設定されたフリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差又は比の情報を用いて、この2つのフレーム画像の各々に生じるフリッカ縞の位相が逆位相であるか否かを判別する機能と、
前記逆位相であると判別された場合に、検出対象となるフリッカ周期の光がフリッカの発生要因となっていると判定する機能と、
を実現させるためのプログラムである。
The embodiment of the present invention has been described above. However, the present invention is not limited to this, and includes the invention described in the claims and the equivalent scope thereof.
Hereinafter, the invention described in the claims of the present application will be appended.
(Appendix)
(Claim 1)
The invention described in claim 1
In an imaging device including a rolling shutter type imaging device,
Setting means for setting the period of the shooting frame at the time of flicker detection to N + 0.5 times (N is an integer) the flicker period to be detected;
Using the information of the difference or ratio between the two frame images at an interval of N + 0.5 times the flicker period set by the setting means, the fringe phase generated in each of the two frame images is opposite in phase. Determination means for determining whether or not,
Determining means for determining that the light of the flicker cycle to be detected is a cause of flicker when the determining means determines that the phase is opposite;
It is characterized by providing.
(Claim 2)
The invention according to claim 2 is the imaging apparatus according to claim 1,
The determination means determines whether or not the phase of the fringes is an opposite phase for two adjacent frame images.
It is characterized by that.
(Claim 3)
The invention according to claim 3 is the imaging apparatus according to claim 1 or 2,
The determination means has a phase of fringes generated in each of two frame images at an interval of N + 0.5 times the flicker period by the determination means, and is M times the flicker period (M is an integer). When it is determined that the phase of the fringes generated in each of the two frame images at the interval is the same phase, it is determined that there is a flicker generation factor of the flicker cycle to be detected.
It is characterized by that.
(Claim 4)
The invention according to claim 4 is the imaging apparatus according to claim 3,
The determination means is such that the phase of flicker fringes generated in each of two adjacent frame images by the determination means is opposite in phase, and the phase of flicker fringes generated in each of two frame images separated by one frame is the same phase. If it is determined that there is a flicker occurrence factor of the flicker cycle to be detected,
It is characterized by that.
(Claim 5)
The invention according to claim 5 is the imaging apparatus according to any one of claims 1 to 4,
When there are a plurality of flicker periods to be detected, the setting means sets the period of the shooting frame at the time of flicker detection to N + 0.5 times the flicker period to be detected (N is an integer) for each flicker period. Set,
The discriminating means uses the information of the difference or ratio between the two frame images at intervals of N + 0.5 times the flicker period set for each flicker period to be detected by the setting means. Whether or not the fringe phase generated in each of the images is an opposite phase is determined for each flicker cycle to be detected,
It is characterized by that.
(Claim 6)
The invention according to claim 6 is the imaging apparatus according to any one of claims 1 to 5,
When determining whether or not the phase of the fringes generated in each of the two frame images is opposite in phase, the determining unit accumulates the difference in brightness between the two frame images and uses the accumulated value for determination. By comparing with the threshold,
It is characterized by that.
(Claim 7)
The invention according to claim 7 is the imaging apparatus according to claim 6,
The discriminating unit discriminates that the fringe phase is in the opposite phase when the cumulative value of the brightness difference between two adjacent frame images is equal to or greater than a predetermined threshold value, and determines the brightness of two frame images separated by one frame. Determining that the fringe phase is the same phase when the cumulative value of the difference is less than a predetermined threshold,
It is characterized by that.
(Claim 8)
The invention according to claim 8 is the imaging apparatus according to any one of claims 1 to 7,
The discrimination means performs a Fourier spectrum analysis on the ratio of the brightness of the two images, and compares the Fourier spectrum value corresponding to the flicker period with a threshold for determination.
It is characterized by that.
(Claim 9)
The invention according to claim 9 is the imaging apparatus according to claim 8,
The discriminating unit discriminates that the phase of the flicker fringe is opposite in phase when the Fourier spectrum value of the brightness ratio of two adjacent images is equal to or greater than a predetermined threshold value, and the two frame images separated by one frame are identified. When the Fourier spectrum value of the ratio is less than a predetermined threshold, it is determined that the phase of the flicker fringe is the same phase.
It is characterized by that.
(Claim 10)
According to a tenth aspect of the present invention, in the imaging apparatus according to any one of the first to ninth aspects,
The setting means detects a flicker that is closest to a frame period corresponding to a preset frame rate for photographing among a plurality of frame periods obtained by N + 0.5 times the flicker period to be detected. Set as shooting frame period at time,
It is characterized by that.
(Claim 11)
The invention according to claim 11
A flicker detection method in an imaging device including a rolling shutter type imaging device,
A process of setting the period of the shooting frame at the time of flicker detection to N + 0.5 times (N is an integer) the flicker period to be detected;
Whether or not the phase of the flicker fringes generated in each of the two frame images is opposite in phase using the information on the difference or ratio of the two frame images at an interval of N + 0.5 times the set flicker period. Processing to determine whether or not
When it is determined that the phase is opposite, a process for determining that light having a flicker period to be detected is a flicker occurrence factor;
It is characterized by including.
(Claim 12)
The invention according to claim 12
For a computer of an image pickup apparatus having a rolling shutter type image pickup device,
A function for setting the period of the photographing frame at the time of flicker detection to N + 0.5 times (N is an integer) the flicker period to be detected;
Whether or not the phase of the flicker fringes generated in each of the two frame images is opposite in phase using the information on the difference or ratio of the two frame images at an interval of N + 0.5 times the set flicker period. A function to determine whether or not
A function for determining that the light of the flicker cycle to be detected is a cause of flicker when it is determined that the phase is opposite;
It is a program for realizing.

1 制御部
3 記憶部
3A プログラムメモリ
3B ワークメモリ
4 操作部
6 撮像部
6E 撮像素子
DESCRIPTION OF SYMBOLS 1 Control part 3 Memory | storage part 3A Program memory 3B Work memory 4 Operation part 6 Imaging part 6E Imaging element

Claims (12)

ローリングシャッタ方式の撮像素子を備えた撮像装置において、
フリッカ検出時における撮影フレームの周期を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定する設定手段と、
前記設定手段によって設定されたフリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差又は比の情報を用いて、この2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを判別する判別手段と、
前記判別手段によって逆位相であると判別された場合に、検出対象となるフリッカ周期の光がフリッカの発生要因となっていると判定する判定手段と、
を備えることを特徴とする撮像装置。
In an imaging device including a rolling shutter type imaging device,
Setting means for setting the period of the shooting frame at the time of flicker detection to N + 0.5 times (N is an integer) the flicker period to be detected;
Using the information of the difference or ratio between the two frame images at an interval of N + 0.5 times the flicker period set by the setting means, the fringe phase generated in each of the two frame images is opposite in phase. Determination means for determining whether or not,
Determining means for determining that the light of the flicker cycle to be detected is a cause of flicker when the determining means determines that the phase is opposite;
An imaging apparatus comprising:
前記判別手段は、隣接する2つのフレーム画像を対象としてそれらの縞の位相が逆位相であるか否かの判別を行う、
ことを特徴とする請求項1に記載の撮像装置。
The determination means determines whether or not the phase of the fringes is an opposite phase for two adjacent frame images.
The imaging apparatus according to claim 1.
前記判定手段は、前記判別手段によってフリッカ周期のN+0.5倍の間隔にある2つのフレーム画像の各々に生じる縞の位相が逆位相であり、かつ、フリッカ周期のM倍(Mは整数)の間隔にある2つのフレーム画像の各々に生じる縞の位相が同位相であると判別された場合に、検出対象となるフリッカ周期のフリッカ発生要因があると判定する、
ことを特徴とする請求項1又は2に記載の撮像装置。
The determination means has a phase of fringes generated in each of two frame images at an interval of N + 0.5 times the flicker period by the determination means, and is M times the flicker period (M is an integer). When it is determined that the phase of the fringes generated in each of the two frame images at the interval is the same phase, it is determined that there is a flicker generation factor of the flicker cycle to be detected.
The imaging apparatus according to claim 1 or 2, wherein
前記判定手段は、前記判別手段によって隣接する2つのフレーム画像の各々に生じるフリッカ縞の位相が逆位相であり、かつ、1フレーム隔てた2つのフレーム画像の各々に生じるフリッカ縞の位相が同位相であると判別された場合に、検出対象となるフリッカ周期のフリッカ発生要因があると判定する、
ことを特徴とする請求項3に記載の撮像装置。
The determination means is such that the phase of flicker fringes generated in each of two adjacent frame images by the determination means is opposite in phase, and the phase of flicker fringes generated in each of two frame images separated by one frame is the same phase. If it is determined that there is a flicker occurrence factor of the flicker cycle to be detected,
The imaging apparatus according to claim 3.
前記設定手段は、検出対象となるフリッカ周期が複数ある場合に、このフリッカ周期毎に、フリッカ検出時における撮影フレームの周期を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定し、
前記判別手段は、前記設定手段によって検出対象となるフリッカ周期毎に設定されたフリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差又は比の情報を用いて、この2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを、検出対象となるフリッカ周期毎にそれぞれ判別する、
ことを特徴とする請求項1乃至4のいずれか1項に記載の撮像装置。
When there are a plurality of flicker periods to be detected, the setting means sets the period of the shooting frame at the time of flicker detection to N + 0.5 times the flicker period to be detected (N is an integer) for each flicker period. Set,
The discriminating means uses the information of the difference or ratio between the two frame images at intervals of N + 0.5 times the flicker period set for each flicker period to be detected by the setting means. Whether or not the fringe phase generated in each of the images is an opposite phase is determined for each flicker cycle to be detected,
The image pickup apparatus according to claim 1, wherein the image pickup apparatus is an image pickup apparatus.
前記判別手段は、2つのフレーム画像の各々に生じる縞の位相が逆位相であるか否かを判別する場合に、2つのフレーム画像の明るさの差分を累積し、その累積値を判定用の閾値と比較することにより行う、
ことを特徴とする請求項1乃至5のいずれか1項に記載の撮像装置。
When determining whether or not the phase of the fringes generated in each of the two frame images is opposite in phase, the determining unit accumulates the difference in brightness between the two frame images and uses the accumulated value for determination. By comparing with the threshold,
The imaging apparatus according to any one of claims 1 to 5, wherein
前記判別手段は、隣接する2つのフレーム画像の明るさの差分の累積値が所定の閾値以上である場合に縞の位相が逆位相であると判別し、1フレーム隔てた2つのフレーム画像の明るさの差分の累積値が所定の閾値未満である場合に縞の位相が同位相であると判別する、
ことを特徴とする請求項6に記載の撮像装置。
The discriminating unit discriminates that the fringe phase is in the opposite phase when the cumulative value of the brightness difference between two adjacent frame images is equal to or greater than a predetermined threshold value, and determines the brightness of two frame images separated by one frame. Determining that the fringe phase is the same phase when the cumulative value of the difference is less than a predetermined threshold,
The imaging apparatus according to claim 6.
前記判別手段は、2つの画像の明るさの比をフーリエスペクトル解析し、フリッカ周期に対応するフーリエスペクトル値を判定用の閾値と比較することにより行う、
ことを特徴とする請求項1乃至7のいずれか1項に記載の撮像装置。
The discrimination means performs a Fourier spectrum analysis on the ratio of the brightness of the two images, and compares the Fourier spectrum value corresponding to the flicker period with a threshold for determination.
The image pickup apparatus according to claim 1, wherein the image pickup apparatus is an image pickup apparatus.
前記判別手段は、隣接する2つの画像の明るさの比のフーリエスペクトル値が所定の閾値以上である場合にフリッカ縞の位相が逆位相であると判別し、1フレーム隔てた2つのフレーム画像の比のフーリエスペクトル値が所定の閾値未満である場合にフリッカ縞の位相が同位相であると判別する、
ことを特徴とする請求項8に記載の撮像装置。
The discriminating unit discriminates that the phase of the flicker fringe is opposite in phase when the Fourier spectrum value of the brightness ratio of two adjacent images is equal to or greater than a predetermined threshold value, and the two frame images separated by one frame are identified. When the Fourier spectrum value of the ratio is less than a predetermined threshold, it is determined that the phase of the flicker fringe is the same phase.
The imaging apparatus according to claim 8.
前記設定手段は、検出対象となるフリッカ周期のN+0.5倍によって求められる複数のフレーム周期のうち、予め設定されている撮影用のフレームレートに相当するフレーム周期に最も近いフレーム周期を、フリッカ検出時における撮影フレームの周期として設定する、
ことを特徴とする請求項1乃至9のいずれか1項に記載の撮像装置。
The setting means detects a flicker that is closest to a frame period corresponding to a preset frame rate for photographing among a plurality of frame periods obtained by N + 0.5 times the flicker period to be detected. Set as shooting frame period at time,
The image pickup apparatus according to claim 1, wherein the image pickup apparatus is an image pickup apparatus.
ローリングシャッタ方式の撮像素子を備えた撮像装置におけるフリッカ検出方法であって、
フリッカ検出時における撮影フレームの周期を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定する処理と、
前記設定されたフリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差又は比の情報を用いて、この2つのフレーム画像の各々に生じるフリッカ縞の位相が逆位相であるか否かを判別する処理と、
前記逆位相であると判別された場合に、検出対象となるフリッカ周期の光がフリッカの発生要因となっていると判定する処理と、
を含むことを特徴とするフリッカ検出方法。
A flicker detection method in an imaging device including a rolling shutter type imaging device,
A process of setting the period of the shooting frame at the time of flicker detection to N + 0.5 times (N is an integer) the flicker period to be detected;
Whether or not the phase of the flicker fringes generated in each of the two frame images is opposite in phase using the information on the difference or ratio of the two frame images at an interval of N + 0.5 times the set flicker period. Processing to determine whether or not
When it is determined that the phase is opposite, a process for determining that light having a flicker period to be detected is a flicker occurrence factor;
A flicker detection method comprising:
ローリングシャッタ方式の撮像素子を備えた撮像装置のコンピュータに対して、
フリッカ検出時における撮影フレームの周期を、検出対象となるフリッカ周期のN+0.5倍(Nは整数)に設定する機能と、
前記設定されたフリッカの周期のN+0.5倍の間隔にある2つのフレーム画像の差又は比の情報を用いて、この2つのフレーム画像の各々に生じるフリッカ縞の位相が逆位相であるか否かを判別する機能と、
前記逆位相であると判別された場合に、検出対象となるフリッカ周期の光がフリッカの発生要因となっていると判定する機能と、
を実現させるためのプログラム。
For a computer of an image pickup apparatus having a rolling shutter type image pickup device,
A function for setting the period of the photographing frame at the time of flicker detection to N + 0.5 times (N is an integer) the flicker period to be detected;
Whether or not the phase of the flicker fringes generated in each of the two frame images is opposite in phase using the information on the difference or ratio of the two frame images at an interval of N + 0.5 times the set flicker period. A function to determine whether or not
A function for determining that the light of the flicker cycle to be detected is a cause of flicker when it is determined that the phase is opposite;
A program to realize
JP2015214173A 2015-10-30 2015-10-30 Imaging apparatus, flicker detection method, and program Pending JP2017085462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015214173A JP2017085462A (en) 2015-10-30 2015-10-30 Imaging apparatus, flicker detection method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015214173A JP2017085462A (en) 2015-10-30 2015-10-30 Imaging apparatus, flicker detection method, and program

Publications (1)

Publication Number Publication Date
JP2017085462A true JP2017085462A (en) 2017-05-18

Family

ID=58713495

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015214173A Pending JP2017085462A (en) 2015-10-30 2015-10-30 Imaging apparatus, flicker detection method, and program

Country Status (1)

Country Link
JP (1) JP2017085462A (en)

Similar Documents

Publication Publication Date Title
JP6304605B2 (en) Imaging apparatus, flicker detection method, and program
KR102587377B1 (en) Imaging apparatus, flicker detection method, and program
US9794493B2 (en) Image capturing apparatus, image capturing method, and control method
US9854178B2 (en) Image pickup apparatus with flicker detection and having plurality of unit pixel areas, control method therefor, and storage medium
US9875423B2 (en) Image pickup apparatus that calculates light amount change characteristic, electronic apparatus, and method of calculating light amount change characteristic
JP4912113B2 (en) Light source state detection apparatus and method, and imaging apparatus
KR101889932B1 (en) Apparatus and Method for photographing image
JP2018093275A (en) Imaging apparatus and flicker determination method
US10447923B2 (en) Image processing apparatus, imaging apparatus, and method of controlling image processing apparatus
US9338368B2 (en) Imaging apparatus, method of detecting flicker, and information processing unit
JP2016213661A (en) Imaging apparatus, method for detecting change in quantity of light and program
JP2017069741A (en) Imaging apparatus, flicker detection method and program
US11627261B2 (en) Image capturing apparatus capable of detecting flicker due to periodic change in light amount of object, flicker detecting method, and non-transitory computer-readable storage medium
JP2015144346A (en) Imaging apparatus, imaging method and program
US10694127B2 (en) Image capturing apparatus, control method, and storage medium for reducing the sense of incongruity felt by a laser
JP2017092609A (en) Imaging apparatus, flicker detection method and program
JP2017169027A (en) Flash band determination device, control method therefor, and control program, and imaging device
JP2017085462A (en) Imaging apparatus, flicker detection method, and program
US20220159190A1 (en) Image processing device, image processing method, program, and imaging device
JP6597960B2 (en) Imaging apparatus, flicker detection method, and program
JPWO2016181626A1 (en) Imaging device
US11843872B2 (en) Imaging apparatus, flicker detection method, and storage medium
JP6631649B2 (en) Imaging device
KR101864318B1 (en) Apparatus and method for processing monitoring image
US20220337736A1 (en) Image capturing apparatus, control method thereof, and storage medium