JP5377073B2 - Imaging apparatus, blur repair method, and program - Google Patents

Imaging apparatus, blur repair method, and program Download PDF

Info

Publication number
JP5377073B2
JP5377073B2 JP2009122234A JP2009122234A JP5377073B2 JP 5377073 B2 JP5377073 B2 JP 5377073B2 JP 2009122234 A JP2009122234 A JP 2009122234A JP 2009122234 A JP2009122234 A JP 2009122234A JP 5377073 B2 JP5377073 B2 JP 5377073B2
Authority
JP
Japan
Prior art keywords
opening pattern
pattern
blur
opening
photographing
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.)
Active
Application number
JP2009122234A
Other languages
Japanese (ja)
Other versions
JP2010273032A (en
Inventor
正俊 石井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2009122234A priority Critical patent/JP5377073B2/en
Publication of JP2010273032A publication Critical patent/JP2010273032A/en
Application granted granted Critical
Publication of JP5377073B2 publication Critical patent/JP5377073B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To enable a user to inexpensively obtain an opening pattern of a nonperiodic shutter with certainty. <P>SOLUTION: A plurality of nonperiodic opening patterns is held as a list by opening pattern holding means. By selecting one opening pattern among the plurality of nonperiodic opening patterns, the opening pattern of a shutter, which is used for photographing, is decided. A blur restoration circuit 428 irregularly opens and closes the shutter during the specified exposure time period, and carries out an encoding opening process of restoring the blur using the correlation of an obtained image and the opening pattern of the shutter. <P>COPYRIGHT: (C)2011,JPO&amp;INPIT

Description

本発明は、デジタル画像データをぶれ修復する技術に関するものである。   The present invention relates to a technique for blurring restoration of digital image data.

近年、デジタルカメラの撮像素子の高解像度化に伴い、撮影時の手ぶれ補正処理が注目されている。特にパーソナルコンピュータ上で簡単に100%以上に画像を拡大して確認できるので、如何に手ぶれを補正するかが重要なテーマとなっている。   2. Description of the Related Art In recent years, attention has been paid to camera shake correction processing at the time of shooting as the resolution of an image sensor of a digital camera increases. Particularly, since an image can be easily enlarged and confirmed to 100% or more on a personal computer, how to correct camera shake is an important theme.

手ぶれの補正方法としては、ハードウェアによる実現方法と、ソフトウェアによる実現方法とがある。ハードウェアによる実現方法には、カメラにジャイロセンサを搭載し、露光中はジャイロセンサから得た振動を打ち消すようにレンズや撮像素子を駆動して手ぶれを低減する方法が考えられる。例えば、レンズ光学系の補正による実現方法は、特許文献1に開示されている。   As a camera shake correction method, there are a hardware implementation method and a software implementation method. As a realization method by hardware, a method of reducing camera shake by mounting a gyro sensor on a camera and driving a lens or an image sensor so as to cancel vibration obtained from the gyro sensor during exposure can be considered. For example, Patent Document 1 discloses an implementation method by correcting a lens optical system.

しかしながら、ハードウェアによる実現方法には、部品点数や製造コストの増加という問題がある。そのため、安価なデジタルカメラで同様の機能を実現する場合には、ソフトウェアによる実現が考えられる。   However, the hardware implementation method has a problem that the number of parts and the manufacturing cost increase. Therefore, in order to realize the same function with an inexpensive digital camera, it can be realized by software.

ソフトウェアによる実現方法には、短時間露光した画像を複数枚用意して合成する方法が考えられる。例えば、特許文献2に開示されたものがその一つである。特許文献2では、ぶれを許容可能な露光時間で連続的に撮影した複数枚画像の相互のぶれを補正し、合成することによって手ぶれ補正を実現している。   As a realization method by software, a method of preparing and synthesizing a plurality of images exposed for a short time can be considered. For example, one disclosed in Patent Document 2 is one of them. In Patent Document 2, camera shake correction is realized by correcting and synthesizing the shakes of a plurality of images that are continuously photographed with an exposure time that allows for shake.

一方で、近年、シャッターの開口パターンをコード化し、このコード化された開口パターンを利用することで手ぶれを補正する技術も開発されている。例えば、ランダムにコード化された露出時間で画像を撮影し、露出時間コードの逆行列をかけることでぶれを補正する。   On the other hand, in recent years, a technique has also been developed in which an aperture pattern of a shutter is coded and camera shake is corrected by using the coded aperture pattern. For example, an image is taken with a randomly coded exposure time, and blurring is corrected by applying an inverse matrix of the exposure time code.

特開2002−214657号公報JP 2002-214657 A 特開2007−243774号公報JP 2007-243774 A

しかしながら、非特許文献1で述べられているようなシャッターの開口パターンをランダムにコード化する方法には、次のような課題がある。従来、このランダムな開口パターンを生成するにあたり、疑似乱数を使用して計算する方法が一般的であるが、このような方法では、確実に周期性のないパターンが生成されることは保証されない。もし、このパターンに周期性が現われてしまった場合には、ぶれ補正画像の画質劣化につながってしまうという問題がある。また、デジタルカメラ等への実装を考えた際に、疑似乱数の計算コストがかかってしまうという問題も生じる。   However, the method of randomly encoding the shutter opening pattern as described in Non-Patent Document 1 has the following problems. Conventionally, in order to generate this random opening pattern, a method using a pseudo-random number is generally used. However, such a method does not guarantee that a pattern without periodicity is generated reliably. If periodicity appears in this pattern, there is a problem that the image quality of the blur-corrected image is deteriorated. In addition, when mounting on a digital camera or the like is considered, there is a problem that the calculation cost of pseudo random numbers is increased.

本発明は以上のような状況に鑑みてなされたものであり、確実に周期性のないシャッターの開口パターンを低コストで取得できるようにすることを目的とする。   The present invention has been made in view of the above situation, and an object of the present invention is to make it possible to reliably obtain a shutter opening pattern having no periodicity at a low cost.

本発明の撮像装置は、ぶれ検出手段を備えた撮像装置であって、周期性のないシャッターの開口パターンを保持する開口パターン保持手段と、前記開口パターン保持手段によって保持された開口パターンから開口パターンを決定する開口パターン決定手段と、前記開口パターン決定手段によって決定された開口パターンを使用して撮影を行う撮影手段と、前記ぶれ検出手段によって検出されたぶれ情報と、開口パターンから得られる点像関数の逆フィルタを撮影画像に適用することでぶれ修復した画像を得るぶれ修復正手段と、撮影条件である撮影モードを取得する撮影条件取得手段とを備え、前記開口パターン決定手段は、前記撮影モードがポートレートモードの際にピンクノイズ特性に最も近い周波数特性を持つ開口パターンを決定することを特徴とする。 An image pickup apparatus according to the present invention is an image pickup apparatus including a shake detection unit, and includes an opening pattern holding unit that holds an opening pattern of a shutter having no periodicity, and an opening pattern from the opening pattern held by the opening pattern holding unit. An aperture pattern determining means for determining the image, an imaging means for performing imaging using the aperture pattern determined by the aperture pattern determining means, blur information detected by the blur detecting means, and a point image obtained from the aperture pattern A blur correction corrector that obtains a blur-repaired image by applying a function inverse filter to the captured image; and a shooting condition acquisition unit that acquires a shooting mode that is a shooting condition; and the aperture pattern determination unit includes the shooting pattern mode determines the opening pattern having closest frequency characteristic pink noise characteristics during portrait mode And wherein the door.

本発明によれば、周期性のないシャッターの開口パターンを低コストで取得し、撮影を行うことが可能となり、ぶれ補正を行う際の画像の画質劣化を抑えることができる。   According to the present invention, it is possible to acquire a shutter opening pattern having no periodicity at a low cost and perform photographing, and it is possible to suppress deterioration in image quality when performing blur correction.

デジタルカメラの外観を示す斜視図である。It is a perspective view which shows the external appearance of a digital camera. デジタルカメラの内部構造を示す垂直断面図である。It is a vertical sectional view showing the internal structure of the digital camera. デジタルカメラの回路構成を示すブロック図である。It is a block diagram which shows the circuit structure of a digital camera. 符号化開口処理によるぶれ修復処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the blurring correction process by an encoding opening process. ぶれ修復処理の原理の概念を説明するための図である。It is a figure for demonstrating the concept of the principle of a blurring correction process. PSFの作成方法を示すフローチャートである。It is a flowchart which shows the production method of PSF. 一般的な回転運動におけるPSFの例を示す図である。It is a figure which shows the example of PSF in a general rotational motion. 開口している場合のPSFの例及び周波数特性を示す図である。It is a figure which shows the example and frequency characteristic of PSF in the case of opening. シャッターの開閉条件を制御した場合のPSFの例及び周波数特性を示す図である。It is a figure which shows the example and frequency characteristic of PSF at the time of controlling the opening / closing conditions of a shutter. 回転ぶれを起こした画像及び回転ぶれを補正した画像を示す図である。It is a figure which shows the image which raise | generated rotation blur, and the image which correct | amended rotation blur. 第1の実施形態における開口パターンのリストを示す図である。It is a figure which shows the list | wrist of the opening pattern in 1st Embodiment. 第2の実施形態における開口パターンの決定方法を説明するための図である。It is a figure for demonstrating the determination method of the opening pattern in 2nd Embodiment. 第3の実施形態における開口パターンの決定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the determination process of the opening pattern in 3rd Embodiment. 開口パターンの候補の選出方法を説明するための図である。It is a figure for demonstrating the selection method of the candidate of an opening pattern. 第4の実施形態における開口パターンの決定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the determination process of the opening pattern in 4th Embodiment. 第5の実施形態における開口パターンの決定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the determination process of the opening pattern in 5th Embodiment.

以下、添付図面を参照して、本発明の好適な実施形態について説明する。
(第1の実施形態)
図1は本実施形態に係る撮像装置であるデジタルカメラの外観を示す斜視図、図2はデジタルカメラの内部構造を示す図1の垂直断面図、図3はデジタルカメラの回路構成を示すブロック図である。
Preferred embodiments of the present invention will be described below with reference to the accompanying drawings.
(First embodiment)
FIG. 1 is a perspective view showing an external appearance of a digital camera that is an imaging apparatus according to the present embodiment, FIG. 2 is a vertical sectional view of FIG. 1 showing an internal structure of the digital camera, and FIG. 3 is a block diagram showing a circuit configuration of the digital camera. It is.

図1に示すように、カメラ本体100の上部には、ファインダ観察用の接眼窓111、AE(自動露出)ロックボタン112、AF(自動焦点)の測距点選択ボタン113、撮影操作をするためのレリーズボタン114が設けられている。また、電子ダイヤル411、撮影モード選択ダイヤル117、外部表示装置409が設けられている。電子ダイヤル411は、他の操作ボタンと併用してカメラに数値を入力したり、撮影モードを切り換えたりするための多機能信号入力装置である。また、外部表示装置409は、液晶表示装置から構成され、シャッタースピード、絞り、撮影モード等の撮影条件や、他の情報を表示する。   As shown in FIG. 1, an eyepiece window 111 for finder observation, an AE (automatic exposure) lock button 112, an AF (autofocus) distance measuring point selection button 113, and a shooting operation are provided on the upper part of the camera body 100. The release button 114 is provided. An electronic dial 411, a shooting mode selection dial 117, and an external display device 409 are provided. The electronic dial 411 is a multi-function signal input device that is used in combination with other operation buttons to input numerical values to the camera and to switch the shooting mode. The external display device 409 includes a liquid crystal display device, and displays shooting conditions such as shutter speed, aperture, and shooting mode, and other information.

カメラ本体100の背面には、撮影された画像や各種設定画面等を表示するLCDモニタ装置417、LCDモニタ装置417をオン/オフするためのモニタスイッチ121、十字配置スイッチ116、メニューボタン124が設けられている。十字配置スイッチ116は、上下左右に配された4つのボタンと、中央に配されたSETボタンとを有し、ユーザがLCDモニタ装置417に表示されるメニュー項目等の選択や実行をカメラに指示するために用いられる。また、メニューボタン124は、LCDモニタ装置417にカメラの各種設定を行うためのメニュー画面を表示させるためのボタンである。例えば、撮影モードを選択、設定する時は、このメニューボタン124を押した後、十字配置スイッチ116の上下左右のボタンを操作して希望のモードを選択し、希望のモードが選択された状態でSETボタンを押すことにより設定が完了する。このメニューボタン124と十字配置スイッチ116は、後述するAFモードの設定にも使用される。   On the back of the camera body 100, there are provided an LCD monitor device 417 for displaying a photographed image and various setting screens, a monitor switch 121 for turning on / off the LCD monitor device 417, a cross switch 116, and a menu button 124. It has been. The cross switch 116 has four buttons arranged vertically and horizontally, and a SET button arranged in the center. The user instructs the camera to select and execute menu items displayed on the LCD monitor device 417. Used to do. The menu button 124 is a button for causing the LCD monitor device 417 to display a menu screen for performing various camera settings. For example, when selecting and setting the shooting mode, after pressing the menu button 124, the user operates the up / down / left / right buttons of the cross switch 116 to select the desired mode, and the desired mode is selected. Setting is completed by pressing the SET button. The menu button 124 and the cross placement switch 116 are also used for setting an AF mode, which will be described later.

図2において、100はカメラ本体、200は撮像光学系の撮影レンズであり、撮影レンズ200はカメラ本体100に対してレンズマウント202を介して着脱可能である。201は撮影光軸である。   In FIG. 2, reference numeral 100 denotes a camera body, 200 denotes a photographing lens of an imaging optical system, and the photographing lens 200 is detachable from the camera body 100 via a lens mount 202. Reference numeral 201 denotes a photographing optical axis.

203は撮影光路中に配置されたクイックリターンミラーであり、撮影レンズ200からの被写体光をファインダ光学系に導く位置(図2に示す位置、斜設位置と呼ぶ)と、撮影光路外に退避する位置(退避位置と呼ぶ)との間で移動可能である。   Reference numeral 203 denotes a quick return mirror disposed in the photographing optical path, which retracts the subject light from the photographing lens 200 to the viewfinder optical system (the position shown in FIG. 2, the oblique position) and out of the photographing optical path. It can move between positions (referred to as retreat positions).

204はピント板であり、ピント板204上にはクイックリターンミラー203からファインダ光学系に導かれる被写体光が結像される。205はファインダの視認性を向上させるためのコンデンサレンズ、206はペンタゴナルダハプリズムであり、ピント板204及びコンデンサレンズ205を通った被写体光をファインダ観察用の接眼レンズ208及び測光センサ207に導く。   Reference numeral 204 denotes a focusing plate, on which the subject light guided from the quick return mirror 203 to the finder optical system is imaged. Reference numeral 205 denotes a condenser lens for improving the visibility of the finder, and 206 denotes a pentagonal roof prism.

209、210はそれぞれシャッターを構成する後幕と先幕で、これら後幕209、先幕210の開放によって、後方に配置されている固体撮像素子である撮像素子418が必要時間だけ露光される。このとき、後述するようにして決定されたシャッターの開口パターンに従って、指定された露光時間の間にシャッターの開閉を不規則に行い撮影を行う。画像データは、予め定められた時間tで時分割露光した状態でA/Dコンバータ423や画像処理回路425(図3を参照)等によって処理される。画像処理回路425では、露光条件生成回路427の出力に応じて選択された画像データを加算合成して出力する。出力された合成画像データは、ぶれ修復回路428で露光条件や動き情報を用いてぶれ修復(ぶれ補正)処理を適用し、外部記憶装置419等へ出力される。ぶれ修復処理の詳細については後述する。   Reference numerals 209 and 210 respectively denote a rear curtain and a front curtain that constitute a shutter. When the rear curtain 209 and the front curtain 210 are opened, an image sensor 418 that is a solid-state image sensor disposed behind is exposed for a necessary time. At this time, according to the shutter opening pattern determined as will be described later, the shutter is opened and closed irregularly during the designated exposure time, and photographing is performed. The image data is processed by the A / D converter 423, the image processing circuit 425 (see FIG. 3), etc. in a state where time-division exposure is performed at a predetermined time t. The image processing circuit 425 adds and synthesizes the image data selected according to the output of the exposure condition generation circuit 427 and outputs it. The output composite image data is output to the external storage device 419 and the like by applying a blur correction (blur correction) process using the exposure condition and motion information in the blur correction circuit 428. Details of the blur repair process will be described later.

211はプリント基板であり、このプリント基板211に撮像素子418が保持されている。プリント基板211の後方には、もう一枚のプリント基板である表示基板215が配置されている。表示基板215の反対側の面に、LCDモニタ装置417及びバックライト照明装置416が配置されている。   Reference numeral 211 denotes a printed circuit board, and an image sensor 418 is held on the printed circuit board 211. A display board 215 that is another printed board is disposed behind the printed board 211. An LCD monitor device 417 and a backlight illumination device 416 are disposed on the opposite surface of the display substrate 215.

419は画像データを記録する外部記憶装置、217は電池(携帯用電源)であり、これら外部記憶装置419及び電池217は、カメラ本体100に対して着脱可能である。   Reference numeral 419 denotes an external storage device that records image data, 217 denotes a battery (portable power supply), and the external storage device 419 and the battery 217 are detachable from the camera body 100.

図3において、マイクロコンピュータ402は、撮像素子(本実施形態ではCCD)418が出力する画像データの処理や、LCDモニタ装置417の表示制御をはじめ、カメラ全体の動作を制御する。   In FIG. 3, the microcomputer 402 controls the operation of the entire camera, including processing of image data output from the image sensor (CCD in this embodiment) 418 and display control of the LCD monitor device 417.

スイッチ(SW1)405は、レリーズボタン114(図1を参照)の半押し状態でオンになり、スイッチ(SW1)405がオンすると、本実施形態のデジタルカメラは撮影準備状態になる。スイッチ(SW2)406は、レリーズボタン114が最後まで押された状態(全押し状態)でオンになり、スイッチ(SW2)406がオンすると、本実施形態のデジタルカメラは撮影動作を開始する。   The switch (SW1) 405 is turned on when the release button 114 (see FIG. 1) is half-pressed, and when the switch (SW1) 405 is turned on, the digital camera of this embodiment is in a shooting preparation state. The switch (SW2) 406 is turned on when the release button 114 is pressed to the end (fully pressed state). When the switch (SW2) 406 is turned on, the digital camera according to the present embodiment starts a photographing operation.

レンズ制御回路407は、撮影レンズ200との通信及びAF時の撮影レンズ200の駆動制御や絞り羽根の駆動制御を行う。外部表示制御回路408は、外部表示装置(OLC)409や、ファインダ内の表示装置(不図示)の制御を行う。スイッチセンス回路410は、カメラに設けられた電子ダイヤル411を含む多数のスイッチ類の信号をマイクロコンピュータ402に伝える。ストロボ発光調光制御回路412は、X接点412aを介して接地されており、外部ストロボの制御を行う。   The lens control circuit 407 performs communication with the photographic lens 200, drive control of the photographic lens 200 during AF, and drive control of the diaphragm blades. An external display control circuit 408 controls an external display device (OLC) 409 and a display device (not shown) in the finder. The switch sense circuit 410 transmits signals of a large number of switches including the electronic dial 411 provided in the camera to the microcomputer 402. The strobe light emission dimming control circuit 412 is grounded via the X contact 412a and controls the external strobe.

測距(AF)回路413は、AFのための被写体に対するデフォーカス量を検出する。測光(AE)回路414は、被写体の輝度を測定する。シャッター制御回路415は、シャッターの制御を行い、撮像素子418に対して適正な露光を行う。   A distance measuring (AF) circuit 413 detects a defocus amount for a subject for AF. A photometry (AE) circuit 414 measures the luminance of the subject. A shutter control circuit 415 controls the shutter and performs appropriate exposure on the image sensor 418.

本実施形態のLCDモニタ装置417は透過型であり、LCDモニタ装置の駆動だけでは画像を視認することはできず、必ずその裏面には図3に示すようにバックライト照明装置416が必要である。このようにLCDモニタ装置417とバックライト照明装置416は画像表示装置を構成している。   The LCD monitor device 417 of the present embodiment is a transmissive type, and an image cannot be visually recognized only by driving the LCD monitor device, and a backlight illumination device 416 is necessarily provided on the back surface thereof as shown in FIG. . As described above, the LCD monitor device 417 and the backlight illumination device 416 constitute an image display device.

外部記憶装置419は、例えばカメラ本体100に着脱可能なハードディスクドライブや半導体メモリカード等である。   The external storage device 419 is, for example, a hard disk drive or a semiconductor memory card that can be attached to and detached from the camera body 100.

また、マイクロコンピュータ402には、A/Dコンバータ423、画像バッファメモリ424、DSP等からなる画像処理回路425、ぶれ検出手段たる動き情報検出回路426、露光条件生成回路427、ぶれ修復回路428が接続されている。画像処理回路425は、スイッチ(SW2)406がオンされた場合、画像データに対して不図示の距離マップ生成回路から得た距離マップを用いてシャープネス処理を適用する。   Further, the microcomputer 402 is connected to an A / D converter 423, an image buffer memory 424, an image processing circuit 425 including a DSP, a motion information detection circuit 426 as a blur detection means, an exposure condition generation circuit 427, and a blur repair circuit 428. Has been. When the switch (SW2) 406 is turned on, the image processing circuit 425 applies sharpness processing to the image data using a distance map obtained from a distance map generation circuit (not shown).

ぶれ修復回路428では、符号化開口(Coded Exposure)という技術を用いてぶれ修復を実現する。符号化開口とは、指定された露光時間の間にシャッターの開閉を不規則に行い、得られた画像とシャッターの開口パターンの相関を用いてぶれを修復する技術である。以下、画像の回転方向のぶれを修復する場合を例にして、符号化開口処理の基本的な流れを説明する。その後、本実施形態における符号化開口処理の実現方法について述べる。なお、このぶれ修復回路428が、ぶれ情報と開口パターンから得られる点像関数の逆フィルタを撮影画像に適用することでぶれ修復した画像を得るぶれ修復正手段として機能する。   The blur repair circuit 428 implements blur repair using a technique called coded exposure. The coded aperture is a technology for irregularly opening and closing the shutter during a specified exposure time and restoring the blur using the correlation between the obtained image and the aperture pattern of the shutter. Hereinafter, the basic flow of the coded aperture processing will be described by taking as an example the case of correcting blur in the rotation direction of an image. After that, a method for realizing the coded aperture processing in this embodiment will be described. Note that the blur repair circuit 428 functions as a blur repair correct means for obtaining a blur-corrected image by applying an inverse filter of a point spread function obtained from the blur information and the aperture pattern to the photographed image.

<符号化開口処理の概要>
まず、符号化開口処理によるぶれ修復処理の流れについて図4のフローチャートを用いて説明する。例えば通常のカメラでの撮影において、入力された撮影データを考える(ステップS401)。このとき、(x,y)に単位時間当たりに入射する光の強度をI(x,y)、角速度をω(t)、露光時間をTとすると、カメラには時間tにI(x,y)を−θ(T−t)だけ回転させた情報が入射するので、撮影データI_blur(x,y)は、下式(1)〜(3)となる。
<Outline of coded aperture processing>
First, the flow of blur correction processing by the encoded aperture processing will be described using the flowchart of FIG. For example, in photographing with a normal camera, input photographing data is considered (step S401). At this time, assuming that the intensity of light incident per unit time at (x, y) is I (x, y), the angular velocity is ω (t), and the exposure time is T, the camera has I (x, y at time t. Since information obtained by rotating y) by −θ (T−t) is incident, the photographing data I_blur (x, y) is expressed by the following equations (1) to (3).

Figure 0005377073
Figure 0005377073

なお、座標系の原点は入力される回転中心座標に一致させる。式(1)において、h(t)はシャッターの開閉情報(開口パターン)を表す関数であり、1又は0の値をとる。1ならばシャッターが開いていることを示し、0ならばシャッターが閉じていることを表す。式(1)から式(2)の変形では積分変数の変換を行っている。ω(t)=dθ/dtであり、ω(θ)にはtとθの関係を利用して、ω(t)をθの変数に書き直した関数である。同様に、h(θ)はtとθの関係を利用して、h(t)をθに書き直した関数である。ここで、φ=θ(T)である。式(3)において、h'(θ)=h(θ)/ω(θ)である。   The origin of the coordinate system is matched with the input rotation center coordinates. In equation (1), h (t) is a function representing shutter opening / closing information (opening pattern), and takes a value of 1 or 0. 1 indicates that the shutter is open, and 0 indicates that the shutter is closed. In the transformation from Equation (1) to Equation (2), the integration variable is converted. ω (t) = dθ / dt, and ω (θ) is a function in which ω (t) is rewritten as a variable of θ using the relationship between t and θ. Similarly, h (θ) is a function obtained by rewriting h (t) to θ using the relationship between t and θ. Here, φ = θ (T). In Expression (3), h ′ (θ) = h (θ) / ω (θ).

次に、露光条件を取得する(ステップS402)。この場合の露光条件とは、露光時間中のシャッターの開口パターンとする。   Next, exposure conditions are acquired (step S402). The exposure condition in this case is the shutter opening pattern during the exposure time.

次に、ぶれの角度と時間の関係を得る(ステップS403)。   Next, the relationship between the blur angle and time is obtained (step S403).

次に、ぶれ角度と露光条件から、極座標上のPSF h'(θ)を算出する(ステップS404)。ここでPSFとは、Point Spread Function(点像分布関数、点像関数)の略である。PSF h'(θ)の詳細な算出方法については後述する。   Next, PSF h ′ (θ) in polar coordinates is calculated from the blur angle and exposure conditions (step S404). Here, PSF is an abbreviation for Point Spread Function (point spread function, point spread function). A detailed calculation method of PSF h ′ (θ) will be described later.

次に、撮影データを極座標に変換する(ステップS405)。前述した通り、このときの直交座標系の原点は入力画像の回転中心座標に一致させる。極座標変換を行うと、式(3)は、下式(4)となる。   Next, the photographing data is converted into polar coordinates (step S405). As described above, the origin of the orthogonal coordinate system at this time is matched with the rotation center coordinate of the input image. When polar coordinate conversion is performed, Equation (3) becomes Equation (4) below.

Figure 0005377073
Figure 0005377073

ここで、式(3)における(x,y)=r(cosΘ,sinΘ)である。これは平行移動に対するぶれと同じ式であり、PSF h'(θ)によるコンボリューションを行ったものとみなすことができる。   Here, (x, y) = r (cos Θ, sin Θ) in equation (3). This is the same formula as the shake for translation, and can be regarded as having been subjected to convolution with PSF h ′ (θ).

これは理論的な式であり、実際のデータはデジタルであることから、実空間から極座標の変換を行うためには、何らかの補間が必要になる。補間方法は任意のものを用いてよい。ここではバイリニア補間を用いることとする。   Since this is a theoretical formula and the actual data is digital, some kind of interpolation is required to convert polar coordinates from real space. Any interpolation method may be used. Here, bilinear interpolation is used.

引き続いて、式(4)のコンボリューションを打ち消すようにデコンボリューションを行う(ステップS406)。このときのデコンボリューションのアルゴリズムは、任意の既存アルゴリズムを用いればよい。例えば、周波数空間上での除算、Lucy−Richardsonのアルゴリズム、Wienerフィルタを用いたアルゴリズム、正則化フィルタを用いたアルゴリズム等が挙げられる。この例では、開口パターンを制御することでh'(θ)の形状をコントロールし、周波数空間上での除算を行うものとする。デコンボリューションの詳細については後述する。   Subsequently, deconvolution is performed so as to cancel the convolution of Expression (4) (step S406). Any existing algorithm may be used as the deconvolution algorithm at this time. For example, division in a frequency space, Lucy-Richardson algorithm, algorithm using a Wiener filter, algorithm using a regularization filter, and the like can be given. In this example, it is assumed that the shape of h ′ (θ) is controlled by controlling the opening pattern, and division in the frequency space is performed. Details of the deconvolution will be described later.

デコンボリューションによってI(r,Θ)が得られるので、このI(r,Θ)を実空間表示I(x,y)に戻す(ステップS407)。この変換処理でも、実空間から極座標への変換と同様に補間処理が必要となる。   Since I (r, Θ) is obtained by deconvolution, this I (r, Θ) is returned to the real space display I (x, y) (step S407). This conversion processing also requires interpolation processing as in the conversion from real space to polar coordinates.

その後、実空間に変換したデータをぶれ修復後のデータとして出力する(ステップS408)。   Thereafter, the data converted into the real space is output as the data after the blurring restoration (step S408).

以上述べたような処理により、不規則に変化させたシャッターの開閉によって得た画像について、その開口パターンとぶれ情報から、画像のぶれ修復処理を実現できる。このぶれ修復処理の原理を概念的に表したものが図5である。図5は、回転方向のぶれを極座標変換によって横方向のぶれに変換し、その横方向のぶれをデコンボリューションによって除去し、最後に実空間に戻して回転方向のぶれを修復する流れを示している。   With the processing described above, it is possible to realize image blurring restoration processing for an image obtained by opening and closing a shutter that is irregularly changed from the opening pattern and blurring information. FIG. 5 conceptually shows the principle of the blur repair process. FIG. 5 shows a flow in which a rotational shake is converted into a horizontal shake by polar transformation, the horizontal shake is removed by deconvolution, and finally returned to the real space to restore the rotational shake. Yes.

なお、この例では回転方向のぶれ修復処理を対象とするために極座標に変換して処理を適用したが、前述したように極座標に変換せずに処理を行うことで、水平垂直方向への所謂シフトぶれの補正も可能である。例えば、まず極座標への変換を行わない状態で水平垂直方向のぶれを修復した後に、前述の回転方向のぶれ修復処理を実行することが考えられる。   In this example, in order to deal with the blur correction process in the rotation direction, the process is applied by converting to polar coordinates. However, by performing the process without converting to the polar coordinates as described above, so-called horizontal and vertical directions are performed. Shift blur correction is also possible. For example, it is conceivable that after the blur in the horizontal and vertical directions is first repaired without conversion to polar coordinates, the above-described blur correction process in the rotational direction is executed.

<PSFの作成方法>
本実施形態では、動き情報検出回路426によって角度と時間の関係θ(t)を得ることができる。PSFの作成方法を図6のフローチャートを用いて説明する。まず、角度を時間で微分することにより、角速度ω(t)を算出する(ステップS601)。これをθ(t)と組み合わせることにより、角速度をθの関数で表すことができる。これをω(θ)とする。
<PSF creation method>
In the present embodiment, the motion information detection circuit 426 can obtain an angle-time relationship θ (t). A method for creating a PSF will be described with reference to the flowchart of FIG. First, the angular velocity ω (t) is calculated by differentiating the angle with time (step S601). By combining this with θ (t), the angular velocity can be expressed as a function of θ. Let this be ω (θ).

また、露光条件と角度から、シャッターの開閉情報(開口パターン)を表す関数h(t)についても同様にθの関数で表すことができる。これをh(θ)とする(ステップS602)。   Further, from the exposure condition and angle, the function h (t) representing the shutter opening / closing information (opening pattern) can be similarly represented by the function of θ. This is set to h (θ) (step S602).

これらの情報から、下式(5)を算出し(ステップS603)、h'(θ)をPSFとして出力する(ステップS604)。式(3)より、これが極座標上でのPSFとなる。   From these pieces of information, the following equation (5) is calculated (step S603), and h ′ (θ) is output as PSF (step S604). From equation (3), this is the PSF on polar coordinates.

Figure 0005377073
Figure 0005377073

一般的な回転運動におけるPSFの例を図7に示す。図7において、横軸は角度(単位はラジアン)、縦軸はPSFの値を示す。このときの開口条件は、h(t)=1 (0≦t≦T) h(t)=0 elseであるとする。また、角速度は加速度運動をしているものとする。ω(θ)が増大していくので、PSF h'(θ)の値は減少する。   An example of PSF in a general rotational motion is shown in FIG. In FIG. 7, the horizontal axis represents an angle (unit: radians), and the vertical axis represents a PSF value. The opening condition at this time is assumed to be h (t) = 1 (0 ≦ t ≦ T) h (t) = 0 else. Further, it is assumed that the angular velocity is accelerating. As ω (θ) increases, the value of PSF h ′ (θ) decreases.

<デコンボリューションの方法>
式(4)を周波数空間上に変換すると、下式(6)となる。(f,ρ)において、fはrの周波数変換に対応する変数であり、ρはΘの周波数変換に対応する変数である。
<Method of deconvolution>
When Expression (4) is converted into the frequency space, the following Expression (6) is obtained. In (f, ρ), f is a variable corresponding to the frequency conversion of r, and ρ is a variable corresponding to the frequency conversion of Θ.

Figure 0005377073
Figure 0005377073

H'(f,ρ)は既知なので、周波数空間上でI_blur(f,ρ)をH'(f、ρ)で割れば、I(f,ρ)を原理的に求めることができる。しかし、ここには問題がある。以下では、等角速度運動によるぶれを考え、ω(θ)を定数であるものとする。   Since H ′ (f, ρ) is known, I (f, ρ) can be obtained in principle by dividing I_blur (f, ρ) by H ′ (f, ρ) in the frequency space. But there is a problem here. In the following, it is assumed that ω (θ) is a constant, considering blurring due to a constant angular velocity motion.

まず通常の露光条件であるh(t)=1 (0≦t≦T) h(t)=0 elseの場合を考えてみる。ここで、h(t)=1はシャッターが開いている状態を表し、h(t)=0はシャッターが閉じている状態を示す。このときのPSFの形状を図8(a)に、このPSFを周波数変換したものを図8(b)に示す。図8において、横軸は角度(単位はラジアン)、縦軸は図8(a)ではPSFの値、図8(b)ではH'(f,ρ)の絶対値を表す。図8(b)から、通常の露光条件の場合には、H'(f,ρ)の値が周期的に0になる点が現れることが分かる。これは、その周波数に該当する情報が失われてしまっていることを意味する。   First, consider the case of h (t) = 1 (0 ≦ t ≦ T) h (t) = 0 else, which is a normal exposure condition. Here, h (t) = 1 represents a state where the shutter is open, and h (t) = 0 represents a state where the shutter is closed. FIG. 8A shows the shape of the PSF at this time, and FIG. 8B shows the frequency converted PSF. In FIG. 8, the horizontal axis represents the angle (unit is radians), and the vertical axis represents the PSF value in FIG. 8A and the absolute value of H ′ (f, ρ) in FIG. 8B. From FIG. 8 (b), it can be seen that, under normal exposure conditions, points appear where the value of H ′ (f, ρ) periodically becomes zero. This means that information corresponding to the frequency has been lost.

このような状態では、デコンボリューションした出力画像上に情報が失われた周波数に相当する部分にエラー(波形の模様)が生じる。このエラーを生じないようにするための技術が符号化開口である。例えば、シャッターの開閉を表す0と1の順序及び長さをランダムに変化させることで、PSFの周波数特性が0になることを防ぐことができる。このときのPSFの形状を図9(a)に、このPSFを周波数変換したものを図9(b)に示す。図9において、縦軸と横軸はそれぞれ図8と同様である。この場合、どの周波数でも情報が失われることはないので、H'(f,ρ)で除算することにより、理論的には完全にデコンボリューションを行うことが可能である。   In such a state, an error (waveform pattern) occurs in a portion corresponding to the frequency at which information is lost on the deconvolved output image. A technique for preventing this error is a coded aperture. For example, it is possible to prevent the frequency characteristics of the PSF from becoming 0 by randomly changing the order and length of 0 and 1 representing opening and closing of the shutter. FIG. 9A shows the shape of the PSF at this time, and FIG. 9B shows the PSF frequency-converted. In FIG. 9, the vertical axis and the horizontal axis are the same as those in FIG. In this case, since no information is lost at any frequency, it is theoretically possible to perform deconvolution completely by dividing by H ′ (f, ρ).

最後に、シミュレーションによって回転方向にぶれた画像を生成し、符号化開口を利用したぶれ修復処理を適用した結果を図10に模式的に示す。図10(a)がぶれた画像、図10(b)がぶれ修復処理の適用結果である。   Lastly, FIG. 10 schematically shows a result of generating a blurring image in the rotation direction by simulation and applying a blurring repair process using a coded aperture. FIG. 10A shows the blurred image, and FIG. 10B shows the application result of the blur restoration process.

以上説明したように、符号化開口を応用したぶれ修復処理を適用することで、好適なぶれ修復結果を得ることができる。また、この処理に必要な情報は、開口パターンと動き情報、開口パターンに従って加算合成して生成したぶれ画像であることが分かる。   As described above, a suitable blurring restoration result can be obtained by applying the blurring restoration process using the coded aperture. It can also be seen that the information necessary for this processing is a blurred image generated by adding and synthesizing according to the aperture pattern, motion information, and aperture pattern.

次に、本発明の主眼である開口パターンの決定方法について説明する。本実施形態では、複数の周期性のない開口パターンをリストとして開口パターン保持手段によって保持しておき、その中から開口パターンを一つ選択することによって、撮影に使用する開口パターンを決定する。   Next, a method for determining an opening pattern, which is the main focus of the present invention, will be described. In the present embodiment, a plurality of opening patterns having no periodicity are held as a list by the opening pattern holding means, and one opening pattern is selected from them, thereby determining the opening pattern to be used for photographing.

図11は、開口パターンのリストを示す図である。リストには、IDと開口パターンが登録されており、それぞれが一対一に関連付けられたテーブルのかたちとなっている。ここで、開口パターンの「1」はシャッターが開いている状態、「0」はシャッターが閉じている状態を示しており、リスト中のそれぞれの開口パターンは周期性を持たないように予め設計されている。   FIG. 11 is a diagram showing a list of opening patterns. An ID and an opening pattern are registered in the list, and each is in the form of a table associated one-to-one. Here, “1” of the opening pattern indicates that the shutter is open, and “0” indicates that the shutter is closed, and each opening pattern in the list is designed in advance so as not to have periodicity. ing.

ここで、周期性を持たないパターンとは、図9に示したように、PSFの周波数特性がゼロにならないようなパターンのことを意味する。この周期性を持たないような開口パターンの設計には、例えば、周期の非常に長いことで知られているメルセンヌ・ツイスタのような疑似乱数生成方法を用いることが考えられる。そして、生成された乱数が周期性を持たないことを検証した上で、リストへと登録する。もちろん、この開口パターンの設計方法には、必ずしも疑似乱数を用いる必要はなく、最終的に生成された開口パターンが周期性を持たないものになれば、任意の方法を用いてよい。また、周期性がないことの検証は、図9に示したように、PSFを周波数変換し、H'(f,ρ)の絶対値が、ゼロに落ちないことを確認することによって行えばよい。   Here, the pattern having no periodicity means a pattern in which the frequency characteristic of the PSF does not become zero, as shown in FIG. In designing an opening pattern that does not have periodicity, for example, it is conceivable to use a pseudo-random number generation method such as Mersenne Twister, which is known to have a very long period. Then, after verifying that the generated random number has no periodicity, it is registered in the list. Of course, it is not always necessary to use a pseudo-random number for the design method of the opening pattern, and any method may be used as long as the finally generated opening pattern has no periodicity. Further, the verification that there is no periodicity may be performed by performing frequency conversion on the PSF and confirming that the absolute value of H ′ (f, ρ) does not fall to zero, as shown in FIG. .

本実施形態では、撮影時に、露光条件生成回路427によって、この開口パターンのリストの中から、例えばランダムに一つを選択することで、撮影に使用する開口パターンを決定する。これが本発明でいう開口パターン決定手段による処理例である。   In this embodiment, at the time of shooting, the exposure condition generation circuit 427 determines an opening pattern to be used for shooting by, for example, randomly selecting one from the list of opening patterns. This is an example of processing by the opening pattern determination means in the present invention.

撮影後の画像データに対するぶれ補正処理は、ぶれ修復回路428により、前述した図4のフローに従って行われる。ここで、ステップS402における露光条件として、撮影時に開口パターンのリストから選択された開口パターンが取得されることになる。   The blur correction processing for the image data after photographing is performed by the blur repair circuit 428 according to the flow of FIG. 4 described above. Here, the aperture pattern selected from the aperture pattern list at the time of shooting is acquired as the exposure condition in step S402.

以上の処理により、撮影時に、確実に周期性を持たない開口パターンを選択して使用することができるので、PSFの周波数特性が0になることを防ぐことができる。よって、ぶれ補正を行った際に、ぶれ補正画像の画質劣化を抑えることが可能となる。また、テーブル参照によって開口パターンを決定するので、疑似乱数等によって動的にパターンを決定するような従来の方法に比べて、計算コストを抑えることができる。   With the above processing, it is possible to reliably select and use an aperture pattern that does not have periodicity at the time of shooting, and thus it is possible to prevent the frequency characteristics of the PSF from becoming zero. Therefore, when image blur correction is performed, it is possible to suppress image quality deterioration of the image blur correction image. In addition, since the opening pattern is determined by referring to the table, the calculation cost can be reduced as compared with the conventional method in which the pattern is dynamically determined by a pseudo random number or the like.

(第2の実施形態)
第1の実施形態では、予め用意された周期性を持たない開口パターンのリストから一つを選択することによって、撮影に使用する開口パターンを決定する方法について述べた。本実施形態では、開口パターンを決定するための第二の方法について説明する。
(Second Embodiment)
In the first embodiment, the method for determining the aperture pattern to be used for photographing by selecting one from a list of aperture patterns having no periodicity prepared in advance has been described. In the present embodiment, a second method for determining an opening pattern will be described.

本実施形態では、図12に示すように、予め十分長い周期性のない開口パターンを用意し、その一部分をランダムに抜き出すことによって、撮影に使用する開口パターンを決定する。このように、周期性のないパターンの一部を抜き出すことによって生成されるパターンは、それ自身も必ず周期性を持たないので、確実に周期性のない開口パターンを使って撮影を行うことができるようになる。   In the present embodiment, as shown in FIG. 12, an opening pattern having a sufficiently long periodicity is prepared in advance, and a part of the opening pattern is randomly extracted to determine the opening pattern used for photographing. As described above, the pattern generated by extracting a part of the non-periodic pattern itself does not necessarily have periodicity, so that it is possible to surely shoot using an opening pattern without periodicity. It becomes like this.

この十分長い周期性のない開口パターンを生成する方法に関しては、第1の実施形態で述べた、疑似乱数を使用する方法等が考えられる。本実施形態でも第1の実施形態と同様に、この開口パターンの生成には、必ずしも疑似乱数を用いる必要はなく、生成された開口パターンが周期性を持たないものになれば、任意の方法を用いてよい。また、この予め準備される長い開口パターンは、もちろん一つである必要はなく、第1の実施形態で示したようなリストの形で複数用意し、その中の一部分を使用する開口パターンとして抜き出すようにしてもよい。   As a method of generating an opening pattern without a sufficiently long periodicity, the method using pseudo random numbers described in the first embodiment can be considered. In the present embodiment as well, as in the first embodiment, it is not always necessary to use a pseudo-random number for generating the opening pattern, and any method can be used as long as the generated opening pattern has no periodicity. May be used. Of course, it is not necessary to have one long opening pattern prepared in advance. A plurality of opening patterns are prepared in the form of a list as shown in the first embodiment, and a part of them is extracted as an opening pattern. You may do it.

撮影後の画像データに対するぶれ補正処理は、第1の実施形態で説明した図4のフローに従って行われる。ここで、ステップS402における露光条件として、予め準備された十分長い周期性のないパターンの一部を抜き出すことによって決定された開口パターンが取得されることになる。   The blur correction process for the image data after shooting is performed according to the flow of FIG. 4 described in the first embodiment. Here, as an exposure condition in step S402, an opening pattern determined by extracting a part of a previously prepared pattern without sufficiently long periodicity is acquired.

以上の処理により、撮影時に、確実に周期性を持たない開口パターンを使用することができるので、PSFの周波数特性が0になることを防ぐことができる。よって、ぶれ補正を行った際に、ぶれ補正画像の画質劣化を抑えることが可能となる。また、疑似乱数等によって動的にパターンを決定するような従来の方法に比べて、計算コストを抑えることができる。   With the above processing, an aperture pattern that does not have periodicity can be used reliably at the time of shooting, so that the frequency characteristics of the PSF can be prevented from becoming zero. Therefore, when image blur correction is performed, it is possible to suppress image quality deterioration of the image blur correction image. In addition, the calculation cost can be reduced as compared with a conventional method in which a pattern is dynamically determined by a pseudo random number or the like.

(第3の実施形態)
第1の実施形態及び第2の実施形態では、開口パターンをランダムに一つ決定する方法について説明したが、例えば、これらの方法によって複数の候補を決定し、さらにその候補の中から撮影条件に従って最終的な開口パターンを決定するようにしてもよい。本実施形態では、このように開口パターンの候補が複数ある場合のパターンの決定方法について説明する。
(Third embodiment)
In the first embodiment and the second embodiment, the method of randomly determining one opening pattern has been described. For example, a plurality of candidates are determined by these methods, and further, the candidates are determined from the candidates according to the shooting conditions. A final opening pattern may be determined. In the present embodiment, a method for determining a pattern when there are a plurality of candidate opening patterns will be described.

本実施形態では、撮影時の露光時間に従って、複数の開口パターンの候補の中から一つを決定する。この処理の詳細を、図13のフローチャートを用いて説明する。ステップS1301では、開口パターンの候補を複数選出する。これは、図14(a)に示すように、周期性のない十分長いパターンからランダムに複数のパターンを抜き出すことによって行ってもよい。或いは、図14(b)に示すように、周期性のないパターンが複数あり、それぞれから一部分をランダムに抜き出すことによって行ってもよい。また、第1の実施形態で説明したような開口パターンのリスト中の各エントリを複数の候補とみなしてもよい。   In the present embodiment, one of a plurality of opening pattern candidates is determined according to the exposure time at the time of shooting. Details of this processing will be described with reference to the flowchart of FIG. In step S1301, a plurality of opening pattern candidates are selected. As shown in FIG. 14A, this may be performed by extracting a plurality of patterns at random from a sufficiently long pattern without periodicity. Alternatively, as shown in FIG. 14B, there may be a plurality of patterns having no periodicity, and a part of each pattern may be extracted at random. Further, each entry in the opening pattern list as described in the first embodiment may be regarded as a plurality of candidates.

ステップS1302では、ステップS1301で選出された開口パターンの候補のそれぞれに対して、パターンの平均値を算出する。これは、パターンの各ビットを足し合わせ、ビット長で割ることによって求める。つまり、この平均値は、もし全開口(パターンが全て1)の場合は1となり、全閉口(パターンが全て0)の場合は0となる。よって、ここで算出される平均値は、0から1の間に入ることになる。図14に示す例では、各候補の平均値を括弧中に示している。   In step S1302, an average value of the patterns is calculated for each of the opening pattern candidates selected in step S1301. This is obtained by adding each bit of the pattern and dividing by the bit length. That is, this average value is 1 if it is fully open (all patterns are 1) and 0 if it is fully closed (all patterns are 0). Therefore, the average value calculated here falls between 0 and 1. In the example shown in FIG. 14, the average value of each candidate is shown in parentheses.

ステップS1303では、撮影時の露光時間を取得する。   In step S1303, the exposure time at the time of shooting is acquired.

ステップS1304では、ステップS1303で取得した露光時間と、予め定められた露光時間の閾値とを比較する。もし、露光時間が閾値よりも小さければステップS1305へと進み、そうでなければステップS1306へと進む。   In step S1304, the exposure time acquired in step S1303 is compared with a predetermined exposure time threshold value. If the exposure time is smaller than the threshold value, the process proceeds to step S1305; otherwise, the process proceeds to step S1306.

ステップS1305では、ステップS1302で算出した開口パターンの各候補の平均値を比較し、その平均値が最大となるパターンを撮影に使用する開口パターンとして決定し、処理を終了する。   In step S1305, the average values of the aperture pattern candidates calculated in step S1302 are compared, the pattern having the maximum average value is determined as the aperture pattern used for imaging, and the process ends.

一方、ステップS1306では、ステップS1302で算出した開口パターンの各候補の平均値を比較し、その平均値が最小となるパターンを撮影に使用する開口パターンとして決定し、処理を終了する。   On the other hand, in step S1306, the average values of the aperture pattern candidates calculated in step S1302 are compared, the pattern having the minimum average value is determined as the aperture pattern used for imaging, and the process ends.

以上の処理により、開口パターンの候補が複数ある場合に、その中から適切な開口パターンを決定することができる。また、このように、露光条件に従って開口パターンをコントロールすることによって、全体の露光量を増加させることができ、ノイズを抑えたぶれ補正を行うことが可能となる。   By the above processing, when there are a plurality of opening pattern candidates, an appropriate opening pattern can be determined. In addition, by controlling the aperture pattern according to the exposure conditions as described above, the overall exposure amount can be increased, and blur correction with reduced noise can be performed.

本実施形態では、露光条件に従って開口パターンをコントロールする方法について述べたが、他の撮影条件を使用しても同様の効果を得ることができるのは言うまでもない。例えば、ISO感度をパラメータとして開口パターンをコントロールしてもよい。ISO感度をパラメータとした場合には、高感度の際には、露出の多いパターン、つまり、平均値の大きいパターンを選ぶようにすることで同様の効果を得ることができる。   In the present embodiment, the method of controlling the aperture pattern according to the exposure conditions has been described, but it goes without saying that the same effect can be obtained even when other imaging conditions are used. For example, the aperture pattern may be controlled using ISO sensitivity as a parameter. When the ISO sensitivity is used as a parameter, the same effect can be obtained by selecting a pattern with a large exposure, that is, a pattern with a large average value when the sensitivity is high.

(第4の実施形態)
本実施形態では、開口パターンの候補が複数ある場合のパターンの決定方法として、撮影条件である撮影モードに従って複数の開口パターンの候補の中から一つを決定する処理について説明する。
(Fourth embodiment)
In this embodiment, as a pattern determination method when there are a plurality of opening pattern candidates, a process of determining one of a plurality of opening pattern candidates according to a shooting mode that is a shooting condition will be described.

一般的に、ポートレートモードで撮影されるポートレート写真においては、撮影画像中に平坦な部分が多く現れる。言い換えると、低周波成分を多く持つ画像となることが多い。このような場合に、全周波数領域において応答値を持つようなランダムノイズパターンの開口パターンを使って撮影及びぶれ補正を行うと、不必要な周波数成分を持つため、ぶれ補正画像のノイズが目立ってしまうという問題が生じる。本実施形態では、この問題の解決方法として、撮影モードに従って、開口パターンの選択をコントロールする方法について説明する。   Generally, in a portrait photograph taken in the portrait mode, many flat portions appear in the photographed image. In other words, the image often has many low-frequency components. In such a case, if shooting and blur correction are performed using an opening pattern of a random noise pattern that has a response value in the entire frequency range, noise in the blur correction image is noticeable because it has unnecessary frequency components. Problem arises. In the present embodiment, as a method for solving this problem, a method for controlling the selection of the aperture pattern according to the photographing mode will be described.

図15は、本実施形態における開口パターンの決定方法を示すフローチャートである。ステップS1501では、開口パターンの候補を複数選出する。これは、図14(a)に示すように、周期性のない十分長いパターンからランダムに複数のパターンを抜き出すことによって行ってもよい。或いは、図14(b)に示すように、周期性のないパターンが複数あり、それぞれから一部分をランダムに抜き出すことによって行ってもよい。また、第1の実施形態で説明したような開口パターンのリスト中の各エントリを複数の候補とみなしてもよい。   FIG. 15 is a flowchart showing a method for determining an opening pattern in the present embodiment. In step S1501, a plurality of opening pattern candidates are selected. As shown in FIG. 14A, this may be performed by extracting a plurality of patterns at random from a sufficiently long pattern without periodicity. Alternatively, as shown in FIG. 14B, there may be a plurality of patterns having no periodicity, and a part of each pattern may be extracted at random. Further, each entry in the opening pattern list as described in the first embodiment may be regarded as a plurality of candidates.

ステップS1502では、テップS1501で選出された開口パターンの候補のそれぞれを周波数変換する。   In step S1502, the frequency of each of the opening pattern candidates selected in step S1501 is converted.

ステップS1503では、撮影モードを取得する。   In step S1503, the shooting mode is acquired.

ステップS1504では、撮影モードがポートレートモードかどうかを判定する。もし、ポートレートモードならばステップS1505に進み、そうでなければステップS1506に進む。   In step S1504, it is determined whether the shooting mode is a portrait mode. If it is the portrait mode, the process proceeds to step S1505; otherwise, the process proceeds to step S1506.

ステップS1505では、ステップS1502で周波数変換された開口パターンの各候補の中から、周波数特性がピンクノイズ特性に最も近いパターンを開口パターンとして決定し、処理を終了する。   In step S1505, a pattern having a frequency characteristic closest to the pink noise characteristic is determined as an opening pattern from the opening pattern candidates subjected to frequency conversion in step S1502, and the process ends.

一方、ステップS1506では、ステップS1502で周波数変換された開口パターンの各候補の中から、周波数特性がランダムノイズ特性に最も近いパターンを開口パターンとして決定し、処理を終了する。   On the other hand, in step S1506, a pattern having a frequency characteristic closest to the random noise characteristic is determined as an opening pattern from the candidates for the opening pattern subjected to frequency conversion in step S1502, and the process ends.

以上の処理により、低周波成分の多く含まれるポートレート画像に対して、符号化開口処理によるぶれ補正を行う際に、ノイズの発生を低減させることができる。   With the above processing, it is possible to reduce the occurrence of noise when blur correction is performed on the portrait image including a large amount of low frequency components by the encoded aperture processing.

(第5の実施形態)
本実施形態では、開口パターンの候補が複数ある場合のパターンの決定方法として、撮影条件である撮影時のf値に従って複数の開口パターンの候補の中から一つを決定する処理について説明する。
(Fifth embodiment)
In this embodiment, as a pattern determination method when there are a plurality of aperture pattern candidates, a process of determining one of a plurality of aperture pattern candidates according to the f-value at the time of shooting, which is a shooting condition, will be described.

撮影時のf値が小さい場合、被写界深度が浅くなるため、f値が大きい場合に比べて画像中にぼけた部分が多く生じる。つまり、低周波成分をより多く持つ画像となることが多い。このような場合に、全周波数領域において応答値を持つようなランダムノイズパターンの開口パターンを使って撮影及びぶれ補正を行うと、不必要な周波数成分を持つため、ぶれ補正画像のノイズが目立ってしまうという問題が生じる。本実施形態では、この問題の解決方法として、撮影時のf値に従って、開口パターンの選択をコントロールする方法について説明する。   When the f value at the time of shooting is small, the depth of field becomes shallow, so that there are more blurred portions in the image than when the f value is large. That is, the image often has more low frequency components. In such a case, if shooting and blur correction are performed using an opening pattern of a random noise pattern that has a response value in the entire frequency range, noise in the blur correction image is noticeable because it has unnecessary frequency components. Problem arises. In the present embodiment, as a method for solving this problem, a method for controlling the selection of the aperture pattern according to the f value at the time of shooting will be described.

図16は、本実施形態における開口パターンの決定方法を示すフローチャートである。ステップS1601では、開口パターンの候補を複数選出する。これは、図14(a)に示すように、周期性のない十分長いパターンからランダムに複数のパターンを抜き出すことによって行ってもよい。或いは、図14(b)に示すように、周期性のないパターンが複数あり、それぞれから一部分をランダムに抜き出すことによって行ってもよい。また、第1の実施形態で説明したような開口パターンのリスト中の各エントリを複数の候補とみなしてもよい。   FIG. 16 is a flowchart showing a method for determining an opening pattern in the present embodiment. In step S1601, a plurality of opening pattern candidates are selected. As shown in FIG. 14A, this may be performed by extracting a plurality of patterns at random from a sufficiently long pattern without periodicity. Alternatively, as shown in FIG. 14B, there may be a plurality of patterns having no periodicity, and a part of each pattern may be extracted at random. Further, each entry in the opening pattern list as described in the first embodiment may be regarded as a plurality of candidates.

ステップS1602では、テップS1601で選出された開口パターンの候補のそれぞれを周波数変換する。   In step S1602, frequency conversion is performed on each of the opening pattern candidates selected in step S1601.

ステップS1603では、設定されたf値を取得する。   In step S1603, the set f value is acquired.

ステップS1604では、ステップS1603で取得したf値と閾値を比較する。もし、f値が閾値より小さければステップS1605に進み、そうでなければステップS1606に進む。   In step S1604, the f value acquired in step S1603 is compared with a threshold value. If the f value is smaller than the threshold value, the process proceeds to step S1605; otherwise, the process proceeds to step S1606.

ステップS1605では、ステップS1602で周波数変換された開口パターンの各候補の中から、周波数特性がピンクノイズ特性に最も近いパターンを開口パターンとして決定し、処理を終了する。   In step S1605, a pattern having a frequency characteristic closest to the pink noise characteristic is determined as an opening pattern from the candidates for the opening pattern subjected to frequency conversion in step S1602, and the process ends.

一方、ステップS1606では、ステップS1602で周波数変換された開口パターンの各候補の中から、周波数特性がランダムノイズ特性に最も近いパターンを開口パターンとして決定し、処理を終了する。   On the other hand, in step S1606, a pattern having a frequency characteristic closest to the random noise characteristic is determined as an opening pattern from the candidates for the opening pattern subjected to frequency conversion in step S1602, and the process ends.

以上の処理により、絞りを開けた状態で撮影されたぼけの多く含まれる画像、つまり低周波成分の多く含まれる画像に対して、符号化開口処理によるぶれ補正を行う際に、ノイズの発生を低減させることができる。   With the above processing, noise is generated when blurring correction is performed by the coded aperture processing on an image that contains a lot of blur, that is, an image that contains a lot of low-frequency components. Can be reduced.

なお、本発明の目的は、前述した実施形態の機能またはフローチャートを実現するソフトウェアのプログラムコードを記録した記憶媒体を、システム或いは装置に供給することによっても達成される。この場合、そのシステム或いは装置のコンピュータ(又はCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行する。   The object of the present invention can also be achieved by supplying a storage medium storing software program codes for realizing the functions or flowcharts of the above-described embodiments to a system or apparatus. In this case, the computer (or CPU or MPU) of the system or apparatus reads and executes the program code stored in the storage medium.

この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、プログラムコード自体及びそのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code itself and the storage medium storing the program code constitute the present invention.

Claims (5)

ぶれ検出手段を備えた撮像装置であって、
周期性のないシャッターの開口パターンを保持する開口パターン保持手段と、
前記開口パターン保持手段によって保持された開口パターンから開口パターンを決定する開口パターン決定手段と、
前記開口パターン決定手段によって決定された開口パターンを使用して撮影を行う撮影手段と、
前記ぶれ検出手段によって検出されたぶれ情報と、開口パターンから得られる点像関数の逆フィルタを撮影画像に適用することでぶれ修復した画像を得るぶれ修復正手段と
撮影条件である撮影モードを取得する撮影条件取得手段とを備え、
前記開口パターン決定手段は、前記撮影モードがポートレートモードの際にピンクノイズ特性に最も近い周波数特性を持つ開口パターンを決定することを特徴とする撮像装置。
An image pickup apparatus including a shake detection unit,
An opening pattern holding means for holding the opening pattern of the shutter having no periodicity;
An opening pattern determining means for determining an opening pattern from the opening pattern held by the opening pattern holding means;
Photographing means for photographing using the opening pattern determined by the opening pattern determining means;
Blur information detected by the blur detection unit, and a blur correction normal unit that obtains a blurred image by applying an inverse filter of a point spread function obtained from the aperture pattern to the captured image ,
A shooting condition acquisition means for acquiring a shooting mode that is a shooting condition;
The aperture pattern determining means determines an aperture pattern having a frequency characteristic closest to a pink noise characteristic when the shooting mode is a portrait mode .
前記開口パターン保持手段は開口パターンのリストを保持し、
前記開口パターン決定手段は、前記開口パターンのリストから開口パターンを選択することによって開口パターンを決定することを特徴とする請求項1に記載の撮像装置。
The opening pattern holding means holds a list of opening patterns;
The imaging apparatus according to claim 1, wherein the opening pattern determination unit determines an opening pattern by selecting an opening pattern from the list of opening patterns.
前記パターン決定手段は、前記開口パターン保持手段によって保持された開口パターンの一部を抜き出すことによって開口パターンを決定することを特徴とする請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the pattern determining unit determines the opening pattern by extracting a part of the opening pattern held by the opening pattern holding unit. ぶれ検出手段を備えた撮像装置によるぶれ修復方法であって、
開口パターン保持手段によって予め保持された周期性のないシャッターの開口パターンから開口パターンを決定するステップと、
前記決定された開口パターンを使用して撮影を行うステップと、
前記ぶれ検出手段によって検出されたぶれ情報と、開口パターンから得られる点像関数の逆フィルタを撮影画像に適用することでぶれ修復した画像を得るステップとを有し、
前記開口パターンを決定するステップでは、撮影モードがポートレートモードの際にピンクノイズ特性に最も近い周波数特性を持つ開口パターンを決定することを特徴とする撮像装置によるぶれ修復方法。
A blur repair method using an imaging device including a blur detection means,
Determining an opening pattern from the opening pattern of the non-periodic shutter previously held by the opening pattern holding means;
Photographing using the determined aperture pattern;
Possess and obtaining the blur information detected by the blur detecting means, the repaired image blur by applying an inverse filter to the captured image of the point spread function derived from the opening pattern,
In the step of determining the aperture pattern, a blur repair method using an imaging apparatus , wherein an aperture pattern having a frequency characteristic closest to a pink noise characteristic is determined when the photographing mode is a portrait mode .
ぶれ検出手段を備えた撮像装置を制御するためのプログラムであって、
周期性のないシャッターの開口パターンを保持する開口パターン保持手段と、
前記開口パターン保持手段によって保持された開口パターンから開口パターンを決定するパターン決定手段と、
前記パターン決定手段によって決定された開口パターンを使用して撮影を行う撮影手段と、
前記ぶれ検出手段によって検出されたぶれ情報と、開口パターンから得られる点像関数の逆フィルタを撮影画像に適用することでぶれ修復した画像を得るぶれ修復正手段と
撮影条件である撮影モードを取得する撮影条件取得手段としてコンピュータを機能させ、
前記開口パターン決定手段は、前記撮影モードがポートレートモードの際にピンクノイズ特性に最も近い周波数特性を持つ開口パターンを決定するプログラム。
A program for controlling an imaging apparatus provided with a shake detection means,
An opening pattern holding means for holding the opening pattern of the shutter having no periodicity;
Pattern determining means for determining an opening pattern from the opening pattern held by the opening pattern holding means;
Photographing means for photographing using the opening pattern determined by the pattern determining means;
Blur information detected by the blur detection unit, and a blur correction normal unit that obtains a blurred image by applying an inverse filter of a point spread function obtained from the aperture pattern to the captured image ,
A photographing condition acquisition section that acquires photographing mode is an imaging condition to function the computer,
The opening pattern determining means is a program for determining an opening pattern having a frequency characteristic closest to a pink noise characteristic when the photographing mode is a portrait mode .
JP2009122234A 2009-05-20 2009-05-20 Imaging apparatus, blur repair method, and program Active JP5377073B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009122234A JP5377073B2 (en) 2009-05-20 2009-05-20 Imaging apparatus, blur repair method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009122234A JP5377073B2 (en) 2009-05-20 2009-05-20 Imaging apparatus, blur repair method, and program

Publications (2)

Publication Number Publication Date
JP2010273032A JP2010273032A (en) 2010-12-02
JP5377073B2 true JP5377073B2 (en) 2013-12-25

Family

ID=43420725

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009122234A Active JP5377073B2 (en) 2009-05-20 2009-05-20 Imaging apparatus, blur repair method, and program

Country Status (1)

Country Link
JP (1) JP5377073B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015019119A (en) 2011-11-10 2015-01-29 パナソニック株式会社 Image shake correction device
JP6605483B2 (en) * 2014-02-06 2019-11-13 バー‐イラン、ユニバーシティー Imaging system and method using pinhole array
JP6443982B2 (en) * 2015-02-26 2018-12-26 国立大学法人 鹿児島大学 Imaging device, digital watermark extraction method, digital watermark and open / close pattern optimization method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02223239A (en) * 1988-11-22 1990-09-05 Nec Corp Fdm-tdm converter
JP4452825B2 (en) * 2004-08-05 2010-04-21 国立大学法人電気通信大学 Still image forming method and recording apparatus therefor
JP5383315B2 (en) * 2009-05-21 2014-01-08 キヤノン株式会社 Image processing apparatus and method

Also Published As

Publication number Publication date
JP2010273032A (en) 2010-12-02

Similar Documents

Publication Publication Date Title
JP5276529B2 (en) Image processing apparatus and method
US8760526B2 (en) Information processing apparatus and method for correcting vibration
US8570402B2 (en) Imaging apparatus for obtaining a user-intended image when orientation of the imaging apparatus changes in applying a special effect that changes the image quality in a set direction
JP6271990B2 (en) Image processing apparatus and image processing method
JP4487191B2 (en) Image processing apparatus and image processing program
JP5300591B2 (en) Image processing apparatus and method
KR101599872B1 (en) Digital photographing apparatus method for controlling the same and recording medium storing program to implement the method
CN107517345B (en) Shooting preview method and capture apparatus
US8970764B2 (en) Digital image signal processing apparatus for displaying angle of view information, method of controlling the apparatus, and medium for recording the method
US20100259652A1 (en) Image capturing apparatus and control method therefor
JP5377073B2 (en) Imaging apparatus, blur repair method, and program
JP2014074838A (en) Imaging device
JP5693664B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM
JP7148428B2 (en) Imaging device and imaging method
JP2010233188A (en) Imaging apparatus, control method thereof and program
JP6486453B2 (en) Image processing apparatus, image processing method, and program
JP5284195B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP5281494B2 (en) Image processing apparatus and method
JP5613145B2 (en) Imaging apparatus and program
WO2019049532A1 (en) Image capture device
KR100872268B1 (en) Photographing apparatus and method having function of compensating hand-shaking

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120418

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130531

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130618

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130807

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130827

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130924

R151 Written notification of patent or utility model registration

Ref document number: 5377073

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151