JP2019149701A - Imaging apparatus and control method of the same - Google Patents

Imaging apparatus and control method of the same Download PDF

Info

Publication number
JP2019149701A
JP2019149701A JP2018033447A JP2018033447A JP2019149701A JP 2019149701 A JP2019149701 A JP 2019149701A JP 2018033447 A JP2018033447 A JP 2018033447A JP 2018033447 A JP2018033447 A JP 2018033447A JP 2019149701 A JP2019149701 A JP 2019149701A
Authority
JP
Japan
Prior art keywords
signal
optical flow
imaging
image
holding unit
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
JP2018033447A
Other languages
Japanese (ja)
Inventor
武志 内田
Takeshi Uchida
武志 内田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2018033447A priority Critical patent/JP2019149701A/en
Priority to US16/031,470 priority patent/US20190026902A1/en
Publication of JP2019149701A publication Critical patent/JP2019149701A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Adjustment Of Camera Lenses (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)
  • Studio Devices (AREA)

Abstract

To obtain an optical flow with high accuracy without making a user feel a sense of disparity.SOLUTION: The imaging apparatus includes an imaging device and control means. The control means includes: first and second image signal generation means for generating first and second image signals by performing signal charge transfer n times during first and second imaging periods; first and second averaging means for generating third and fourth image signals in which luminance values of respective pixel units are averaged with respect to the first and second image signals; optical flow candidate calculating means for comparing the first and second image signals to calculate a plurality of optical flow candidates; approximate optical flow calculating means for calculating an approximate optical flow by comparing to the third and fourth image signals; and optical flow estimation means for estimating one optical flow candidate closest to an approximate optical flow among multiple optical flow candidates as a final optical flow.SELECTED DRAWING: Figure 10

Description

本発明は、撮像素子からの信号に基づき、オプティカルフローを算出する機能を有する撮像装置およびその制御方法に関する。   The present invention relates to an imaging apparatus having a function of calculating an optical flow based on a signal from an imaging element, and a control method therefor.

近年、撮像素子の高機能化が進展しており、画素数、フレームレートの向上などが図られている。この信号を利用して複数の画像間で対象物の動きを示すベクトルデータ(オプティカルフロー)を求める方法が知られている。オプティカルフローは、例えば、動画撮影における、手振れの量・方向を示す指標となり、大きめに撮影した画像からの画像切り出しによる電子防振においての切り出し量・方向の算出などに用いられる。また、動く被写体の移動方向・速度を推定する指標となり、オートフォーカスの追従等にも利用される。   In recent years, higher functionality of image sensors has been developed, and the number of pixels and the frame rate have been improved. A method for obtaining vector data (optical flow) indicating the movement of an object between a plurality of images using this signal is known. The optical flow serves as an index indicating the amount and direction of camera shake in moving image shooting, for example, and is used for calculating the cutout amount and direction in electronic image stabilization by cutting out an image from a larger image. It is also an index for estimating the moving direction and speed of a moving subject, and is also used for autofocus tracking.

オプティカルフローの取得は、動画における前後コマの画像間における対象物の移動量・方向を、画像同士の比較を行うことによって算出し、取得される。このとき、被写体や手振れの動きが速く、1コマの露光時間中に対象物が大きく移動してしまうと、露光の結果得られる対象物の画像が移動方向にぼやけてしまう。ぼやけた対象物の画像同士を比較すると、対象物の画像の輪郭が明確でないため、位置の比較が正確にできずに、画像間の対象物の移動量、移動方向であるオプティカルフローを精密に求めることができない問題がある。   The acquisition of the optical flow is obtained by calculating the movement amount / direction of the object between the images of the front and back frames in the moving image by comparing the images. At this time, the subject and camera shake are fast, and if the object moves greatly during the exposure time of one frame, the image of the object obtained as a result of exposure blurs in the moving direction. When comparing images of blurred objects, the contours of the images of the objects are not clear, so the position cannot be accurately compared, and the optical flow that is the amount and direction of movement of the objects between the images is precisely There are problems that cannot be sought.

特許文献1の撮像装置は、上記問題に対し、撮影対象物の速度に応じて動画撮影時における1フレームあたりのシャッター速度を速く、露光時間を短くすることで、対象物の輪郭が先鋭に写った画像を得ることを提案する。特許文献2の撮像装置は、光電変換部により変換された電荷を蓄積部に複数回転送し、複数回転送された電荷をまとめて蓄積することで、露光時間、露光量などの条件を高速かつ自在に変化させることを提案する。また、これを応用して、1フレーム期間において、短い蓄積期間を1フレーム期間に均等に分散させ、複数回転送された電荷をまとめて蓄積することで動画を得ることも可能である。   With respect to the above problem, the imaging apparatus disclosed in Patent Literature 1 sharpens the outline of the target object by increasing the shutter speed per frame and shortening the exposure time according to the speed of the target object. Propose to get a good image. The imaging apparatus of Patent Document 2 transfers charges converted by the photoelectric conversion unit to the storage unit a plurality of times, and accumulates the charges transferred a plurality of times at a time, so that conditions such as exposure time and exposure amount can be increased at high speed. Propose to change freely. In addition, by applying this, it is also possible to obtain a moving image by distributing a short accumulation period evenly in one frame period and accumulating charges transferred multiple times in one frame period.

特開2010−206522号公報JP 2010-206522 A 特開2010−157893号公報JP 2010-157893 A

特許文献1の撮像装置は、動画撮影中の1コマにおけるシャッター速度を速く、露光時間を短くすることで、動きの速い対象物においても先鋭な画像を得ることができる。しかし、動画撮影においてシャッター速度を速くすることには、次のような欠点がある。一般に、再生された動画に一種のコマ送り的なパラパラ感があると、品位が大きく失われてしまうことが知られている。こういったパラパラ感が出ないようにするためには、一連の撮影において1フレーム期間に近い蓄積時間を設定する必要がある。すなわち、フレームレートが30fpsであれば、1/30秒や1/60秒といった比較的長い露光時間が適切となる。つまり、動画撮影時にシャッター速度を速くし、1フレーム内の露光時間を減らすことで先鋭な画像を得る行為は、上記1フレーム期間に近い比較的長い露光時間を設定することに反し、パラパラ感が出やすい動画となる問題がある。   The imaging apparatus of Patent Document 1 can obtain a sharp image even on a fast moving object by increasing the shutter speed and shortening the exposure time in one frame during moving image shooting. However, increasing the shutter speed in moving image shooting has the following drawbacks. In general, it is known that when a reproduced moving image has a kind of frame-by-frame feeling, quality is greatly lost. In order to prevent such discomfort, it is necessary to set an accumulation time close to one frame period in a series of shootings. That is, if the frame rate is 30 fps, a relatively long exposure time such as 1/30 second or 1/60 second is appropriate. In other words, the act of obtaining a sharp image by increasing the shutter speed during movie shooting and reducing the exposure time within one frame is contrary to setting a relatively long exposure time close to the one frame period described above. There is a problem that the video becomes easy to appear.

また、特許文献2の撮像装置は、1フレーム期間に複数回、短時間の露光・蓄積部への伝送を繰り返して行うことで、光量を抑えつつも比較的長い露光時間の撮影が可能である。また、それにより得られる画像も、複数回露光・蓄積部への伝送により重なりあった画像であるため、特許文献1の撮像装置に比して、動画で見た場合のパラパラ感が少ないものとなる。しかし、特許文献2の撮像装置は、オプティカルフローを得ることを想定していないため、それを精密に得るのに適した複数回分割蓄積方法となっていない。また、特許文献2の撮像装置でオプティカルフローを取得しようとすると、コマ間で画像同士の比較を行う際、これら画像の輪郭は互いに重なり合うことになる。このため、コマ間において共通する輪郭をその中から正確に選びだすことが困難であり、精密な検出ができない問題がある。   In addition, the image pickup apparatus disclosed in Patent Document 2 can perform shooting with a relatively long exposure time while suppressing the amount of light by repeatedly performing transmission to the exposure / accumulation unit for a short time a plurality of times in one frame period. . In addition, since the image obtained thereby is an image that is overlapped by the transmission to the exposure / accumulation unit multiple times, compared to the imaging device of Patent Document 1, there is less sense of parallax when viewed as a moving image. Become. However, since the imaging apparatus of Patent Document 2 does not assume that an optical flow is obtained, it is not a multi-time divided accumulation method suitable for obtaining it accurately. Further, when an optical flow is to be acquired by the imaging apparatus disclosed in Patent Document 2, the contours of these images overlap each other when the images are compared between frames. For this reason, it is difficult to accurately select a common contour between frames, and there is a problem that precise detection cannot be performed.

本発明は、ユーザーにパラパラ感を感じさせず、かつオプティカルフローを高精度で得ることが可能な撮像装置およびその制御方法を提供する。   The present invention provides an imaging apparatus capable of obtaining an optical flow with high accuracy without causing the user to feel a sense of disparity, and a control method therefor.

本発明の例によれば、撮像装置は、複数の画素部を有し、かつ各画素部が光電変換部および信号保持部を含む撮像素子と、前記撮像素子を制御する制御手段と、を備える。前記制御手段は、第1の撮影周期中に、前記光電変換部から前記信号保持部へのn回の信号電荷転送(nは2以上の自然数)により前記信号保持部に蓄積された信号電荷に基づき、第1の画像信号を生成する第1の画像信号生成手段と、第2の撮影周期中に、前記光電変換部から前記信号保持部へのn回の信号電荷転送により前記信号保持部に蓄積された信号電荷に基づき、第2の画像信号を生成する第2の画像信号生成手段と、前記生成された第1の画像信号に対し、各画素部の輝度値をそれに隣接する所定の数の他の画素部の輝度値との平均をとることにより第3の画像信号を生成する第1の平均化手段と、前記生成された第2の画像信号に対し、各画素部の輝度値をそれに隣接する所定の数の他の画素部の輝度値との平均をとることにより第4の画像信号を生成する第2の平均化手段と、前記第1および第2の画像信号を比較することにより、前記第1および第2の撮影周期間に被写体が移動する方向および量を示すベクトルである複数のオプティカルフロー候補を算出するオプティカルフロー候補算出手段と、前記第3および第4の画像信号を比較することにより、前記第1および第2の撮影周期間に前記被写体が移動する概ねの方向および量を示すベクトルである概略オプティカルフローを算出する概略オプティカルフロー算出手段と、前記複数のオプティカルフロー候補のうち前記概略オプティカルフローに最も近い1つのオプティカルフロー候補を最終的なオプティカルフローとして推定するオプティカルフロー推定手段と、を備える。   According to an example of the present invention, an imaging apparatus includes an imaging device having a plurality of pixel units, each pixel unit including a photoelectric conversion unit and a signal holding unit, and a control unit that controls the imaging device. . The control means converts the signal charge accumulated in the signal holding unit by n signal charge transfers (n is a natural number of 2 or more) from the photoelectric conversion unit to the signal holding unit during the first imaging cycle. Based on the first image signal generation means for generating the first image signal and the signal holding unit by n times of signal charge transfer from the photoelectric conversion unit to the signal holding unit during the second imaging cycle. Second image signal generation means for generating a second image signal based on the accumulated signal charge, and a predetermined number of luminance values of each pixel unit adjacent to the generated first image signal First averaging means for generating a third image signal by taking the average of the luminance values of the other pixel portions, and the luminance value of each pixel portion for the generated second image signal. To average the brightness value of a predetermined number of other pixel parts adjacent to it By comparing the first and second image signals with the second averaging means for generating the fourth image signal, the direction and amount of movement of the subject during the first and second imaging periods The subject is moved between the first and second imaging periods by comparing the third and fourth image signals with an optical flow candidate calculating means for calculating a plurality of optical flow candidates that are vectors indicating And a schematic optical flow calculation means for calculating a schematic optical flow which is a vector indicating a general direction and quantity to be processed, and one optical flow candidate closest to the schematic optical flow among the plurality of optical flow candidates is determined as a final optical flow. And an optical flow estimating means for estimating as follows.

本発明の例によれば、ユーザーにパラパラ感を感じさせず、かつオプティカルフローを高精度で得ることが可能な撮像装置及びその制御方法を提供できる。   According to the example of the present invention, it is possible to provide an imaging apparatus capable of obtaining an optical flow with high accuracy and a control method thereof without causing the user to feel a sense of disparity.

デジタルスチルモーションカメラの外観図である。It is an external view of a digital still motion camera. 撮像装置の実施例を示すブロック図である。It is a block diagram which shows the Example of an imaging device. 撮像素子の回路例を示す回路図である。It is a circuit diagram showing an example of a circuit of an image sensor. 撮像素子の駆動シーケンスの例を示すタイミングチャートである。6 is a timing chart illustrating an example of a driving sequence of an image sensor. オプティカルフロー取得手法の例を示す説明図である。It is explanatory drawing which shows the example of the optical flow acquisition method. 第1の比較例における撮像画像を示す図である。It is a figure which shows the captured image in a 1st comparative example. 第2の比較例における撮像画像を示す図である。It is a figure which shows the captured image in the 2nd comparative example. 実施例における撮像画像を示す図である。It is a figure which shows the captured image in an Example. 実施例におけるローパスフィルタ印加後の画像を示す図である。It is a figure which shows the image after a low-pass filter application in an Example. 実施例におけるオプティカルフロー推定フローを示すフローチャートである。It is a flowchart which shows the optical flow estimation flow in an Example. 実施例における露光を不均一なタイミングで行う場合のタイミングチャートである。It is a timing chart in case the exposure in an Example is performed at a nonuniform timing. 実施例における露光を不均一なタイミングで行う場合の撮像例を示す図である。It is a figure which shows the example of an imaging in the case of performing the exposure in an Example at a nonuniform timing.

以下、映像処理装置に撮像のための撮影光学系等を加えた撮像装置を本発明の好適な実施の形態として以下に説明する。   Hereinafter, an imaging apparatus in which a photographing optical system for imaging is added to the video processing apparatus will be described as a preferred embodiment of the present invention.

<撮像装置>
図1(A)および図1(B)は、本発明の実施の形態における撮像装置としてのデジタルスチルモーションカメラの外観図である。図1(A)は、撮像装置の正面図であり、図1(B)は、撮像装置の背面図である。これらの図において、151は、内部に撮像素子やシャッター装置を収納した撮像装置本体である。152は、内部に絞りを有した撮影光学系である。153は、撮影情報や映像を表示するための可動式表示部である。154は、主に静止画の撮影を行うために使用するスイッチSTである。155は、動画撮影を開始および停止するための釦であるスイッチMVである。表示部153は、ダイナミックレンジの広い映像もその輝度範囲を抑制することなく表示できるだけの表示輝度範囲を有する。156は、撮影モードを選択するための撮影モード選択レバーである。157は、撮像装置の機能設定を行う機能設定モードへ移行するためのメニュー釦である。158および159は、各種の設定値を変更するためのアップダウンスイッチである。160は、各種の設定値を変更するためのダイアルである。161は、撮像装置本体内に収納されている記録媒体に記録されている映像を表示部153上で再生する再生モードへ移行するための再生ボタンである。
<Imaging device>
1A and 1B are external views of a digital still motion camera as an imaging device according to an embodiment of the present invention. 1A is a front view of the imaging device, and FIG. 1B is a rear view of the imaging device. In these drawings, reference numeral 151 denotes an image pickup apparatus main body in which an image pickup element and a shutter device are housed. Reference numeral 152 denotes a photographing optical system having an aperture inside. Reference numeral 153 denotes a movable display unit for displaying shooting information and video. Reference numeral 154 denotes a switch ST used mainly for photographing a still image. Reference numeral 155 denotes a switch MV which is a button for starting and stopping moving image shooting. The display unit 153 has a display luminance range that can display an image with a wide dynamic range without suppressing the luminance range. Reference numeral 156 denotes a shooting mode selection lever for selecting a shooting mode. Reference numeral 157 denotes a menu button for shifting to a function setting mode for setting a function of the imaging apparatus. Reference numerals 158 and 159 denote up / down switches for changing various setting values. Reference numeral 160 denotes a dial for changing various setting values. Reference numeral 161 denotes a playback button for shifting to a playback mode in which video recorded on a recording medium housed in the imaging apparatus main body is played on the display unit 153.

図2は、本発明の撮像装置の概略構成を示すブロック図である。同図において、184は、撮影光学系152を介して結像された被写体の光学像を電気的な映像信号に変換する撮像素子である。152は、被写体の光学像を撮像素子184に結像させる撮影光学系である。180は、撮影光学系152の光軸である。181は、撮影光学系152を通る光の量を調節するための絞りである。絞り181は、絞り制御部182により制御される。183は、撮像素子184に入射する光の波長、および、撮像素子184に伝達する空間周波数を制限する光学フィルターである。撮像素子184は、Ultra High Definition Televisionの規格を満たすに十分な画素数、信号読み出し速度、色域、およびダイナミックレンジを有する。   FIG. 2 is a block diagram showing a schematic configuration of the imaging apparatus of the present invention. In the figure, reference numeral 184 denotes an image sensor that converts an optical image of a subject formed through the photographing optical system 152 into an electrical video signal. Reference numeral 152 denotes a photographing optical system that forms an optical image of a subject on the image sensor 184. Reference numeral 180 denotes an optical axis of the photographing optical system 152. Reference numeral 181 denotes an aperture for adjusting the amount of light passing through the photographing optical system 152. The diaphragm 181 is controlled by the diaphragm controller 182. Reference numeral 183 denotes an optical filter that limits the wavelength of light incident on the image sensor 184 and the spatial frequency transmitted to the image sensor 184. The image sensor 184 has a sufficient number of pixels, signal readout speed, color gamut, and dynamic range to satisfy the Ultra High Definition Television standard.

187は、撮像素子184より出力されたデジタル映像データに各種の補正を行った後に、映像データを圧縮するデジタル信号処理部である。189は、撮像素子184およびデジタル信号処理部187に各種タイミング信号を出力するタイミング発生部である。178は、各種演算とデジタルスチルモーションカメラ全体を制御するシステム制御CPUである。タイミング発生部189およびシステム制御CPU178は、特許請求の範囲における「制御手段」に対応する。   Reference numeral 187 denotes a digital signal processing unit that compresses video data after performing various corrections on the digital video data output from the image sensor 184. A timing generation unit 189 outputs various timing signals to the image sensor 184 and the digital signal processing unit 187. A system control CPU 178 controls various calculations and the entire digital still motion camera. The timing generator 189 and the system control CPU 178 correspond to “control means” in the claims.

190は、映像データを一時的に記憶するための映像メモリである。191は、撮影された映像を表示するための表示インターフェース部である。153は、液晶ディスプレイ等の表示部である。193は、映像データや付加データ等を記録するための半導体メモリ等の着脱可能な記録媒体である。192は、記録媒体193に記録または読み出しを行うための記録インターフェース部である。196は、外部コンピュータ197等と通信するための外部インターフェース部である。195は、小型インクジェットプリンタ等のプリンタである。194は、撮影された映像をプリンタ195に出力し印刷するためのプリントインターフェース部である。199は、インターネットなどのコンピュータネットワークである。198は、ネットワーク199と通信するための無線インターフェース部である。179は、スイッチST154、スイッチMV155、および各種モードの切り替えを行う複数のスイッチを含むスイッチ入力手段である。   Reference numeral 190 denotes a video memory for temporarily storing video data. Reference numeral 191 denotes a display interface unit for displaying captured images. Reference numeral 153 denotes a display unit such as a liquid crystal display. Reference numeral 193 denotes a removable recording medium such as a semiconductor memory for recording video data, additional data, and the like. Reference numeral 192 denotes a recording interface unit for performing recording or reading on the recording medium 193. Reference numeral 196 denotes an external interface unit for communicating with the external computer 197 and the like. Reference numeral 195 denotes a printer such as a small inkjet printer. Reference numeral 194 denotes a print interface unit for outputting captured images to the printer 195 for printing. Reference numeral 199 denotes a computer network such as the Internet. Reference numeral 198 denotes a wireless interface unit for communicating with the network 199. Reference numeral 179 denotes switch input means including a switch ST154, a switch MV155, and a plurality of switches for switching various modes.

図3は、図2の撮像素子184の一部を示す回路図である。同図は、図2の撮像素子184が有する行列状の多数の画素のうち、1行1列目(1,1)の画素部300と、任意のm行1列目(m,1)の画素部301と、を示す。画素部300および画素部301の構成は同じなので、これら画素部300,301の構成要素は、同じ番号で付番する。なお、信号保持部を有する撮像素子184の基本構造は、例えば、特許文献2に開示されるので、ここでの説明は省略する。   FIG. 3 is a circuit diagram showing a part of the image sensor 184 of FIG. The figure shows a pixel portion 300 in the first row and first column (1, 1) and an arbitrary m row and first column (m, 1) among a large number of matrix-like pixels included in the image sensor 184 in FIG. The pixel portion 301 is shown. Since the pixel unit 300 and the pixel unit 301 have the same configuration, the components of the pixel units 300 and 301 are numbered with the same number. In addition, since the basic structure of the image sensor 184 having a signal holding unit is disclosed in, for example, Patent Document 2, description thereof is omitted here.

<撮像素子構成と画像信号生成過程の説明>
図3の回路図において、1つの画素部300は、フォトダイオード500と、第1の転送トランジスタ501Aと、信号保持部507Aと、第2の転送トランジスタ502Aと、を有する。フォトダイオード500および信号保持部507Aは、それぞれ特許請求の範囲における「光電変換部」および「信号保持部」に対応する。さらに、1つの画素部300は、第3の転送トランジスタ503と、フローティングディフュージョン領域508と、リセットトランジスタ504と、増幅トランジスタ505と、選択トランジスタ506と、を有する。上記構成を有する複数の画素部を2次元的に配列した撮像素子184は、特許請求の範囲における「撮像素子」に対応する。
<Description of image sensor configuration and image signal generation process>
In the circuit diagram of FIG. 3, one pixel portion 300 includes a photodiode 500, a first transfer transistor 501A, a signal holding portion 507A, and a second transfer transistor 502A. The photodiode 500 and the signal holding unit 507A correspond to the “photoelectric conversion unit” and the “signal holding unit” in the claims, respectively. Further, one pixel portion 300 includes a third transfer transistor 503, a floating diffusion region 508, a reset transistor 504, an amplification transistor 505, and a selection transistor 506. The image sensor 184 in which a plurality of pixel portions having the above configuration are two-dimensionally arranged corresponds to an “image sensor” in the claims.

また、第1の転送トランジスタ501Aは、転送パルスφTX1Aにて制御され、第2の転送トランジスタ502Aは、転送パルスφTX2Aにて制御される。また、リセットトランジスタ504は、リセットパルスφRESで制御され、選択トランジスタ506は、選択パルスφSELで制御される。さらに、第3の転送トランジスタ503は、転送パルスφTX3にて制御される。ここで、各制御パルスは、不図示の垂直走査回路から送出される。さらに、520および521は、電源線であり、523は、信号出力線である。   The first transfer transistor 501A is controlled by the transfer pulse φTX1A, and the second transfer transistor 502A is controlled by the transfer pulse φTX2A. The reset transistor 504 is controlled by a reset pulse φRES, and the selection transistor 506 is controlled by a selection pulse φSEL. Further, the third transfer transistor 503 is controlled by the transfer pulse φTX3. Here, each control pulse is transmitted from a vertical scanning circuit (not shown). Further, 520 and 521 are power supply lines, and 523 is a signal output line.

以下、図4を用いて撮像素子の動作の詳細を説明する。
図4は、図2の撮像素子184の駆動シーケンスを示すタイミングチャートである。同図は、30fpsの条件で動画撮影を行うことを想定し、1撮影周期である1/30秒の間に1/480秒の蓄積を4回加算することにより、画像信号を得る場合に対応する。
なお、本実施例の撮像素子184は、垂直方向に多数行の画素列があり、図4は、第1行のタイミングを示す。そして、これらの制御が水平同期信号により垂直方向に走査されることで、撮像素子184の全画素の蓄積動作が行われる。
The details of the operation of the image sensor will be described below with reference to FIG.
FIG. 4 is a timing chart showing a driving sequence of the image sensor 184 in FIG. This figure assumes that movie shooting is performed under the condition of 30 fps, and corresponds to the case where an image signal is obtained by adding 4 times the accumulation of 1/480 seconds during 1/30 seconds, which is one shooting period. To do.
Note that the image sensor 184 of this embodiment has a large number of pixel columns in the vertical direction, and FIG. 4 shows the timing of the first row. These controls are scanned in the vertical direction by the horizontal synchronization signal, whereby the accumulation operation of all the pixels of the image sensor 184 is performed.

図4において、垂直同期信号φVの立ち上がり時刻t1およびt6は、撮影周期が始まる垂直同期時刻であり、t1からt6までの時間である1/30秒が特許請求の範囲における「第1の撮影周期」または「第2の撮影周期」に対応する。また、撮影条件として、動画は、1/30秒の周期中に、4回の露光、すなわち、1/480秒の電荷(信号)の蓄積を行い、これら4回分の電荷を加算することにより、1/120秒の露光1回分と等価な露光量により得られるものとする。   In FIG. 4, rising times t1 and t6 of the vertical synchronization signal φV are vertical synchronization times at which the imaging cycle starts, and 1/30 seconds, which is the time from t1 to t6, is “the first imaging cycle”. "Or" second imaging cycle ". In addition, as a shooting condition, a moving image is subjected to exposure four times during a period of 1/30 seconds, that is, accumulation of charge (signal) of 1/480 seconds, and by adding these four charges, It is assumed that the exposure amount is equivalent to one exposure for 1/120 second.

まず、時刻t1において、タイミング発生部189にて垂直同期信号φVがハイレベルになり、同時に水平同期信号φHがハイレベルになる。垂直同期信号φVおよび水平同期信号φHがハイレベルになる時刻t1に同期して、第1行のリセットパルスφRES(1)がローレベルとなる。すると、第1行のリセットトランジスタ504がオフとなって、フローティングディフュージョン領域508のリセット状態が解除される。同時に、第1行の選択パルスφSEL(1)がハイレベルとなると第1行の選択トランジスタ506がオンとなって、第1行の画像信号の読み出しが可能となる。さらに、フローティングディフュージョン領域508の電位の変化に応じた出力が増幅トランジスタ505および選択トランジスタ506を介して信号出力線523に読み出される。信号出力線523に読み出された信号は、不図示の読み出し回路に供給されて第1行の画像信号(動画)として外部に出力される。   First, at time t1, the timing generator 189 causes the vertical synchronization signal φV to be at a high level, and at the same time, the horizontal synchronization signal φH is at a high level. In synchronization with the time t1 when the vertical synchronizing signal φV and the horizontal synchronizing signal φH become high level, the reset pulse φRES (1) of the first row becomes low level. Then, the reset transistor 504 in the first row is turned off, and the reset state of the floating diffusion region 508 is released. At the same time, when the selection pulse φSEL (1) of the first row becomes a high level, the selection transistor 506 of the first row is turned on, and the image signal of the first row can be read. Further, an output corresponding to a change in the potential of the floating diffusion region 508 is read out to the signal output line 523 through the amplification transistor 505 and the selection transistor 506. The signal read to the signal output line 523 is supplied to a read circuit (not shown) and output to the outside as an image signal (moving image) on the first row.

次に、時刻t2において、第1行の転送パルスφTX2(1)がハイレベルとなると、第1行の第2の転送トランジスタ502Aがオンとなる。このとき既に全行のリセットパルスφRES(1)がハイレベルになり、リセットトランジスタ504がオンになっているため、第1行のフローティングディフュージョン領域508および第1の信号保持部507Aがリセットされる。なお、時刻t2において第1行の選択パルスφSEL(1)は、ローレベルになっている。   Next, at time t2, when the transfer pulse φTX2 (1) in the first row becomes high level, the second transfer transistor 502A in the first row is turned on. At this time, the reset pulse φRES (1) for all rows is already at the high level and the reset transistor 504 is on, so that the floating diffusion region 508 and the first signal holding unit 507A in the first row are reset. At time t2, the selection pulse φSEL (1) in the first row is at a low level.

次に、時刻t3において、第1行の転送パルスφTX3(1)がローレベルとなる。すると、第3の転送トランジスタ503がオフとなり、第1行のフォトダイオード500のリセットが解除されてフォトダイオード500での動画用としての信号電荷の蓄積が開始される。また、時刻t4において、第1行の転送パルスφTX1(1)がハイレベルとなる。すると、第1の転送トランジスタ501Aがオンとなり、フォトダイオード500に蓄積された信号電荷は、第1行の動画の電荷を保持する信号保持部507Aに転送される。さらに、時刻t5において、第1行の転送パルスφTX1(1)がローレベルとなる。すると、第3の転送トランジスタ501Aがオフとなり、フォトダイオード500に蓄積された信号電荷の信号保持部507Aへの転送が終了する。   Next, at time t3, the transfer pulse φTX3 (1) in the first row becomes low level. Then, the third transfer transistor 503 is turned off, the reset of the photodiodes 500 in the first row is released, and accumulation of signal charges for moving images in the photodiodes 500 is started. At time t4, the transfer pulse φTX1 (1) of the first row becomes high level. Then, the first transfer transistor 501A is turned on, and the signal charge accumulated in the photodiode 500 is transferred to the signal holding unit 507A that holds the moving image charge in the first row. Further, at time t5, the transfer pulse φTX1 (1) in the first row becomes low level. Then, the third transfer transistor 501A is turned off, and the transfer of the signal charge accumulated in the photodiode 500 to the signal holding unit 507A is completed.

ここで、時刻t3から時刻t5までが、撮影周期における動画の1回の蓄積時間1/480秒に相当し、右上がり斜線部領域の蓄積時間602−1として図示される。すなわち、このような蓄積動作を離散的に4回行うと、右上がり斜線部領域の4つの蓄積時間602−1,602−2,602−3,602−4として図示される。そして、これら4つの蓄積時間602−1,602−2,602−3,602−4により得られる信号電荷を加算することで、通常の1回分の蓄積時間(1/480秒×4回=1/120秒)で得られる信号電荷と同等の信号量を得る。なお、最初の蓄積時間602−1に続く3つの蓄積時間602−2,602−3,602−4における制御動作は、最初の蓄積時間602−1と同様であるため、ここでの説明を省略する。   Here, the period from time t3 to time t5 corresponds to a one-time accumulation time of 1/480 seconds of moving images in the shooting period, and is illustrated as an accumulation time 602-1 in the upward-slashed area. That is, when such an accumulation operation is performed four times in a discrete manner, four accumulation times 602-1, 602-2, 602-3, and 602-4 in the right-upward shaded area are illustrated. Then, by adding the signal charges obtained by these four accumulation times 602-1, 602-2, 602-3, and 602-4, the normal accumulation time (1/480 seconds × 4 times = 1) / Signal amount equivalent to the signal charge obtained in 120 seconds). Note that the control operations in the three accumulation times 602-2, 602-2, and 602-4 following the first accumulation time 602-1 are the same as those in the first accumulation time 602-1, and thus the description thereof is omitted here. To do.

次に、時刻t6において、タイミング発生部189にて垂直同期信号φVがハイレベルになり、同時に水平同期信号φHがハイレベルになり、次の撮影周期が開始される。そして、4つの蓄積時間602−1,602−2,602−3,602−4により蓄積および加算された動画の信号電荷は、時刻t6以降に画像信号(動画)として外部に出力される。なお、第2行目のタイミングチャートは、時刻t1直後の水平同期振動φHに同期して実行される。すなわち、時刻t1から時刻t6までの間に全行のタイミングチャートが開始される。例えば、時刻t0のときの水平同期信号φHによって開始されるタイミングチャートを第m行とする。この場合、スイッチ信号は、φSEL(m)、φRES(m)、φTX3(m)、φTX1A(m)、φTX1B(m)、φTX2A(m)、φTX2B(m)と表せる。   Next, at time t6, the timing generator 189 causes the vertical synchronization signal φV to be at a high level, and simultaneously the horizontal synchronization signal φH to be at a high level, so that the next imaging cycle is started. The moving image signal charges accumulated and added during the four accumulation times 602-1, 602-2, 602-3, and 602-4 are output to the outside as image signals (moving images) after time t6. Note that the timing chart in the second row is executed in synchronization with the horizontal synchronous vibration φH immediately after time t1. That is, the timing chart for all rows is started between time t1 and time t6. For example, the timing chart started by the horizontal synchronization signal φH at time t0 is the m-th row. In this case, the switch signal can be expressed as φSEL (m), φRES (m), φTX3 (m), φTX1A (m), φTX1B (m), φTX2A (m), and φTX2B (m).

以上のようなタイミングチャートにより、動画は、1/30秒の撮影周期中に1/480秒の露光による信号電荷の蓄積を4回繰り返すことにより、1/120秒の露光1回分と等価な露光量として得ることができる。なお、上記1撮影周期中に複数回の露光・蓄積を行って画像信号を得る動作は、特許請求の範囲における「第1または第2の撮影周期中に光電変換部から信号保持部へのn回の信号電荷転送より第1または第2の画像信号を生成する動作」に対応する。ただし、nは2以上の自然数である。   According to the timing chart as described above, a moving image is exposed equivalent to one exposure of 1/120 seconds by repeating accumulation of signal charges by exposure of 1/480 seconds during a shooting period of 1/30 seconds. Can be obtained as a quantity. The operation of performing the exposure / accumulation a plurality of times during the one photographing cycle to obtain an image signal is “n” from the photoelectric conversion unit to the signal holding unit during the first or second photographing cycle. This corresponds to the operation of generating the first or second image signal by the signal charge transfer of the first time. However, n is a natural number of 2 or more.

このとき得られる動画は、1/30秒の撮影周期中に略等間隔で設定された短い蓄積時間を加算することによって1つの画像信号を得るように構成されるため、コマ送り的なパラパラ感のない高品位な動画を得ることができる。なお、上記実施例では、通常の露光間隔(fps値)における信号電荷の蓄積加算回数(分割露光回数)は4回であるが、これに限られることはなく、例えば、8回、16回、32回、64回などでもよい。   The moving image obtained at this time is configured to obtain one image signal by adding a short accumulation time set at approximately equal intervals during a 1/30 second shooting period. High-quality video without In the above-described embodiment, the number of signal charge accumulation and addition (number of divided exposures) in a normal exposure interval (fps value) is four, but is not limited to this. For example, eight times, sixteen times, It may be 32 times, 64 times, etc.

<オプティカルフローの取得>
近年、撮像素子の高機能化が進展しており、画素数、フレームレートの向上などが図られている。この信号を利用して複数の画像間で対象物の動きを示すベクトルデータ(オプティカルフロー)を求める方法が知られている。本実施例では、上記オプティカルフローをスルー画像から取得する構成をとる。図2におけるシステム制御CPU178は、撮像素子184から得られた複数の画像間の比較に基づいてオプティカルフローを生成する。システム制御CPU178は、特許請求の範囲における「第1および第2の画像信号生成手段、第1および第2の平均化手段、オプティカルフロー候補算出手段、概略オプティカルフロー算出手段、およびオプティカルフロー推定手段」を備える。
<Obtain optical flow>
In recent years, higher functionality of image sensors has been developed, and the number of pixels and the frame rate have been improved. A method for obtaining vector data (optical flow) indicating the movement of an object between a plurality of images using this signal is known. In this embodiment, the optical flow is obtained from the through image. The system control CPU 178 in FIG. 2 generates an optical flow based on comparison between a plurality of images obtained from the image sensor 184. The system control CPU 178 refers to “first and second image signal generation means, first and second averaging means, optical flow candidate calculation means, general optical flow calculation means, and optical flow estimation means” in the claims. Is provided.

図5は、複数の画像比較に基づくブレ検知信号であるオプティカルフローの求め方の例を示す図である。図2におけるシステム制御CPU178の具体的な動作に対応する。図5は、いわゆるブロックマッチング法に基づくが、他の方法を用いてもよい。図5(A)は、時刻tで取得された画像を示し、図5(B)は、時刻t後の時刻tn+1で取得された画像を示す。また、図5(C)は、時刻tで取得された画像と時刻tn+1で取得された画像とを重ねて表示し、さらに、検知されたベクトルを模式的に示す。 FIG. 5 is a diagram illustrating an example of how to obtain an optical flow that is a shake detection signal based on a plurality of image comparisons. This corresponds to the specific operation of the system control CPU 178 in FIG. FIG. 5 is based on the so-called block matching method, but other methods may be used. 5 (A) shows the image acquired at time t n, FIG. 5 (B) shows the image acquired at time t n + 1 after time t n. Further, FIG. 5 (C) and displayed overlapping the acquired image at time t n acquired by the image and the time t n + 1, also shows the detected vector schematically.

図5において、61は、時刻tで取得された画像であり、62は、被写体であり、63は、画像61中の着目領域である。また、64は、時刻tn+1で取得された画像であり、65は、着目領域63と画面内の位置が同一の領域であり、66は、探索することを模式的に示す矢印であり、67は、画像61中の被写体62の着目領域63に対応する画像64中の領域である。さらに、68は、時刻tおよび時刻tn+1で取得された画像を重ねて表示した画像であり、69は、画像61中の着目領域63で検知された移動ベクトルである。 5, 61 is a acquired image at time t n, 62 are subject, 63 is a region of interest in the image 61. Reference numeral 64 denotes an image acquired at time t n + 1 , 65 denotes an area having the same position in the screen as the area of interest 63, and 66 denotes an arrow schematically indicating that searching is performed, 67 Is a region in the image 64 corresponding to the region of interest 63 of the subject 62 in the image 61. Furthermore, 68 is an image obtained by superimposing images acquired at time t n and time t n + 1 , and 69 is a movement vector detected in the region of interest 63 in the image 61.

まず、図5に示すように、異なる時間に取得された2つの画像61,64を用意する。そのうち一方の画像61内で被写体62が存在する着目領域63に着目する。着目領域63の大きさは任意に設定可能であるが、例えば、8×8画素とできる。そして、着目領域63が画像64のどこに移動したかを、特徴点の比較などを行うことにより探索する。   First, as shown in FIG. 5, two images 61 and 64 acquired at different times are prepared. Of these, attention is paid to a region of interest 63 in which the subject 62 exists in one image 61. The size of the region of interest 63 can be set arbitrarily, but may be 8 × 8 pixels, for example. Then, a search is performed by comparing the feature points to determine where the attention area 63 has moved in the image 64.

具体的には、画像64中で、着目領域63に対応する領域65を中心に、予め定められた範囲内において、矢印66のように領域65を少しずつずらしながら画像64におけるエッジやコーナー等の特徴点を抽出する。さらに、その周囲の領域から特徴量を計算することで2つの画像61,64間のマッチングを行う。エッジやコーナー等の特徴点の抽出は、輝度データに対し、水平方向および垂直方向に対する輝度勾配値を計算し、その勾配値が各方向に一定の値以上を有する箇所を抜き出すことにより行う。   Specifically, in the image 64, an edge or a corner in the image 64 is gradually shifted within a predetermined range around the region 65 corresponding to the region of interest 63 as indicated by an arrow 66. Extract feature points. Furthermore, matching between the two images 61 and 64 is performed by calculating a feature amount from the surrounding area. Extraction of feature points such as edges and corners is performed by calculating a luminance gradient value in the horizontal direction and the vertical direction with respect to the luminance data, and extracting a portion where the gradient value has a certain value or more in each direction.

結果として、画像68中で、着目領域63は、ベクトル69のように移動したことがわかる。そして、上記の動作を画像61中に設定された複数の着目領域について行う。この場合、移動ベクトルは、画像68中で複数検知される。この後、被写体62に注目してベクトル選択を行う。例えば、RANSAC(Random Sample Consensus)を用いることにより、推定値を求め、移動ベクトルの評価値を1つ決めることができる。なお、RANSACについては、既知の技術であるため、ここでの詳細な説明を省略する。この時、従来の撮像方式では、比較するコマ間の画像の輪郭が対象物の移動や手振れ等により不鮮明となると、精密なオプティカルフローが求められない問題がある。   As a result, it can be seen that the region of interest 63 has moved like a vector 69 in the image 68. Then, the above operation is performed for a plurality of regions of interest set in the image 61. In this case, a plurality of movement vectors are detected in the image 68. Thereafter, paying attention to the subject 62, vector selection is performed. For example, by using RANSAC (Random Sample Consensus), an estimated value can be obtained and one evaluation value of the movement vector can be determined. Since RANSAC is a known technique, detailed description thereof is omitted here. At this time, in the conventional imaging method, there is a problem that a precise optical flow is not required when the contour of the image between the frames to be compared becomes unclear due to the movement of the object or camera shake.

<特徴点抽出によるオプティカルフロー取得の際の問題点>
以下、被写体が画面水平左方向に通過するシーンを各々の異なる露光方式で撮影した際に得られる画像の模式図を用いて、オプティカルフローの取得の際の問題点を説明する。
図6(A)、図6(B)、図6(C)、および図6(D)は、第1の比較例であり、被写体S(新幹線を例とする)が画面を水平方向に横切るシーンを、30fps、1コマ1/30秒の露光時間で動画撮影した際の例を示す。
<Problems when acquiring optical flow by extracting feature points>
Hereinafter, problems in obtaining an optical flow will be described with reference to schematic diagrams of images obtained when a scene in which a subject passes in the horizontal direction on the screen is photographed with different exposure methods.
6 (A), 6 (B), 6 (C), and 6 (D) are first comparative examples, where the subject S (for example, the Shinkansen) crosses the screen in the horizontal direction. An example in which a scene is captured as a moving image with an exposure time of 30 fps, 1 frame 1/30 second is shown.

図6(A)は、撮影した動画中の1コマを抜き出した図であり、図6(B)は、図6(A)の1コマ後の1コマを抜き出した図である。これ以降、図6(A)の1コマを第1のコマと称し、図6(B)の1コマを第2のコマと称する。この時、どちらの図においても、撮像対象物である被写体Sが高速で移動するために、露光時間である1/30秒の間に移動した量だけ、被写体Sの輪郭がぼやけてしまっていることがわかる。   6A is a diagram in which one frame is extracted from the captured moving image, and FIG. 6B is a diagram in which one frame after the one frame in FIG. 6A is extracted. Hereinafter, one frame in FIG. 6A is referred to as a first frame, and one frame in FIG. 6B is referred to as a second frame. At this time, in both figures, the subject S, which is the object to be imaged, moves at high speed, so that the outline of the subject S is blurred by the amount moved during 1/30 seconds that is the exposure time. I understand that.

ここで、前述の図6(A)および図6(B)に示す第1のコマと次のコマである第2のコマにおける双方の被写体Sの画像の輪郭から特徴量を計算し、両者を比較しようとする場合を考える。一般的に、特徴量の比較の際には、まず、輪郭部(エッジ部)の抽出から行われる。輪郭部(エッジ)の抽出に使われる手法としては、各画素の輝度値I(x、y)を特定方向に空間微分して、その方向に対する輝度I(x、y)の勾配値K(x、y)を求める方法が一般的である。   Here, the feature amount is calculated from the contours of the images of the subject S in the first frame and the second frame, which are the next frame, shown in FIGS. 6A and 6B, and both are calculated. Consider the case of trying to compare. In general, when comparing feature amounts, first, an outline portion (edge portion) is extracted. As a technique used for extracting the contour (edge), the luminance value I (x, y) of each pixel is spatially differentiated in a specific direction, and the gradient value K (x) of the luminance I (x, y) with respect to that direction. , Y) is generally obtained.

図6(A)および図6(B)においては、説明を単純化するために、水平方向(x方向)の空間微分を行う場合を考える。また、図示のラインαの行の画素のみに注目して、輝度を論ずるとする。
この時、ラインα上におけるX列目の画素における輝度値をI(X)とすると、勾配値K(x)は、下記(1)式で示される。
K(x) = dI(X)/dx …(1)
In FIG. 6A and FIG. 6B, in order to simplify the description, consider the case of performing spatial differentiation in the horizontal direction (x direction). Further, it is assumed that the luminance is discussed by paying attention only to the pixels in the row α shown in the figure.
At this time, if the luminance value at the pixel in the X column on the line α is I (X), the gradient value K (x) is expressed by the following equation (1).
K (x) = dI (X) / dx (1)

図6(C)は、図示のラインαの行の画素においてのx方向位置(x方向の何列目の画素であるか)と、輝度I(x)の関係を表すグラフである。
図6(C)における実線部は、第1のコマでのラインα上における画素の輝度値を示し、一点鎖線部は、第2のコマでのラインα上における画素の輝度値を示す。また、縦軸上の輝度値Iaは、被写体S(新幹線)の車体の輝度値を示し、縦軸上の輝度値Ibは、背景の輝度値を示す。なお、本例では、Ia>Ibとする。
FIG. 6C is a graph showing the relationship between the position in the x direction (which column is the pixel in the x direction) and the luminance I (x) in the pixel in the row α shown in the figure.
The solid line portion in FIG. 6C indicates the luminance value of the pixel on the line α in the first frame, and the alternate long and short dash line portion indicates the luminance value of the pixel on the line α in the second frame. The luminance value Ia on the vertical axis indicates the luminance value of the vehicle body of the subject S (Shinkansen), and the luminance value Ib on the vertical axis indicates the luminance value of the background. In this example, Ia> Ib.

被写体Sがほぼ等速運動をしているとすると、図6(A)および図6(B)における被写体Sが露光中に移動するために輪郭がぼやけている箇所は、図6(C)の輝度値I(x)のグラフにおいては対応する箇所が略線形に立ち上がるグラフになる。   Assuming that the subject S is moving at a substantially constant speed, a portion where the contour is blurred because the subject S moves during exposure in FIGS. 6A and 6B is shown in FIG. In the graph of the luminance value I (x), a corresponding portion rises substantially linearly.

図6(D)は、ラインαの行の画素におけるx方向位置と輝度の勾配値K(x)との関係を表すグラフである。輝度のグラフの場合と同様に、実線部は、第1のコマでのラインα上における画素の輝度の勾配値を示し、一点鎖線部は、第2のコマでのラインα上における画素の輝度の勾配値を示す。   FIG. 6D is a graph showing the relationship between the x-direction position and the luminance gradient value K (x) in the pixels in the line α. As in the case of the luminance graph, the solid line portion indicates the gradient value of the luminance of the pixel on the line α in the first frame, and the alternate long and short dash line portion indicates the luminance of the pixel on the line α in the second frame. The slope value of is shown.

前述の図6(A)および図6(B)において輪郭がぼやけた部分に関し、図6(C)の輝度値を参照すると、その輝度値は略一定傾きで立ち上がる直線状になっている。このため、図6(D)における輝度値の勾配値は、その輪郭がぼやけた部分においてK1の値で示す略一定の値を有することになる。ここで、通常、所定値以上の勾配値を有する画素が輪郭(位置)を示す画素として判定されるが、本例のように輪郭がぼやけている場合においては、図6(D)から明らかなように、勾配値(微分値)が一定値以上の箇所が広範囲にわたってしまう。したがって、第1のコマにおける輪郭位置と第2のコマにおける輪郭位置とを厳密に定めることができず、結果として、被写体Sの移動量を精密に求められない問題が出てきてしまう。   6A and 6B, the brightness value is a straight line that rises at a substantially constant slope when the brightness value in FIG. 6C is referred to. Therefore, the gradient value of the luminance value in FIG. 6D has a substantially constant value indicated by the value of K1 in the portion where the outline is blurred. Here, normally, a pixel having a gradient value equal to or greater than a predetermined value is determined as a pixel indicating a contour (position). However, when the contour is blurred as in this example, it is apparent from FIG. As described above, a portion where the gradient value (differential value) is equal to or greater than a certain value is spread over a wide range. Therefore, the contour position in the first frame and the contour position in the second frame cannot be determined precisely, and as a result, there arises a problem that the amount of movement of the subject S cannot be determined accurately.

図7(A)、図7(B)、図7(C)、および図7(D)は、第2の比較例であり、前述の問題に対し、単純に1コマの露光時間を短くすることで先鋭な輪郭を得る対策を行った場合の例を示す。撮影条件としては、被写体Sが画面を水平方向に横切るシーンを、30fps、1コマ1/30秒の露光時間で動画撮影した際の例を示す。   FIGS. 7A, 7B, 7C, and 7D show a second comparative example, in which the exposure time for one frame is simply shortened with respect to the above-described problem. An example in the case where a measure for obtaining a sharp outline is taken. As an example of the shooting condition, an example in which a scene in which the subject S crosses the screen in the horizontal direction is shot with a moving image at an exposure time of 30 fps, 1 frame 1/30 second is shown.

図7(A)は、撮影した動画中の1コマを抜き出した図であり、図7(B)は、図7(A)の1コマ後の1コマを抜き出した図である。図7(A)および図7(B)からわかるように、各コマ1/30秒間における開始直後の短い時間(1/480秒)のみ露光および転送を行い、信号電荷を蓄積する。したがって、前述の第1の比較例に比して、露光時間の間に被写体Sが移動する量が少なく、先鋭な輪郭を有する画像が得られている。   FIG. 7A is a diagram in which one frame is extracted from the captured moving image, and FIG. 7B is a diagram in which one frame after the one frame in FIG. 7A is extracted. As can be seen from FIGS. 7A and 7B, exposure and transfer are performed only for a short time (1/480 seconds) immediately after the start of each frame for 1/30 seconds, and signal charges are accumulated. Therefore, the amount of movement of the subject S during the exposure time is small compared to the first comparative example, and an image having a sharp outline is obtained.

図7(C)は、ラインα’の行の画素においてのx方向位置(x方向の何列目の画素であるか)と輝度I(x)との関係を表すグラフである。図7(C)において、実線部は、第1のコマでのラインα’上における画素の輝度値を示し、一点鎖線部は、第2のコマでのラインα’上における画素の輝度値を示す。また、縦軸上の輝度値Iaは、被写体S(新幹線)の車体の輝度値を示し、縦軸上の輝度値Ibは、背景の輝度を示す。なお、本例では、Ia>Ibとする。   FIG. 7C is a graph showing the relationship between the x-direction position (which column is the pixel in the x direction) and the luminance I (x) in the pixels in the row of the line α ′. In FIG. 7C, the solid line portion indicates the luminance value of the pixel on the line α ′ in the first frame, and the alternate long and short dash line portion indicates the luminance value of the pixel on the line α ′ in the second frame. Show. The luminance value Ia on the vertical axis indicates the luminance value of the vehicle body of the subject S (Shinkansen), and the luminance value Ib on the vertical axis indicates the luminance of the background. In this example, Ia> Ib.

この時、図7(A)および図7(B)における被写体Sの先鋭な輪郭部は、図7(C)の輝度値I(x)のグラフにおいて、該当する箇所が急激に立ち上がるグラフになる。   At this time, the sharp outline portion of the subject S in FIGS. 7A and 7B becomes a graph in which the corresponding portion suddenly rises in the graph of the luminance value I (x) in FIG. 7C. .

図7(D)は、ラインα’の行の画素においてのx方向位置と輝度の勾配値K(x)との関係を表すグラフである。輝度のグラフの場合と同様に、実線部は、第1のコマでのラインα’上における画素の輝度の勾配値を示し、一点鎖線部は、第2のコマでのラインα’上における画素の輝度の勾配値を示す。   FIG. 7D is a graph showing the relationship between the x-direction position and the luminance gradient value K (x) in the pixels in the row of the line α ′. As in the case of the luminance graph, the solid line portion indicates the gradient value of the luminance of the pixel on the line α ′ in the first frame, and the alternate long and short dash line portion indicates the pixel on the line α ′ in the second frame. The gradient value of the brightness is shown.

前述の図7(A)および図7(B)における先鋭な輪郭の箇所は、図7(C)の輝度値においては急激な傾きで立ち上がるグラフ形状になる。すなわち、図7(D)における輝度の勾配値は、該当箇所がごく狭いx軸の範囲内において局所的に大きな勾配値(K2と表記)まで上昇することがわかる。この時、輝度勾配値が一定値以上の箇所がごく狭い範囲であるため、x軸方向の輪郭位置を精密に求めることができる。そのため、オプティカルフローを精密に算出できることとなる。ただし、この方式では、オプティカルフローは精密に求められるが、動画の品位の点で問題が出てくる。   7A and 7B described above have a graph shape that rises with a steep slope in the luminance value of FIG. 7C. That is, it can be seen that the gradient value of the luminance in FIG. 7D rises locally to a large gradient value (denoted as K2) within the x-axis range where the corresponding part is extremely narrow. At this time, since the portion where the luminance gradient value is a certain value or more is a very narrow range, the contour position in the x-axis direction can be obtained accurately. Therefore, the optical flow can be calculated accurately. However, with this method, the optical flow is required precisely, but there is a problem in terms of the quality of the moving image.

先に述べたように、各コマの最初の短時間(1/480秒)のみ露光・転送・蓄積を行うため、それが終わった後の1コマ1/30秒の残りの時間は画像を取り込まないこととなる。次の画像取り込みを開始するのは第2のコマの開始時点であり、その間にも被写体は進行方向に移動を続けている。図7(A)および図7(B)に示すように、第2のコマが始まり、露光が開始された際の被写体Sの位置は第1のコマにおいて取り込まれた画像での被写体Sの位置から大きく移動した位置にいる。その結果、図7(D)の勾配値のグラフに示されるように、第1のコマの被写体Sの輪郭を示すグラフの隆起部から第2のコマの被写体Sの輪郭を示す隆起部までに距離が開くこととなる。動画を視聴するユーザーには第1のコマから第2のコマに移った際に、被写体Sがこの距離をあたかも瞬間移動したかのように見えることとなり、これが前述のパラパラ感を覚える原因となって動画の品位を落とす。   As described above, only the first short time (1/480 seconds) of each frame is exposed, transferred, and stored, so the image is captured for the remaining time of 1/30 seconds after that. It will not be. The next image capture starts at the start of the second frame, and the subject continues to move in the traveling direction during that time. As shown in FIGS. 7A and 7B, the position of the subject S when the second frame starts and the exposure is started is the position of the subject S in the image captured in the first frame. It is in the position that moved greatly from. As a result, as shown in the gradient graph of FIG. 7D, from the raised portion of the graph showing the outline of the subject S of the first frame to the raised portion showing the outline of the subject S of the second frame. The distance will open. When the user views the video, when moving from the first frame to the second frame, the subject S appears as if it has moved this distance momentarily, which causes the above-mentioned feeling of paralysis. To reduce the quality of the video.

これに対し、前述の図6の輪郭がぼやけた例においては、図6(D)の勾配値のグラフにおける第1のコマのぼやけた輪郭を示すグラフの隆起部左端と、第2のコマのぼやけた輪郭を示すグラフの隆起部右端の間にはほぼ距離が開いていない状態にある。この時、動画を視聴するユーザーにとってはコマからコマに移り変わった際に、前後コマの輪郭同士の位置がほぼ連続するため、滑らかにパラパラ感なく移り変わっているように見える。よって、輪郭がぼやけているので、オプティカルフローは精密に算出できないが、動画はパラパラ感のない高品位なものとなる。   On the other hand, in the above-described example in which the contour of FIG. 6 is blurred, the left edge of the raised portion of the graph showing the blurred contour of the first frame in the gradient value graph of FIG. There is almost no distance between the right ends of the raised portions of the graph showing the blurred outline. At this time, for the user who watches the moving image, when the transition from frame to frame is made, the positions of the outlines of the front and rear frames are almost continuous, so that it appears that the transition is smooth and without a sense of disparity. Therefore, since the contour is blurred, the optical flow cannot be accurately calculated, but the moving image has a high quality without a sense of disparity.

以上から、図6の例のように、1コマの撮影周期時間に対し、1/30秒といったほぼ同等の時間だけ露光すると、移動する対象物の輪郭がぼやけてオプティカルフローは精密に算出できないが、動画は滑らかに移り変わるパラパラ感のない高品位なものとなる。逆に、図7の例のように、1コマの撮影周期時間に対し、ごく短時間の1/480秒といった時間だけ露光すると、移動する対象物であっても輪郭が先鋭に得られ、オプティカルフローを精密に算出できる。しかし、動画はパラパラ感の感じられる低品位なものとなってしまうことがわかる。   From the above, as shown in the example of FIG. 6, when the exposure is performed for approximately the same time such as 1/30 seconds with respect to the shooting cycle time of one frame, the contour of the moving object is blurred and the optical flow cannot be accurately calculated. , The video will be high-quality without smooth transition. On the contrary, as shown in the example of FIG. 7, when exposure is performed for a very short time such as 1/480 second with respect to the shooting period time of one frame, a sharp outline is obtained even for a moving object, and the optical The flow can be calculated accurately. However, it can be seen that the video will be low quality with a feeling of flipping.

上記のように、第1および第2の比較例においては、オプティカルフローの精密な算出とパラパラ感のない高品位な動画撮影とは、両立できないものであった。   As described above, in the first and second comparative examples, precise calculation of the optical flow and high-quality moving image shooting without parallax cannot be achieved at the same time.

<分割露光を用いたオプティカルフロー算出>
これに対し、本発明においては、1コマ1/30秒の間に複数回に分けて露光・転送・蓄積を行って動画を取得する方式を用いてオプティカルフローを推定することで、上記の問題を解決する。下記にその説明を行う。
<Optical flow calculation using divided exposure>
On the other hand, in the present invention, the above problem is solved by estimating the optical flow using a method of acquiring a moving image by performing exposure, transfer, and accumulation in a plurality of times in 1 frame 1/30 seconds. To solve. The explanation is given below.

図8は、本実施例の構成により、被写体Sが画面を水平方向に横切るシーンを30fpsの動画撮影で、1コマ1/30秒間の撮影周期に、1/480秒ずつ4回に分けて露光した場合の取得画像を示す。   FIG. 8 shows the scene in which the subject S crosses the screen in the horizontal direction according to the configuration of the present embodiment, and the exposure is divided into 4 times of 1/480 seconds in a shooting period of 1 frame / 30 seconds with 30 fps movie shooting. The acquired image is shown.

図8(A)は、撮影した動画中の1コマを抜き出したものであり、図8(B)は、その1コマ後を抜き出した図である。図8(A)および図8(B)にあるように、被写体Sは4回露光されるため、進行方向に1/30秒間の移動量の約1/4ずつずれながら重なった状態で、それぞれ第1のコマにおいてA1〜A4、第2のコマにおいてB1〜B4の4重の先鋭な輪郭を示す。   FIG. 8A shows one frame extracted from the captured moving image, and FIG. 8B shows the one frame extracted. As shown in FIGS. 8 (A) and 8 (B), the subject S is exposed four times. Therefore, the subject S is overlapped while being shifted by about 1/4 of the moving amount of 1/30 second in the traveling direction. A four-point sharp outline of A1 to A4 in the first frame and B1 to B4 in the second frame is shown.

図8(C)は、図示のラインα’’の行の画素においてのx方向位置(x方向の何列目の画素であるか)と、輝度I(x)の関係を表すグラフである。図8(C)における実線部は、第1のコマにおけるラインα’’上における画素の輝度値を示し、一点鎖線部は、第2のコマでのラインα’’上における画素の輝度値を示す。また、縦軸に記載の輝度Iaは、被写体S(新幹線)車体の輝度を示し、Ibは、背景の輝度を示す。本例では、Ia>Ibとする。   FIG. 8C is a graph showing the relationship between the position in the x direction (which column is the pixel in the x direction) and the luminance I (x) in the pixel in the row of the illustrated line α ″. The solid line portion in FIG. 8C indicates the luminance value of the pixel on the line α ″ in the first frame, and the alternate long and short dash line portion indicates the luminance value of the pixel on the line α ″ in the second frame. Show. The luminance Ia shown on the vertical axis indicates the luminance of the subject S (Shinkansen) vehicle body, and Ib indicates the luminance of the background. In this example, Ia> Ib.

この時、図8(A)および図8(B)における、ずれながら4重に重なった被写体Sの先鋭な輪郭部は、図8(C)の輝度値I(x)のグラフにおいて、該当する箇所がそれぞれ急激に立ち上がる階段状のグラフになる。   At this time, the sharp outline of the subject S that is quadrupled while being shifted in FIGS. 8A and 8B corresponds to the luminance value I (x) graph of FIG. 8C. A staircase graph where each point rises rapidly.

また、図8(D)は、図示のラインα’’の行の画素においてのx方向位置と、輝度の勾配値K(x)との関係を表すグラフである。輝度のグラフの場合と同様に、実線部は、第1のコマにおけるラインα’’上における画素の輝度の勾配値を示し、一点鎖線部は、第2のコマでのラインα’’上における画素の輝度の勾配値を示す。   FIG. 8D is a graph showing the relationship between the x-direction position and the luminance gradient value K (x) in the pixels in the row α ″ shown in the figure. As in the case of the luminance graph, the solid line portion indicates the gradient value of the luminance of the pixel on the line α ″ in the first frame, and the alternate long and short dash line portion indicates the line α ″ in the second frame. The gradient value of the luminance of the pixel is shown.

前述の図8(A)および図8(B)における、ずれながら4重に重なった先鋭な輪郭の箇所が、図8(C)の輝度値においては階段状のグラフの急激な傾きで立ち上がる部分になっている。このため、図8(D)における輝度の勾配値は、該当箇所がごく狭いx軸の範囲でのみ局所的に大きな勾配値(K3と表記)まで上昇しており、またそれが第1のコマおよび第2のコマそれぞれにつき4か所ずつ存在することがわかる。この時、輝度勾配値が一定以上の値を持つ箇所がごく狭い範囲であるため、各コマにおけるそれぞれ4か所の輪郭のx軸方向の位置を精密に求めることができる。   8A and 8B described above, a portion of a sharply contoured portion that overlaps while being shifted rises with a steep slope of the stepped graph in the luminance value of FIG. 8C. It has become. For this reason, the luminance gradient value in FIG. 8D rises locally to a large gradient value (denoted as K3) only in the x-axis range where the corresponding part is very narrow, and this is the first frame. It can be seen that there are four locations for each of the second frames. At this time, since the portion where the brightness gradient value has a certain value or more is a very narrow range, the positions of the four contours in each frame in the x-axis direction can be accurately obtained.

よって、第1のコマにおいて着目した輪郭に対応する第2のコマにおける輪郭を正確に選出できさえすれば、それぞれの輪郭の位置は精密に求められるので、その移動ベクトルであるオプティカルフローも精密に求められることとなる。図8(D)においては、オプティカルフローは、例えば、第1のコマにおける左端のエッジA1から、第2のコマにおける対応する左端のエッジB1への移動ベクトルである、図示のベクトルFA1B1として求められる。 Therefore, as long as the contours in the second frame corresponding to the contours of interest in the first frame can be accurately selected, the positions of the respective contours can be obtained accurately, so the optical flow that is the movement vector is also precisely determined. It will be required. In FIG. 8D , the optical flow is obtained as, for example, the illustrated vector F A1B1 , which is a movement vector from the leftmost edge A1 in the first frame to the corresponding leftmost edge B1 in the second frame. It is done.

なお、上記複数個の先鋭な輪郭が重なった画像を得る動作は、特許請求の範囲における「第1または第2の撮影周期中に光電変換部から信号保持部へのn回の信号電荷転送により第1または第2の画像信号を生成する動作」に対応する。   The operation of obtaining an image in which the plurality of sharp outlines overlap is performed by “n times of signal charge transfer from the photoelectric conversion unit to the signal holding unit during the first or second imaging period” in the claims. This corresponds to “operation for generating first or second image signal”.

また、本例では、前述のように、撮影周期1/30秒間に短時間ずつだが複数回露光を行う。このため、図示のように、実線で示す第1のコマのグラフにおける輪郭A1〜A4を示す隆起部の端と、一点鎖線で示す第2のコマのグラフにおける輪郭B1〜B4を示す隆起部の端との間の間隔は、小さく抑えられる。したがって、動画を視聴するユーザーにとっても第1のコマにおける被写体Sの輪郭と第2のコマにおける被写体Sの輪郭がほぼ連続して見え、パラパラ感のない高品位な動画となる。   Further, in this example, as described above, the exposure is performed a plurality of times in a short time every 1/30 seconds of the photographing period. For this reason, as shown in the figure, the ends of the ridges indicating the contours A1 to A4 in the graph of the first frame indicated by the solid line and the ridges indicating the contours B1 to B4 in the graph of the second frame indicated by the alternate long and short dash line The distance between the ends is kept small. Therefore, even for a user who views a moving image, the contour of the subject S in the first frame and the contour of the subject S in the second frame can be seen almost continuously, resulting in a high-quality moving image without a sense of disparity.

<段階的絞り込みによる適正輪郭選択>
しかし、上記の方式では、第1のコマの被写体Sの輪郭を示すA1〜A4、および第2のコマの被写体Sの輪郭を示すエッジB1〜B4のように、同形状のエッジが等間隔で並んでいる。この場合、第1のコマのエッジに対応する同一のエッジを第2のコマから誤って選択してしまう恐れがある。すなわち、本例の場合、特許文献2の場合と同様に、同一形状の輪郭が同一間隔で並ぶため、ブロックを限定した特徴点検出による比較では、対応する箇所を誤って認識する可能性があるからである。
<Selecting the appropriate contour by stepwise refinement>
However, in the above method, edges of the same shape are equally spaced, such as A1 to A4 indicating the contour of the subject S of the first frame and edges B1 to B4 indicating the contour of the subject S of the second frame. Are lined up. In this case, there is a possibility that the same edge corresponding to the edge of the first frame is erroneously selected from the second frame. That is, in the case of this example, as in the case of Patent Document 2, since the contours of the same shape are arranged at the same interval, there is a possibility that the corresponding part is erroneously recognized in the comparison by the feature point detection with the blocks limited. Because.

具体的には、図8(D)で、エッジA1に対応するエッジをB1ではなく、誤って同形状のエッジB2であると認識した場合、実際はA1からB1への移動であるのにA1からB2への移動という認識となり、移動量が真の値より目減りする事態が起きてしまう。故に、移動方向にずれながら重なりあうエッジ群から適正なエッジを抽出するための方法が必要となる。   Specifically, in FIG. 8D, when the edge corresponding to the edge A1 is mistakenly recognized as the edge B2 having the same shape instead of B1, the movement from A1 to A1 is actually performed from A1 to B1. It becomes recognition that the movement to B2, and a situation occurs in which the movement amount is reduced from the true value. Therefore, a method for extracting an appropriate edge from a group of edges that overlap while shifting in the moving direction is required.

上記問題に対し、本発明は、以下に説明するように、オプティカルフローの推定において2段階の絞り込み手順を行うことにより解決する。   As described below, the present invention solves the above problem by performing a two-stage narrowing-down procedure in optical flow estimation.

すなわち、第1のコマおよびその次の第2のコマの画像を得られた後、最初の手順として、画像輝度値に対して、画像の所定方向(水平方向・垂直方向等)へ所定の数の隣接画素と輝度値を平均化し、高周波成分を除去するローパスフィルタ処理を行う。   That is, after images of the first frame and the next second frame are obtained, as a first procedure, a predetermined number of images in a predetermined direction (horizontal direction, vertical direction, etc.) with respect to the image luminance value The adjacent pixels and luminance values are averaged, and a low-pass filter process for removing high frequency components is performed.

例えば、水平方向の輝度値の平均化を例に説明を行うと、下記のようになる。
元データのx列目の画素の輝度値をI(x)としたとき、ローパスフィルタ処理を行った後に得られる輝度値I(x)は、その前後所定の数の画素を平均化する処理を行うことで算出される。例えば、前後3個を用いた平均化の場合、輝度値I(x)は注目画素の前3個、後ろ3個、注目画素自身1個の合計7個の画素における輝度I(x)の平均をとり、下記(2)式のよう表される。
(x)={I(x−3)+I(x−2)+I(x−1)+I(x)+I(x+1)+I(x+2)+I(x+3)}/(3+3+1) …(2)
For example, an example of averaging luminance values in the horizontal direction is as follows.
When the luminance value of the pixel in the x-th column of the original data is I 1 (x), the luminance value I 2 (x) obtained after performing the low-pass filter process averages a predetermined number of pixels before and after that. Calculated by performing processing. For example, in the case of averaging using the front and rear three pixels, the luminance value I 2 (x) is the luminance I 1 (x) in a total of seven pixels: three in front of the target pixel, three in the back, and one target pixel itself. Is expressed as the following formula (2).
I 2 (x) = {I 1 (x−3) + I 1 (x−2) + I 1 (x−1) + I 1 (x) + I 1 (x + 1) + I 1 (x + 2) + I 1 (x + 3)} / (3 + 3 + 1) (2)

なお、本例は、前後3個の計7個の画素信号の平均で説明を行ったが、その画素数に限られるものではなく、隣接する複数の画素信号の平均を用いてローパスフィルタ処理を行う方式であれば、何個の画素信号を用いた場合でも本発明には適用可能である。
上記動作は、特許請求の範囲における「生成された第1または第2の画像信号に対し、各画素部の輝度値をそれに隣接する所定の数の他の画素部の輝度値との平均をとることにより第3または第4の画像信号を生成する動作」に対応する。また、上記ローパスフィルタにより高周波成分を除去可能な手段は、特許請求の範囲における「第1および第2の平均化手段」に対応する。
Although this example has been described with an average of a total of seven pixel signals of three before and after, it is not limited to the number of pixels, and low-pass filter processing is performed using the average of a plurality of adjacent pixel signals. As long as the method is used, the present invention can be applied to any number of pixel signals.
In the above-described operation, in the claims, for the generated first or second image signal, the luminance value of each pixel unit is averaged with the luminance values of a predetermined number of other pixel units adjacent thereto. This corresponds to “the operation of generating the third or fourth image signal”. The means capable of removing high frequency components by the low-pass filter corresponds to “first and second averaging means” in the claims.

図8の分割露光により得られた動画画像の輝度データI(x)(第1および第2の画像信号)に、ローパスフィルタ処理を行って得られた輝度データI(x)(第3および第4の画像信号)の画像例を図9(A)および図9(B)に示す。これらの図によれば、高周波成分が除去され、画像の輪郭がぼやけた輝度データI(x)が得られている。なお、本例は、単純平均を用いたが、これに限るものではなく、各画素の輝度値に重みつけ係数をかけ合わせた重みつけ平均を行ってもよく、平均化を用いた高周波成分除去工程ならば、本発明には適用可能である。 The luminance data I 2 (x) (third) obtained by performing low-pass filter processing on the luminance data I 1 (x) (first and second image signals) of the moving image obtained by the divided exposure of FIG. 9A and 9B show examples of images of the fourth and fourth image signals. According to these figures, high-frequency components are removed, and luminance data I 2 (x) in which the contour of the image is blurred is obtained. In this example, simple averaging is used. However, the present invention is not limited to this. Weighted averaging by multiplying the luminance value of each pixel by a weighting coefficient may be performed, and high-frequency component removal using averaging is performed. Any process can be applied to the present invention.

なお、上記の輝度I(x)を得る動作は、特許請求の範囲における「各画素部の輝度値をそれに隣接する所定の数の他の画素部の輝度値との平均をとることにより第3または第4の画像信号を生成する動作」に対応する。 The operation for obtaining the luminance I 2 (x) is described in the claims as “by averaging the luminance value of each pixel portion with the luminance values of a predetermined number of other pixel portions adjacent thereto. This corresponds to the “operation for generating the third or fourth image signal”.

図9(C)は、図示のラインα’’’の行の画素においてのx方向位置(x方向の何列目の画素であるか)と、輝度I(x)との関係を表すグラフである。図8(C)における実線部は、第1のコマにおけるラインα’’’上における画素の輝度値を示し、一点鎖線部は、第2のコマでのラインα’’’上における画素の輝度値を示す。また、縦軸に記載の輝度Iaは、被写体S(新幹線)車体の輝度を示し、Ibは、背景の輝度を示す。本例では、Ia>Ibとする。   FIG. 9C is a graph showing the relationship between the luminance I (x) and the x-direction position (which column of pixels in the x-direction) of the pixels in the row α ′ ″ shown in the figure. is there. The solid line portion in FIG. 8C indicates the luminance value of the pixel on the line α ′ ″ in the first frame, and the alternate long and short dash line portion indicates the luminance of the pixel on the line α ′ ″ in the second frame. Indicates the value. The luminance Ia shown on the vertical axis indicates the luminance of the subject S (Shinkansen) vehicle body, and Ib indicates the luminance of the background. In this example, Ia> Ib.

図9(A)および図9(B)においてローパスフィルタ処理によって輪郭がぼやけている箇所は、図9(C)の輝度のグラフにおいては、以下のようになる。すなわち、図9(C)のから明らかなように、対応する輪郭の箇所は、ローパスフィルタ処理前の点線で示す階段状から、実線および一点鎖線で示す略線形に立ち上がるグラフに変わっている。   9A and 9B, the portion where the outline is blurred by the low-pass filter processing is as follows in the luminance graph of FIG. 9C. That is, as is clear from FIG. 9C, the corresponding contour portion has changed from a staircase shape indicated by a dotted line before low-pass filter processing to a graph that rises substantially linearly indicated by a solid line and a one-dot chain line.

図9(D)は、図示のラインα’’’の行の画素においてのx方向位置と、輝度の勾配値K(x)との関係を表すグラフである。輝度のグラフの場合と同様に、実線部は、第1のコマにおけるラインα’’’上における画素の輝度の勾配値を示し、一点鎖線部は、第2のコマでのラインα’’’上における画素の輝度の勾配値を示す。 FIG. 9D is a graph showing the relationship between the position in the x direction and the luminance gradient value K 2 (x) in the pixels in the row α ′ ″ shown in the drawing. As in the case of the luminance graph, the solid line portion indicates the gradient value of the luminance of the pixel on the line α ′ ″ in the first frame, and the alternate long and short dash line portion indicates the line α ′ ″ in the second frame. The gradient value of the luminance of the upper pixel is shown.

この時、図9(D)に示すように、微分値が一定以上の値を持つ箇所がx軸方向位置において広い範囲に存在してしまう。そのため、精密な位置測定はできない。そこで、輝度I(x)のデータの水平方向(x方向)の勾配値が所定の値以上の値を示す画素群を抽出し、その中心位置を求める。第1のコマにおいて勾配値が一定以上の値を持つ画素群の中心位置をG1、同様に、第2のコマにおいて勾配値が一定以上の値を持つ画素群の中心位置をG2とする。 At this time, as shown in FIG. 9D, a portion having a differential value greater than a certain value exists in a wide range in the x-axis direction position. Therefore, precise position measurement is not possible. Therefore, a pixel group in which the gradient value in the horizontal direction (x direction) of the luminance I 2 (x) data is greater than or equal to a predetermined value is extracted, and the center position is obtained. Let G1 be the center position of a pixel group having a gradient value equal to or greater than a certain value in the first frame, and G2 be the center position of a pixel group having a gradient value equal to or greater than a certain value in the second frame.

第1のコマにおける中心位置(第1の中心)G1および第2のコマにおける中心位置(第2の中心)G2を求めたら、ブロックマッチング法により概略オプティカルフローFG1G2を求める。概略オプティカルフローFG1G2は、第1のコマと第2のコマにおいて対応する中心位置の移動方向および移動量を示す。概略オプティカルフローFG1G2は、ローパスフィルタにより、前述の図6の場合と同様に、画像輪郭が不鮮明になった状態で求めたオプティカルフローであり、およその移動量および方向を示し、精密に輪郭位置を推定できてはいない。 After obtaining the center position (first center) G1 in the first frame and the center position (second center) G2 in the second frame, the approximate optical flow F G1G2 is obtained by the block matching method. The schematic optical flow F G1G2 indicates the moving direction and moving amount of the corresponding center position in the first frame and the second frame. The general optical flow F G1G2 is an optical flow obtained with a low-pass filter in the state in which the image contour is unclear, as in the case of FIG. 6 described above, and shows the approximate amount of movement and direction, and the contour position precisely. Has not been estimated.

しかし、本発明の要旨としては、このおよその移動ベクトルと、前述の1撮影周期に複数回露光をすることにより得られる複数の先鋭な輪郭部の双方を組み合わせて、もう一度ブロックマッチングを行うことで、精密な輪郭位置を求めることにある。   However, the gist of the present invention is to perform block matching once again by combining both the approximate movement vector and a plurality of sharp outlines obtained by performing the exposure a plurality of times in the above-described one photographing cycle. It is to obtain a precise contour position.

すなわち、概略オプティカルフローFG1G2を得られたら、次の手順として、それをもとに図8(A)〜図8(D)におけるローパスフィルタを印加する前の輝度I(x)のデータに戻る。そして、明瞭な輪郭を示す画像のエッジA1〜A4、B1〜B4の位置を特定する作業を行う。 That is, when the approximate optical flow F G1G2 is obtained, the data of the luminance I 1 (x) before applying the low-pass filter in FIG. 8A to FIG. Return. And the operation | work which pinpoints the position of edge A1-A4, B1-B4 of the image which shows a clear outline is performed.

ここで、図8(D)に示す輝度の勾配値に再度着目する。通常は部分的な特徴点一致を判断するブロックマッチングでは、このように同形状の輪郭が等間隔で並ぶ場合、一致する特徴点が並ぶため、例えば、第1のコマのエッジA1に対応するエッジが第2のコマにおけるB1〜B4のどれか判定できない。そのため、特徴点が一致するオプティカルフローは最大でエッジの数と同数の複数個検出されてしまうこととなり、この時点ではどれが正しいオプティカルフローか判別できない。該複数個検出されるオプティカルフロー群は、これ以降オプティカルフロー候補と記述する。ただし、オプティカルフロー候補は、先鋭に表された輪郭に基づくため、概略オプティカルフローFG1G2を用いて、オプティカルフロー候補の選択を誤らなければ、結果として、精密なオプティカルフローを得ることができる。 Here, attention is again paid to the gradient value of the luminance shown in FIG. Normally, in block matching in which partial feature point matching is determined, when contours of the same shape are arranged at equal intervals, matching feature points are arranged, for example, an edge corresponding to the edge A1 of the first frame. Cannot determine any of B1 to B4 in the second frame. Therefore, a plurality of optical flows with the same feature point are detected at the same number as the number of edges, and at this time, it cannot be determined which is the correct optical flow. The plurality of detected optical flow groups are hereinafter referred to as optical flow candidates. However, since the optical flow candidate is based on a sharply represented contour, if the optical flow candidate is not selected erroneously using the approximate optical flow F G1G2 , a precise optical flow can be obtained as a result.

すなわち、前述のように本発明の手順においては、先にローパスフィルタを印加した輝度I2(x)のデータより、およその移動ベクトルである概略オプティカルフローFG1G2を求めてある。そのため、エッジA1からその概略オプティカルフローFG1G2だけずれた地点の付近に第2のコマにおけるエッジA1に対応するエッジがあると推測することが可能となっている。よって、エッジA1から概略オプティカルフローFG1G2だけずれた地点を起点にブロックマッチングを開始し、特徴点が一致した輪郭のうち、起点に最も近い位置にある輪郭が対応するエッジであると判断することで、検出精度を上げることが可能である。 That is, as described above, in the procedure of the present invention, the approximate optical flow F G1G2 that is an approximate movement vector is obtained from the data of the luminance I2 (x) to which the low-pass filter has been previously applied. Therefore, it can be estimated that there is an edge corresponding to the edge A1 in the second frame in the vicinity of a point shifted from the edge A1 by the approximate optical flow FG1G2 . Therefore, block matching is started from a point shifted from the edge A1 by the approximate optical flow F G1G2 , and it is determined that the contour closest to the starting point is the corresponding edge among the contours having the matching feature points. Thus, the detection accuracy can be increased.

図10は、上記オプティカルフロー推定手順のフローチャートを示す。
フローが開始されると、まず、ステップS001において、一撮影周期中に複数回に分けて露光・転送・蓄積を行って動画を取得する。すなわち、第1の撮影周期(第1のコマ)から第1の画像信号である輝度I(x)を取得し、第2の撮影周期(第2のコマ)から第2の画像信号である輝度I(x)を取得する。次に、ステップS101において、前ステップで得られた第1および第2の画像信号に対し、それぞれ、前述の所定の数の隣接画素信号との平均化によるローパスフィルタ処理を施し、第3および第4の画像信号(輝度I(x)のデータ)を生成する。
FIG. 10 shows a flowchart of the optical flow estimation procedure.
When the flow starts, first, in step S001, a moving image is acquired by performing exposure, transfer, and accumulation in a plurality of times during one shooting period. That is, the luminance I 1 (x) that is the first image signal is acquired from the first imaging period (first frame), and the second image signal is acquired from the second imaging period (second frame). The luminance I 1 (x) is acquired. Next, in step S101, the first and second image signals obtained in the previous step are subjected to low-pass filter processing by averaging with the predetermined number of adjacent pixel signals, respectively. 4 image signals (luminance I 2 (x) data) are generated.

そして、ステップS102において、前ステップで生成された第3および第4の画像信号同士を比較して、およそのオプティカルフローである概略オプティカルフローFG1G2を算出する。また、ステップS201において、ステップS001で得られた第1および第2の画像信号I(x)同士を比較して前述のオプティカルフロー候補を選出する。ここで、第1および第2の画像信号に関しては、同一輪郭が同一間隔で複数並んでいるので、特徴点の比較を行うと、特徴が一致するオプティカルフロー候補が複数個挙がることとなる。 In step S102, the third and fourth image signals generated in the previous step are compared with each other, and an approximate optical flow F G1G2 that is an approximate optical flow is calculated. In step S201, the first and second image signals I 1 (x) obtained in step S001 are compared with each other, and the above-described optical flow candidates are selected. Here, with respect to the first and second image signals, a plurality of the same contours are arranged at the same interval. Therefore, when feature points are compared, a plurality of optical flow candidates with matching features are listed.

最後に、ステップS202において、前ステップにおいて選出された複数のオプティカルフロー候補の中から、ステップS102において得られた概略オプティカルフローFG1G2に最も近いものを最終的なオプティカルフローとして選択する。
以上で最終的なオプティカルフローを精度良く推定することができ、オプティカルフロー推定手順のフローを終了する。
Finally, in step S202, the closest optical flow F G1G2 obtained in step S102 is selected as the final optical flow from the plurality of optical flow candidates selected in the previous step.
Thus, the final optical flow can be accurately estimated, and the flow of the optical flow estimation procedure is completed.

なお、上述のオプティカルフロー推定手順は、特許請求の範囲における「オプティカルフロー候補算出手段、概略オプティカルフロー算出手段、およびオプティカルフロー推定手段」により実現される。   Note that the above-described optical flow estimation procedure is realized by “optical flow candidate calculation means, general optical flow calculation means, and optical flow estimation means” in the claims.

また、オプティカルフロー候補を選出する動作は、特許請求の範囲における「第1および第2の撮影周期間に被写体が移動する方向および量を示すベクトルである複数のオプティカルフロー候補を算出する動作」に対応する。また、概略オプティカルフローFG1G2を求める動作は、特許請求の範囲における「第1および第2の撮影周期間に被写体が移動する概ねの方向および量を示すベクトルである概略オプティカルフローを算出する動作」に対応する。さらに、真のオプティカルフローを求める動作は、特許請求の範囲における「複数のオプティカルフロー候補のうち概略オプティカルフローに最も近い1つのオプティカルフロー候補を最終的なオプティカルフローとして推定する動作」に対応する。 The operation for selecting the optical flow candidates is “operation for calculating a plurality of optical flow candidates that are vectors indicating the direction and amount of movement of the subject during the first and second imaging periods” in the claims. Correspond. The operation for obtaining the approximate optical flow F G1G2 is “the operation for calculating the approximate optical flow that is a vector indicating the approximate direction and amount of movement of the subject during the first and second imaging periods” in the claims. Corresponding to Further, the operation for obtaining the true optical flow corresponds to “operation for estimating one optical flow candidate closest to the approximate optical flow among the plurality of optical flow candidates as the final optical flow” in the claims.

以上、説明したように、本発明では、第1の手順として、ローパスフィルタをかけた画像データから精度の粗い移動ベクトルを求める。また、第2の手順として、その移動ベクトルに基づき元の画像データから精密な移動ベクトルを絞り込む。本発明は、このような2段階の絞りこみを行う。このような手順により、分割露光により画像に現れる複数のエッジの中から第1のコマから第2のコマへの移行の際に対応するエッジを正確に選出でき、分割露光を用いた場合においても真のオプティカルフローFA1B1の精密な推定を可能とする。 As described above, in the present invention, as a first procedure, a movement vector having a high accuracy is obtained from image data subjected to a low-pass filter. As a second procedure, a precise movement vector is narrowed down from the original image data based on the movement vector. The present invention performs such two-stage narrowing. By such a procedure, the edge corresponding to the transition from the first frame to the second frame can be accurately selected from a plurality of edges appearing in the image by the divided exposure, and even when the divided exposure is used. Allows precise estimation of the true optical flow F A1B1 .

<分割間隔の不均一化>
前述の前後コマ間において対応する輪郭の選択精度は、下記の方法を用いることにより向上させることができる。
<Non-uniform division interval>
The accuracy of selecting the corresponding contours between the preceding and following frames can be improved by using the following method.

前述の図4においては、1撮影周期間に4回露光する際に、各露光タイミング602−1,602−2,602−3,602−4間の時間間隔が均等であるとしていた。その結果図8(A)〜図8(D)のように、被写体Sの輪郭が進行方向に均等幅だけずれて重なりあった画像が得られており、同形状の輪郭が均等幅ずれているが故に特徴点が等しい箇所が複数候補得られてしまい、誤った輪郭を選ぶ恐れがあった。   In FIG. 4, the time intervals between the exposure timings 602-1, 602-2, 602-3, and 602-4 are assumed to be uniform when performing exposure four times during one photographing period. As a result, as shown in FIGS. 8A to 8D, an image is obtained in which the outline of the subject S is shifted by a uniform width in the traveling direction, and the contour of the same shape is shifted by a uniform width. Therefore, a plurality of candidates having the same feature point are obtained, and there is a possibility of selecting an incorrect contour.

そこで、図11に示すように、1撮影周期間に4回露光する際に、各露光タイミング702−1,702−2,702−3,702−4間の時間間隔T12,T23,T34を等間隔でなく、不均一間隔とする構成をとってもよい。本実施例では、T23<T12<T34であるが、これに限られることはない。これらの時間間隔は、少なくとも2つがお互いに異なる時間間隔であればよい。   Therefore, as shown in FIG. 11, when exposure is performed four times during one photographing period, time intervals T12, T23, T34 between the exposure timings 702-1, 702-2, 702-3, and 702-4 are set to be equal. A configuration may be adopted in which not uniform intervals but non-uniform intervals are employed. In this embodiment, T23 <T12 <T34, but the present invention is not limited to this. These time intervals may be at least two time intervals different from each other.

本実施例で得られる画像を図12(A)および図12(B)に示す。図示の被写体Sが等速運動をする場合、被写体Sの輪郭は、C1〜C4、D1〜D4のように、進行方向にずれながら不均一な間隔で4重の輪郭が並ぶ画像となる。   Images obtained in this example are shown in FIGS. 12 (A) and 12 (B). When the illustrated subject S moves at a constant speed, the contour of the subject S is an image in which quadruple contours are arranged at non-uniform intervals while shifting in the traveling direction, such as C1 to C4 and D1 to D4.

図12(C)は、図示のラインα’’’’の行の画素においてのx方向位置(x方向の何列目の画素であるか)と、輝度I(x)との関係を表すグラフである。図12(C)における実線部は第1のコマにおけるラインα’’’’上における画素の輝度値を示し、一点鎖線部は、第2のコマでのラインα’’’’上における画素の輝度値を示す。   FIG. 12C is a graph showing the relationship between the luminance I (x) and the x-direction position (which column is the pixel in the x-direction) in the pixel in the row α ″ ″ shown in the figure. It is. The solid line portion in FIG. 12C indicates the luminance value of the pixel on the line α ″ ″ in the first frame, and the alternate long and short dash line portion indicates the pixel value on the line α ″ ″ in the second frame. Indicates the luminance value.

この時、図12(A)および図12(B)における被写体Sの輪郭部は、不均一な間隔でずれながら4重に重なった先鋭な輪郭部になる。すなわち、図12(C)の輝度値I(x)のグラフにおいて、該当する箇所がそれぞれ不均一な間隔をもって急激に立ち上がる階段状のグラフになる。   At this time, the contour portion of the subject S in FIGS. 12A and 12B becomes a sharp contour portion that is overlapped four times while being displaced at non-uniform intervals. That is, in the graph of the luminance value I (x) in FIG. 12C, a corresponding step becomes a staircase graph in which the portions suddenly rise at non-uniform intervals.

また、図12(D)は、図示のラインα’’’’の行の画素においてのx方向位置と、輝度の勾配値K(x)との関係を表すグラフである。輝度のグラフの場合と同様に、実線部は、第1のコマにおけるラインα’’’’上における画素の輝度の勾配値を示し、一点鎖線部は、第2のコマでのラインα’’’’上における画素の輝度の勾配値を示す。   FIG. 12D is a graph showing the relationship between the x-direction position and the luminance gradient value K (x) in the pixels in the row of the line α ′ ″ ″. As in the case of the luminance graph, the solid line portion indicates the gradient value of the luminance of the pixel on the line α ″ ″ in the first frame, and the alternate long and short dash line portion indicates the line α ″ in the second frame. '' Indicates the gradient value of the luminance of the pixel above.

上記の図12(A)および図12(B)における不均一にずれながら4重に重なった先鋭な輪郭の箇所は、図12(D)における輝度勾配値において、該当箇所4か所が不均一にx軸方向にずれている。また、その輪郭の箇所は、ごく狭いx軸の範囲でのみ、局所的に大きな勾配値(K3と表記)まで上昇する。また、それが第1のコマおよび第2のコマそれぞれに存在することがわかる。   12A and 12B, the sharply contoured portions that are quadruply overlapped with each other are unevenly distributed at the four locations in the brightness gradient value in FIG. 12D. Is shifted in the x-axis direction. Further, the location of the contour rises locally to a large gradient value (denoted as K3) only in a very narrow x-axis range. It can also be seen that it exists in each of the first frame and the second frame.

この時、輝度勾配値が一定以上の値を持つ箇所がごく狭い範囲であるため、各コマにおけるそれぞれ不均一な間隔で並ぶ4か所の輪郭のx軸方向の位置を精密に求めることができる。ここで、図8(D)の場合と異なり、本発明の要旨として、輪郭が同形状であってもエッジC1〜C2,C2〜C3,C3〜C4の間隔d12,d23,d34がそれぞれ異なる値であることに注目する。エッジD1〜D2,D2〜D3,D3〜D4の間隔も同様である。この時、不均等に並んでいるが故に、輪郭の特徴点同士の相対距離に差が出ており、それをもって、該当エッジがどのエッジにあたるか見分けることが可能となる。それ故に、この構成を用いることでブロックマッチングでも対応するエッジを誤って選択することはなくなる。そのため、1撮影周期に複数回に分けて露光・転送・蓄積を行っていても、オプティカルフローを誤って見積もることなく、精密に推定することが可能となる。   At this time, since the portion where the luminance gradient value has a certain value or more is a very narrow range, the positions in the x-axis direction of the four contours arranged at non-uniform intervals in each frame can be accurately obtained. . Here, unlike the case of FIG. 8D, the gist of the present invention is that the intervals d12, d23, d34 of the edges C1-C2, C2-C3, C3-C4 are different from each other even if the outline is the same shape. Note that The same applies to the intervals between the edges D1 to D2, D2 to D3, D3 to D4. At this time, since the lines are unevenly arranged, there is a difference in the relative distance between the feature points of the contour, and it is possible to identify which edge the corresponding edge corresponds to. Therefore, by using this configuration, the corresponding edge is not erroneously selected even in block matching. For this reason, even if exposure, transfer, and accumulation are performed in a plurality of times in one shooting cycle, it is possible to accurately estimate the optical flow without erroneous estimation.

また、不均一間隔ながらも複数回露光するため、図12(D)の勾配値のグラフにおいて、第1のコマの被写体Sの輪郭を示す隆起部C1〜C4の左端と第2のコマでの輪郭を示す隆起部D1〜D4の右端の間に開く間隔が小さく抑えられている。そのため、動画を視聴するユーザーにとっても第1のコマにおける新幹線の輪郭と第2のコマにおける被写体Sの輪郭がほぼ連続して見え、パラパラ感のない高品位な動画となっている。   Further, since exposure is performed a plurality of times with non-uniform intervals, in the gradient value graph of FIG. 12D, the left edge of the raised portions C1 to C4 indicating the contour of the subject S of the first frame and the second frame The space | interval opened between the right ends of the protruding parts D1-D4 which show an outline is restrained small. Therefore, even for a user who views a moving image, the outline of the Shinkansen in the first frame and the contour of the subject S in the second frame are almost continuous, and the high-quality moving image has no sense of disparity.

以上、1撮影周期における複数の露光タイミングを不均等な時間間隔で行うことにより、精密なオプティカルフローを算出しつつも、高品位な動画の取得を可能な構成が実現できている。また、上記の複数の露光タイミングを不均等な時間間隔で行うことは、特許請求の範囲における「第1および第2の撮影周期の各々において、n回の信号電荷転送は、それらを開始するnの転送タイミングの時間間隔が互いに異なるように実行される」に対応する。   As described above, by performing a plurality of exposure timings in one shooting cycle at unequal time intervals, it is possible to realize a configuration capable of acquiring a high-quality moving image while calculating a precise optical flow. In addition, performing the plurality of exposure timings at unequal time intervals means that “in each of the first and second imaging cycles, n signal charge transfers start n times in each of the first and second imaging periods”. Are executed such that the time intervals of the transfer timing are different from each other.

<信号電荷転送タイミング同士の時間間隔>
信号電荷転送タイミング同士の時間間隔、すなわち、図4における複数回の露光タイミング同士の時間間隔は、1/120秒以下になるように、露光・伝送・蓄積の回数を設定することが望ましい。これは、人間の反射速度が一般的に1/120秒以下の時間における変化を読み取ることが困難であり、これ以下の時間間隔とすることでパラパラ感が目立たず、高品位な動画を提供できるためである。
<Time interval between signal charge transfer timings>
It is desirable to set the number of exposure / transmission / accumulation times so that the time interval between signal charge transfer timings, that is, the time interval between multiple exposure timings in FIG. This is because it is difficult to read the change in the time when the human reflection speed is generally 1/120 seconds or less, and by setting the time interval below this time, the sense of disparity is not noticeable and a high-quality moving image can be provided. Because.

そのため、一例として、1コマの露光時間が1/30秒の動画撮影であれば、1コマ内で最低4回分割して露光を行い、4回の露光同士の時間間隔を1/120秒以下となるようにする。また、1コマの露光時間が1/60秒であれば、最低2回分割して、2回の露光同士の時間間隔を1/120秒以下となるようにする。   Therefore, as an example, if a movie is shot with an exposure time of 1/30 seconds for one frame, the exposure is performed by dividing the frame at least four times within one frame, and the time interval between the four exposures is 1/120 seconds or less. To be. If the exposure time of one frame is 1/60 seconds, the exposure time is divided at least twice so that the time interval between the two exposures is 1/120 seconds or less.

上記構成により、複数回の露光の回数を適正化し、よりパラパラ感の感じられない高品位な動画を取得可能な構成を実現できる。   With the above configuration, it is possible to realize a configuration in which the number of times of multiple exposures is optimized and a high-quality moving image that does not feel a sense of disparity can be acquired.

なお、上記時間間隔を1/120秒以下になるように回数を設定する動作は、特許請求の範囲における「n回の信号電荷転送を開始するnの転送タイミングの時間間隔がそれぞれ1/120秒以下になるようにnの値を増減させる動作」に対応する。   The operation of setting the number of times so that the time interval is 1/120 second or less is as follows: “The time interval of the transfer timing of n starting n times of signal charge transfer is 1/120 second. This corresponds to the operation of increasing / decreasing the value of n so as to be as follows.

<変形例>
上述の撮像装置において、図2のシステム制御CPU(制御手段)178は、動画撮影中において、被写体が動体か否かを判定する動体判定手段を備えていてもよい。この場合、動体判定手段により被写体が動体と判定されたとき、図10に示すオプティカルフロー推定手順が実行される。これにより、動画撮影時に高精度なオプティカルフローを得ることができる。
<Modification>
In the imaging apparatus described above, the system control CPU (control unit) 178 in FIG. 2 may include a moving body determination unit that determines whether or not the subject is a moving body during moving image shooting. In this case, when the moving object determination unit determines that the subject is a moving object, the optical flow estimation procedure shown in FIG. 10 is executed. Thereby, a highly accurate optical flow can be obtained during moving image shooting.

また、図2のシステム制御CPU(制御手段)178は、動画撮影中において、被写体(動体)の速度または手ぶれ速度を判定する速度判定手段を備えていてもよい。この場合、速度判定手段により被写体の速度または手ぶれ速度が所定値以上と判定されたとき、図10に示すオプティカルフロー推定手順が実行される。また、システム制御CPU178は、速度判定手段により検出される被写体の速度または手ぶれ速度と、1撮影周期中に信号電荷転送を行う回数または転送タイミングの時間間隔と、の間に関連付けを行ってもよい。この関連付けは、LUT(look up table)として記憶される。例えば、システム制御CPU178は、被写体の速度または手ぶれ速度が大きくなるに従い、信号電荷転送を行う回数を多くし、または転送タイミングの時間間隔を短くする。これにより、動画撮影時に高精度なオプティカルフローを得ることができる。なお、上記において信号電荷転送を行う回数は、露光回数でもよいし、転送タイミングは、露光タイミングでもよい。   Further, the system control CPU (control means) 178 in FIG. 2 may include speed determination means for determining the speed of the subject (moving object) or the camera shake speed during moving image shooting. In this case, the optical flow estimation procedure shown in FIG. 10 is executed when the speed determination means determines that the subject speed or the camera shake speed is equal to or greater than a predetermined value. Further, the system control CPU 178 may perform association between the subject speed or camera shake speed detected by the speed determination unit and the number of times signal charges are transferred during one shooting period or the time interval of transfer timing. . This association is stored as a lookup table (LUT). For example, the system control CPU 178 increases the number of signal charge transfers or shortens the time interval of transfer timing as the subject speed or camera shake speed increases. Thereby, a highly accurate optical flow can be obtained during moving image shooting. In the above, the number of signal charge transfers may be the number of exposures, and the transfer timing may be the exposure timing.

また、図2のシステム制御CPU(制御手段)178は、ユーザ(撮影者)による操作、例えば、高追従モードや手ぶれ補正強化モードなどへの移行指示に基づき、図10に示すオプティカルフロー推定手順を実行するか否かを決定してもよい。すなわち、システム制御CPU178は、所定の指示を受けたか否かを判定する指示判定手段を備え、かつ指示判定手段が所定の指示を受けたと判定したとき、図10に示すオプティカルフロー推定手順を実行する。これにより、動画撮影時に高精度なオプティカルフローを得ることができる。   Further, the system control CPU (control means) 178 in FIG. 2 performs the optical flow estimation procedure shown in FIG. 10 based on an operation by the user (photographer), for example, a transition instruction to the high follow-up mode or the image stabilization mode. It may be determined whether or not to execute. That is, the system control CPU 178 includes instruction determination means for determining whether or not a predetermined instruction has been received, and executes the optical flow estimation procedure shown in FIG. 10 when the instruction determination means determines that the predetermined instruction has been received. . Thereby, a highly accurate optical flow can be obtained during moving image shooting.

また、図2のシステム制御CPU(制御手段)178は、1撮影周期中に、複数回、露光・転送・蓄積のシーケンスを実行する。したがって、システム制御CPU178は、1撮影周期において、信号電荷転送を開始する転送タイミング(露光を開始する露光タイミングでもよい)の時間間隔が、1撮影周期の半分以下になるように、その時間間隔および信号電荷転送の回数を制御する。例えば、1撮影周期が1/120秒である場合、システム制御CPU178は、信号電荷転送の回数を2回に設定し、かつ転送タイミングの時間間隔を1/240秒以下に設定する。これにより、動画撮影時に高精度なオプティカルフローを得ることができる。   Further, the system control CPU (control means) 178 in FIG. 2 executes an exposure / transfer / accumulation sequence a plurality of times during one photographing period. Therefore, the system control CPU 178 determines that the time interval and the transfer timing for starting the signal charge transfer (or the exposure timing for starting the exposure) in one shooting cycle are less than half the one shooting cycle. Controls the number of signal charge transfers. For example, when one shooting period is 1/120 seconds, the system control CPU 178 sets the number of signal charge transfers to 2 and sets the time interval of transfer timing to 1/240 seconds or less. Thereby, a highly accurate optical flow can be obtained during moving image shooting.

上述の撮像装置において、図2のシステム制御CPU(制御手段)178が実行する機能は、ハードウェアにより実現してもよいし、ソフトウェアにより実現してもよいし、又は、それらの組み合わせにより実現してもよい。これらの機能が、ハードウェアにより実現されるか、ソフトウェアにより実現されるか、又は、それらの組み合わせにより実現されるかは、上述の撮像装置が使用される環境、又は、上述の撮像装置に課される設計制約など、に依存する。システム制御CPU178の機能がソフトウェアにより実行される場合、その機能を実現するプログラムは、ホスト装置からネットワークを介して上述の撮像装置に提供されてもよい。また、そのプログラムは、そのプログラムが記憶された記憶媒体(メモリカード、CDなど、のリムーバブルメモリを含む)から上述の撮像装置に提供されてもよい。この場合、システム制御CPU178は、ネットワークまたは記録媒体から取得したプログラム(ソフトウェア)を実行し、本発明に係る処理を実行する。なお、システム制御CPU178は、それと同等な機能を備える制御装置、例えば、マイコン、プロセッサ、ASIC(application specific integrated circuit)などに置き換えることも可能である。   In the imaging apparatus described above, the function executed by the system control CPU (control unit) 178 in FIG. 2 may be realized by hardware, software, or a combination thereof. May be. Whether these functions are realized by hardware, software, or a combination thereof depends on the environment in which the above-described imaging device is used or the above-described imaging device. Depends on design constraints etc. When the function of the system control CPU 178 is executed by software, a program for realizing the function may be provided from the host device to the above-described imaging device via a network. Further, the program may be provided to the above-described imaging apparatus from a storage medium (including a removable memory such as a memory card or a CD) in which the program is stored. In this case, the system control CPU 178 executes a program (software) acquired from a network or a recording medium, and executes processing according to the present invention. The system control CPU 178 can be replaced with a control device having a function equivalent to the system control CPU 178, for example, a microcomputer, a processor, an ASIC (application specific integrated circuit), or the like.

<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<Other embodiments>
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

以上、本発明の好ましい実施形態について説明したが、本発明は、これらの実施形態に限定されず、その要旨の範囲内で種々の変形および変更が可能である。   As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.

500 光電変換部
507A 第1の信号保持部
300,301 画素部
184 撮像素子
178,189 制御手段
151 撮像装置
500 Photoelectric Conversion Unit 507A First Signal Holding Unit 300, 301 Pixel Unit 184 Imaging Element 178, 189 Control Unit 151 Imaging Device

Claims (12)

複数の画素部を有し、かつ各画素部が光電変換部および信号保持部を含む撮像素子と、
前記撮像素子を制御する制御手段と、を備え、
前記制御手段は、
第1の撮影周期中に、前記光電変換部から前記信号保持部へのn回の信号電荷転送(nは2以上の自然数)により前記信号保持部に蓄積された信号電荷に基づき、第1の画像信号を生成する第1の画像信号生成手段と、
第2の撮影周期中に、前記光電変換部から前記信号保持部へのn回の信号電荷転送により前記信号保持部に蓄積された信号電荷に基づき、第2の画像信号を生成する第2の画像信号生成手段と、
前記生成された第1の画像信号に対し、各画素部の輝度値をそれに隣接する所定の数の他の画素部の輝度値との平均をとることにより第3の画像信号を生成する第1の平均化手段と、
前記生成された第2の画像信号に対し、各画素部の輝度値をそれに隣接する所定の数の他の画素部の輝度値との平均をとることにより第4の画像信号を生成する第2の平均化手段と、
前記第1および第2の画像信号を比較することにより、前記第1および第2の撮影周期間に被写体が移動する方向および量を示すベクトルである複数のオプティカルフロー候補を算出するオプティカルフロー候補算出手段と、
前記第3および第4の画像信号を比較することにより、前記第1および第2の撮影周期間に前記被写体が移動する概ねの方向および量を示すベクトルである概略オプティカルフローを算出する概略オプティカルフロー算出手段と、
前記複数のオプティカルフロー候補のうち前記概略オプティカルフローに最も近い1つのオプティカルフロー候補を最終的なオプティカルフローとして推定するオプティカルフロー推定手段と、
を備える撮像装置。
An imaging device having a plurality of pixel portions and each pixel portion including a photoelectric conversion unit and a signal holding unit;
Control means for controlling the image sensor,
The control means includes
Based on the signal charges accumulated in the signal holding unit by n signal charge transfers (n is a natural number of 2 or more) from the photoelectric conversion unit to the signal holding unit during the first imaging cycle, First image signal generation means for generating an image signal;
A second image signal is generated based on the signal charge accumulated in the signal holding unit by n times of signal charge transfer from the photoelectric conversion unit to the signal holding unit during the second imaging cycle. Image signal generating means;
A first image signal is generated by averaging the luminance value of each pixel unit with the luminance values of a predetermined number of other pixel units adjacent to the generated first image signal. Means of averaging,
A second image signal is generated by averaging the luminance value of each pixel unit with the luminance value of a predetermined number of other pixel units adjacent to the generated second image signal. Means of averaging,
An optical flow candidate calculation that calculates a plurality of optical flow candidates that are vectors indicating the direction and amount of movement of the subject between the first and second imaging cycles by comparing the first and second image signals. Means,
A schematic optical flow that calculates a schematic optical flow that is a vector indicating a general direction and amount of movement of the subject during the first and second imaging periods by comparing the third and fourth image signals. A calculation means;
Optical flow estimation means for estimating one optical flow candidate closest to the approximate optical flow among the plurality of optical flow candidates as a final optical flow;
An imaging apparatus comprising:
複数の画素部を有し、かつ各画素部が光電変換部および信号保持部を含む撮像素子と、
前記撮像素子を制御する制御手段と、を備え、
前記制御手段は、
第1の撮影周期中に、前記光電変換部から前記信号保持部へのn回の信号電荷転送(nは2以上の自然数)により前記信号保持部に蓄積された信号電荷に基づき、第1の画像信号を生成する第1の画像信号生成手段と、
第2の撮影周期中に、前記光電変換部から前記信号保持部へのn回の信号電荷転送により前記信号保持部に蓄積された信号電荷に基づき、第2の画像信号を生成する第2の画像信号生成手段と、
前記第1および第2の画像信号を比較することにより、前記第1および第2の撮影周期間に被写体が移動する方向および量を示すベクトルである最終的なオプティカルフローを推定するオプティカルフロー推定手段と、を備え、
前記第1および第2の撮影周期の各々において、前記n回の信号電荷転送は、それらを開始するnの転送タイミングの時間間隔が互いに異なるように実行される、
撮像装置。
An imaging device having a plurality of pixel portions and each pixel portion including a photoelectric conversion unit and a signal holding unit;
Control means for controlling the image sensor,
The control means includes
Based on the signal charges accumulated in the signal holding unit by n signal charge transfers (n is a natural number of 2 or more) from the photoelectric conversion unit to the signal holding unit during the first imaging cycle, First image signal generation means for generating an image signal;
A second image signal is generated based on the signal charge accumulated in the signal holding unit by n times of signal charge transfer from the photoelectric conversion unit to the signal holding unit during the second imaging cycle. Image signal generating means;
Optical flow estimation means for estimating a final optical flow that is a vector indicating the direction and amount of movement of the subject between the first and second imaging periods by comparing the first and second image signals. And comprising
In each of the first and second imaging periods, the n signal charge transfers are executed such that the time intervals of the n transfer timings that start them are different from each other.
Imaging device.
前記制御手段は、前記第1および第2の撮影周期の各々において、前記n回の信号電荷転送を開始するnの転送タイミングの時間間隔がそれぞれ1/120秒以下になるようにnの値を増減させる、請求項1または2に記載の撮像装置。   The control means sets the value of n so that the time interval of the transfer timing of n starting the n times of signal charge transfer is 1/120 second or less in each of the first and second imaging periods. The imaging device according to claim 1, wherein the imaging device is increased or decreased. 前記制御手段は、前記被写体が動体か否かを判定する動体判定手段をさらに備え、かつ前記動体判定手段により前記被写体が動体と判定されたとき、前記最終的なオプティカルフローを推定する、請求項1から3のいずれか1項に記載の撮像装置。   The control means further comprises a moving object determining means for determining whether or not the subject is a moving object, and estimates the final optical flow when the moving object determining means determines that the subject is a moving object. The imaging device according to any one of 1 to 3. 前記制御手段は、前記被写体の速度または手ぶれ速度を判定する速度判定手段をさらに備え、かつ前記速度判定手段により前記被写体の速度または前記手ぶれ速度が所定値以上と判定されたとき、前記最終的なオプティカルフローを推定する、請求項1から4のいずれか1項に記載の撮像装置。   The control means further includes a speed determination means for determining the speed of the subject or the camera shake speed, and when the speed determination means determines that the speed of the subject or the camera shake speed is equal to or greater than a predetermined value, the final control means The imaging device according to claim 1, wherein the optical flow is estimated. 前記制御手段は、所定の指示を受けたか否かを判定する指示判定手段をさらに備え、かつ前記指示判定手段により前記所定の指示を受けたと判定されたとき、前記最終的なオプティカルフローを推定する、請求項1から5のいずれか1項に記載の撮像装置。   The control means further includes instruction determination means for determining whether or not a predetermined instruction has been received, and estimates the final optical flow when the instruction determination means determines that the predetermined instruction has been received. The imaging device according to any one of claims 1 to 5. 前記制御手段は、前記第1または第2の撮影周期において、前記n回の信号電荷転送を開始するnの転送タイミングの時間間隔が、少なくとも前記第1または第2の撮影周期の半分以下になるように、その時間間隔およびnの値を制御する、請求項1から6のいずれか1項に記載の撮像装置。   In the first or second imaging cycle, the control means has a time interval of n transfer timings at which the n times of signal charge transfer is started to be at least half of the first or second imaging cycle. The imaging device according to claim 1, wherein the time interval and the value of n are controlled as described above. 前記制御手段は、前記被写体の速度または手ぶれ速度を判定する速度判定手段をさらに備え、かつ前記速度判定手段により検出される前記被写体の速度または前記手ぶれ速度が大きくなるに従い、nの値を多くし、または前記n回の信号電荷転送を開始するnの転送タイミングの時間間隔を短くする、請求項1から7のいずれか1項に記載の撮像装置。   The control means further includes a speed determination means for determining the speed of the subject or the camera shake speed, and increases the value of n as the speed of the subject or the camera shake speed detected by the speed determination means increases. The imaging apparatus according to claim 1, wherein a time interval of n transfer timings at which the n times of signal charge transfer is started is shortened. 前記第1の画像信号は、前記第1の撮影周期中に、n回の第1の露光を行い、各第1の露光により前記光電変換部で発生した信号電荷を前記信号保持部に転送することにより生成され、
前記第2の画像信号は、前記第2の撮影周期中に、n回の第2の露光を行い、各第2の露光により前記光電変換部で発生した信号電荷を前記信号保持部に転送することにより生成される、
請求項1から8のいずれか1項に記載の撮像装置。
The first image signal is subjected to n first exposures during the first imaging period, and signal charges generated in the photoelectric conversion unit by each first exposure are transferred to the signal holding unit. Generated by
The second image signal is subjected to n second exposures during the second imaging period, and the signal charges generated in the photoelectric conversion unit by each second exposure are transferred to the signal holding unit. Generated by
The imaging device according to any one of claims 1 to 8.
前記第1および第2の撮影周期の各々において、前記n回の信号電荷転送は、それらを開始するnの転送タイミングの時間間隔が互いに等しくなるように実行される、
請求項1、3から9のいずれか1項に記載の撮像装置。
In each of the first and second imaging periods, the n signal charge transfers are executed such that the time intervals of the n transfer timings that start them are equal to each other.
The imaging device according to claim 1.
複数の画素部を有し、かつ各画素部が光電変換部および信号保持部を含む撮像素子と、前記撮像素子を制御する制御手段と、を備える撮像装置の制御方法であって、
第1の撮影周期中に、前記光電変換部から前記信号保持部へのn回の信号電荷転送(nは2以上の自然数)により前記信号保持部に蓄積された信号電荷に基づき、第1の画像信号を生成し、
第2の撮影周期中に、前記光電変換部から前記信号保持部へのn回の信号電荷転送により前記信号保持部に蓄積された信号電荷に基づき、第2の画像信号を生成し、
前記生成された第1の画像信号に対し、各画素部の輝度値をそれに隣接する所定の数の他の画素部の輝度値との平均をとることにより第3の画像信号を生成し、
前記生成された第2の画像信号に対し、各画素部の輝度値をそれに隣接する所定の数の他の画素部の輝度値との平均をとることにより第4の画像信号を生成し、
前記第1および第2の画像信号を比較することにより、前記第1および第2の撮影周期間に被写体が移動する方向および量を示すベクトルである複数のオプティカルフロー候補を算出し、
前記第3および第4の画像信号を比較することにより、前記第1および第2の撮影周期間に前記被写体が移動する概ねの方向および量を示すベクトルである概略オプティカルフローを算出し、
前記複数のオプティカルフロー候補のうち前記概略オプティカルフローに最も近い1つのオプティカルフロー候補を最終的なオプティカルフローとして推定する、
制御方法。
An imaging apparatus control method comprising: an imaging device having a plurality of pixel units, and each pixel unit including a photoelectric conversion unit and a signal holding unit; and a control unit that controls the imaging device,
Based on the signal charges accumulated in the signal holding unit by n signal charge transfers (n is a natural number of 2 or more) from the photoelectric conversion unit to the signal holding unit during the first imaging cycle, Generate an image signal,
Based on the signal charges accumulated in the signal holding unit by n times of signal charge transfer from the photoelectric conversion unit to the signal holding unit during the second imaging cycle, a second image signal is generated,
A third image signal is generated by averaging the luminance value of each pixel unit with the luminance value of a predetermined number of other pixel units adjacent to the generated first image signal,
A fourth image signal is generated by averaging the luminance value of each pixel unit with the luminance value of a predetermined number of other pixel units adjacent to the generated second image signal,
By comparing the first and second image signals, a plurality of optical flow candidates that are vectors indicating directions and amounts of movement of the subject between the first and second imaging cycles are calculated,
By comparing the third and fourth image signals, a schematic optical flow that is a vector indicating a general direction and amount of movement of the subject during the first and second imaging cycles is calculated,
One optical flow candidate closest to the approximate optical flow among the plurality of optical flow candidates is estimated as a final optical flow.
Control method.
複数の画素部を有し、かつ各画素部が光電変換部および信号保持部を含む撮像素子と、前記撮像素子を制御する制御手段と、を備える撮像装置の制御方法であって、
第1の撮影周期中に、前記光電変換部から前記信号保持部へのn回の信号電荷転送(nは2以上の自然数)により前記信号保持部に蓄積された信号電荷に基づき、第1の画像信号を生成し、
第2の撮影周期中に、前記光電変換部から前記信号保持部へのn回の信号電荷転送により前記信号保持部に蓄積された信号電荷に基づき、第2の画像信号を生成し、
前記第1および第2の画像信号を比較することにより、前記第1および第2の撮影周期間に被写体が移動する方向および量を示すベクトルである最終的なオプティカルフローを推定する、
但し、前記第1および第2の撮影周期の各々において、前記n回の信号電荷転送は、それらを開始するnの転送タイミングの時間間隔が互いに異なるように実行される、
制御方法。
An imaging apparatus control method comprising: an imaging device having a plurality of pixel units, and each pixel unit including a photoelectric conversion unit and a signal holding unit; and a control unit that controls the imaging device,
Based on the signal charges accumulated in the signal holding unit by n signal charge transfers (n is a natural number of 2 or more) from the photoelectric conversion unit to the signal holding unit during the first imaging cycle, Generate an image signal,
Based on the signal charges accumulated in the signal holding unit by n times of signal charge transfer from the photoelectric conversion unit to the signal holding unit during the second imaging cycle, a second image signal is generated,
By comparing the first and second image signals, a final optical flow that is a vector indicating the direction and amount of movement of the subject between the first and second imaging periods is estimated.
However, in each of the first and second imaging periods, the n times of signal charge transfer are executed such that the time intervals of n transfer timings for starting them differ from each other.
Control method.
JP2018033447A 2017-07-20 2018-02-27 Imaging apparatus and control method of the same Pending JP2019149701A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2018033447A JP2019149701A (en) 2018-02-27 2018-02-27 Imaging apparatus and control method of the same
US16/031,470 US20190026902A1 (en) 2017-07-20 2018-07-10 Imaging apparatus and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018033447A JP2019149701A (en) 2018-02-27 2018-02-27 Imaging apparatus and control method of the same

Publications (1)

Publication Number Publication Date
JP2019149701A true JP2019149701A (en) 2019-09-05

Family

ID=67850868

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018033447A Pending JP2019149701A (en) 2017-07-20 2018-02-27 Imaging apparatus and control method of the same

Country Status (1)

Country Link
JP (1) JP2019149701A (en)

Similar Documents

Publication Publication Date Title
US8711234B2 (en) Image enhancement based on multiple frames and motion estimation
JP6711612B2 (en) Image processing apparatus, image processing method, and imaging apparatus
US9681037B2 (en) Imaging apparatus and its control method and program
JP5979961B2 (en) FOCUS DETECTION DEVICE, FOCUS DETECTION METHOD, AND IMAGING DEVICE
US10757348B2 (en) Image pickup apparatus, image pickup apparatus control method and computer-readable non-transitory recording medium recording program
JP2013515442A (en) Generation of high dynamic range image using still image and preview image
JP2015088917A (en) Imaging device, imaging method, program, and recording medium
US10911690B2 (en) Image capturing apparatus and control method thereof and storage medium
US10645320B2 (en) Image pickup apparatus, control method for image pickup apparatus, and computer-readable non-transitory recording medium in which control program for image pickup apparatus is recorded
US20180176463A1 (en) Image processing apparatus, imaging apparatus, and method of controlling image processing apparatus
JP2013074313A (en) Image processing device, image processing method, and program
JP2015073185A (en) Image processing device, image processing method and program
US20230186501A1 (en) Depth information generating apparatus, image capturing apparatus, depth information generating method, image processing apparatus, and image processing method
JP2018207413A (en) Imaging apparatus
EP3520389B1 (en) Imaging apparatus and imaging method
JP5581968B2 (en) Imaging device
US20190026902A1 (en) Imaging apparatus and control method
JP2019149701A (en) Imaging apparatus and control method of the same
JP6467289B2 (en) Imaging apparatus and control method thereof
US20230209194A1 (en) Imaging apparatus, driving method, and imaging program
JP2020184699A (en) Imaging apparatus and control method of the same
US20220358667A1 (en) Image processing apparatus and method, and image capturing apparatus and control method thereof, and storage medium
JP7020463B2 (en) Imaging device
JP2019045768A (en) Imaging device, control method of the same, program thereof, and storage medium
JP5874473B2 (en) Electronic camera