JP5383315B2 - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP5383315B2
JP5383315B2 JP2009123537A JP2009123537A JP5383315B2 JP 5383315 B2 JP5383315 B2 JP 5383315B2 JP 2009123537 A JP2009123537 A JP 2009123537A JP 2009123537 A JP2009123537 A JP 2009123537A JP 5383315 B2 JP5383315 B2 JP 5383315B2
Authority
JP
Japan
Prior art keywords
control pattern
imaging
subject
shake
image
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
JP2009123537A
Other languages
Japanese (ja)
Other versions
JP2010273139A (en
JP2010273139A5 (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 JP2009123537A priority Critical patent/JP5383315B2/en
Publication of JP2010273139A publication Critical patent/JP2010273139A/en
Publication of JP2010273139A5 publication Critical patent/JP2010273139A5/ja
Application granted granted Critical
Publication of JP5383315B2 publication Critical patent/JP5383315B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、撮像装置の手振れ補正に関する。   The present invention relates to camera shake correction of an imaging apparatus.

撮像装置の代表例であるディジタルカメラにおいては、被写体からの光が、レンズなどの光学系を介して、CCDやCMOSなどの撮像デバイス上に結像する。撮像デバイスは、光量をアナログの電気信号に変換し、このアナログ信号が被写体の画像を示すディジタル信号に変換される。   In a digital camera that is a typical example of an imaging apparatus, light from a subject forms an image on an imaging device such as a CCD or a CMOS via an optical system such as a lens. The imaging device converts the amount of light into an analog electrical signal, and the analog signal is converted into a digital signal indicating an image of the subject.

被写体の画像を示す適切なディジタル信号を得るために、撮像デバイスの光量レンジが予め設定されている。光量レンジを超える量の光が撮像デバイスに入力すると、アナログ信号またはディジタル信号が飽和する可能性がある。逆に、撮像デバイスに入力する光が光量レンジに達しない場合は、アナログ信号のSN比が悪化する。   In order to obtain an appropriate digital signal indicating the image of the subject, the light amount range of the imaging device is set in advance. When an amount of light exceeding the light amount range is input to the imaging device, the analog signal or the digital signal may be saturated. Conversely, when the light input to the imaging device does not reach the light amount range, the SN ratio of the analog signal is deteriorated.

そこで、ディジタルカメラにおいては、露光時間(シャッタスピード)を設定した後、撮像を開始する。被写体からの光の強さに基づき露光時間を設定すれば、被写体からの光の強さに関わらず、撮像デバイスに設定された光量レンジ内の露光が可能になり、適切なアナログ信号、ディジタル信号を得ることができる。つまり、被写体からの光が弱い場合は露光時間を相対的に長くし、逆に、被写体からの光が強い場合は露光時間を相対的に短くする。しかし、例えば撮像装置を手で持つなど、撮像装置が非固定の場合、露光時間が長くなれば、露光中の撮像装置の振れによって撮影された画像が暈けることがある。   Therefore, in the digital camera, after setting the exposure time (shutter speed), imaging is started. If the exposure time is set based on the intensity of light from the subject, exposure within the light intensity range set for the imaging device is possible regardless of the intensity of light from the subject. Can be obtained. That is, when the light from the subject is weak, the exposure time is relatively long. Conversely, when the light from the subject is strong, the exposure time is relatively short. However, when the imaging apparatus is not fixed, for example, when the imaging apparatus is held by hand, if the exposure time is long, an image captured due to shaking of the imaging apparatus during exposure may be lost.

●振れによる画像の暈けの補正
振れによる画像の暈けを補正するには、例えば、画像の暈けの周波数特性を予測し、その周波数特性の逆特性を画像に乗算する。具体的には、ジャイロセンサなどを用いて振れを計測し、露光時間と振れの分布から、画像上の点の暈けを示す関数である点像分布関数(point spread function: PSF)を推定する。そして、PSFの周波数特性を算出し、当該周波数特性の逆特性になるフィルタやWienerフィルタによって画像をフィルタリングすることで暈けの補正が可能である。勿論、周波数特性やその逆特性が求まらない場合、適切なフィルタを得ることができず、暈けの補正は不可能である。
Correction of image blur due to shake In order to correct the image blur due to shake, for example, the frequency characteristic of the image blur is predicted, and the image is multiplied by the inverse characteristic of the frequency characteristic. Specifically, a shake is measured using a gyro sensor or the like, and a point spread function (PSF) that is a function indicating the blurring of points on the image is estimated from the exposure time and the shake distribution. . Then, it is possible to correct the blur by calculating the frequency characteristic of the PSF and filtering the image with a filter or a Wiener filter that is the inverse characteristic of the frequency characteristic. Of course, when the frequency characteristic and the inverse characteristic thereof are not obtained, an appropriate filter cannot be obtained, and the blur correction cannot be performed.

図1は暈けの補正が不可能な例を説明する図である。   FIG. 1 is a diagram illustrating an example in which correction of blur is impossible.

図1(a)はシャッタの開閉を示し、h=1でシャッタ開、h=0でシャッタ閉で、露光時間が1.2秒間の例を示している。   FIG. 1 (a) shows the opening and closing of the shutter, and shows an example in which the shutter is open when h = 1, the shutter is closed when h = 0, and the exposure time is 1.2 seconds.

図1(b)は撮像の開始からの時間と撮像装置のXY方向の振れの軌跡、つまり、撮像の開始から時間とともに撮像装置がどの方向に振れたを示す図である。図1(b)の例は、2.4秒間にY方向へ60画素分、等速に振れたことを表す。なお、説明を簡単にするため、振れが等速の例を説明するが、勿論、等速ではない場合もある。   FIG. 1B is a diagram illustrating the time from the start of imaging and the locus of shake in the XY direction of the imaging device, that is, the direction in which the imaging device has shaken with time from the start of imaging. The example in FIG. 1 (b) represents that the camera shakes at a constant speed of 60 pixels in the Y direction in 2.4 seconds. In order to simplify the description, an example in which the shake is constant speed will be described. Of course, there may be cases where the speed is not constant.

図1(c)は、図1(a)の露光と図1(b)の振れの軌跡を組み合わせた状態を示す。つまり、露光時間は1.2秒間であるから、Y方向へ30画素分の等速の振れが、撮影された画像に影響することになる。   FIG. 1 (c) shows a state where the exposure of FIG. 1 (a) and the shake locus of FIG. 1 (b) are combined. That is, since the exposure time is 1.2 seconds, a constant-speed shake of 30 pixels in the Y direction affects the captured image.

図1(d)は図1(c)の振れの軌跡をXY平面に写像した図で、太線で表される部分が、上述したPSFに相当する。   FIG. 1 (d) is a diagram in which the shake trajectory of FIG. 1 (c) is mapped to the XY plane, and a portion indicated by a thick line corresponds to the PSF described above.

図1(e)はPSFの周波数特性を示す図である。図1(e)に示すように、等間隔で応答が0になる周波数が存在する。図1(e)に示す周波数特性の逆特性(図1(f))が求められれば、振れによる暈けの補正が可能になる。しかし、図1(f)に示すように、図1(e)において応答が0となる周波数において、逆特性は無限大に発散する。つまり、図1(a)に示すシャッタ開閉状態と、図1(b)に示す振れの軌跡の組み合わせにおいては逆特性が求められず、暈けの補正が不可能になる。   FIG. 1 (e) is a diagram showing the frequency characteristics of PSF. As shown in FIG. 1 (e), there are frequencies at which the response becomes 0 at equal intervals. If the inverse characteristic (FIG. 1 (f)) of the frequency characteristic shown in FIG. 1 (e) is obtained, the blur due to the shake can be corrected. However, as shown in FIG. 1 (f), the inverse characteristic diverges infinitely at the frequency at which the response is 0 in FIG. 1 (e). That is, in the combination of the shutter open / closed state shown in FIG. 1 (a) and the shake locus shown in FIG. 1 (b), reverse characteristics cannot be obtained, and blur correction is impossible.

図2は暈けの補正が不可能な状況を具体的に示す図である。   FIG. 2 is a diagram specifically illustrating a situation where it is impossible to correct the blur.

図2(a)に示す被写体を、図1(a)に示すシャッタ開閉状態で、図1(b)に示す振れの軌跡を与えて撮影した画像が図2(b)である。図2(b)に示すように、Y方向への振れによって、被写体の黒点群は灰色の縦線状に暈け、被写体の黒横線は灰色の横線に暈ける。   FIG. 2 (b) shows an image of the subject shown in FIG. 2 (a) taken with the shake locus shown in FIG. 1 (b) in the shutter open / closed state shown in FIG. 1 (a). As shown in FIG. 2 (b), due to the shake in the Y direction, the black point group of the subject turns into a gray vertical line, and the black horizontal line of the subject turns into a gray horizontal line.

図2(c)は、図2(b)の画像の暈けを補正した画像を示す。黒横線はかなり復元されるが、黒点群は復元されず灰色の縦線状に暈けたままである。   FIG. 2 (c) shows an image obtained by correcting the blur of the image of FIG. 2 (b). The black horizontal lines are considerably restored, but the black dots are not restored and remain in the form of gray vertical lines.

●シャッタ開ランダム制御
非特許文献1には、振れによる画像の暈けを補正する技術が提案されている。この技術は、露光期間において、小刻みかつランダムにシャッタを開閉する(以下、シャッタ開ランダム制御)ことで、振れによる画像の暈けを補正する。
Non-Patent Document 1 proposes a technique for correcting image blur due to shake. This technique corrects blurring of an image due to shake by opening and closing a shutter at random in the exposure period (hereinafter, shutter opening random control).

図3はシャッタ開ランダム制御による暈けの補正を説明する図である。   FIG. 3 is a diagram for explaining blur correction by shutter open random control.

図3(a)はシャッタの開閉を示し、露光開始から終了まで2.4秒間の間にシャッタ開が1.2秒間ある例を示している。   FIG. 3 (a) shows the opening and closing of the shutter, and shows an example in which the shutter is opened for 1.2 seconds between the start and end of exposure for 2.4 seconds.

図3(b)は撮像の開始からの時間と撮像装置のXY方向の振れの軌跡、つまり、撮像の開始から時間とともに撮像装置がどの方向に振れたを示す図である。図3(b)の例は、図1(b)と同様、2.4秒間にY方向へ60画素分、等速に振れたことを表す。   FIG. 3B is a diagram illustrating the time from the start of imaging and the locus of shake in the XY direction of the imaging apparatus, that is, the direction in which the imaging apparatus has shaken with time from the start of imaging. The example of FIG. 3 (b) represents that the camera shakes at a constant speed by 60 pixels in the Y direction in 2.4 seconds, as in FIG.

図3(c)は、図3(a)の露光時間と図3(b)の振れの軌跡を組み合わせた状態を示す。つまり、露光時間は断続的に2.4秒間であるから、Y方向へ60画素分の等速の振れが撮影された画像に影響することになる。   FIG. 3 (c) shows a state where the exposure time in FIG. 3 (a) and the shake locus in FIG. 3 (b) are combined. That is, since the exposure time is intermittently 2.4 seconds, a constant-speed shake of 60 pixels in the Y direction affects the photographed image.

図3(d)は図3(c)の振れの軌跡をXY平面に写像した図で、太破線で表される部分がPSFに相当する。   FIG. 3 (d) is a diagram in which the shake trajectory of FIG. 3 (c) is mapped to the XY plane, and a portion indicated by a thick broken line corresponds to PSF.

図3(e)はPSFの周波数特性を示す図である。図3(e)に示すように、応答が0になる周波数は存在しない。従って、図3(e)に示す周波数特性の逆特性は、図3(f)に示すように、無限大に発散する周波数は存在しない。つまり、図3(a)に示すシャッタ開ランダム制御と、図3(b)に示す振れの軌跡の組み合わせにおいては逆特性を求めることができ、暈けの補正が可能になる。   FIG. 3 (e) is a diagram showing the frequency characteristics of PSF. As shown in FIG. 3 (e), there is no frequency at which the response is zero. Therefore, in the inverse characteristic of the frequency characteristic shown in FIG. 3 (e), there is no frequency that diverges infinitely, as shown in FIG. 3 (f). That is, in the combination of the shutter opening random control shown in FIG. 3 (a) and the shake locus shown in FIG. 3 (b), reverse characteristics can be obtained, and blur correction can be performed.

図4は暈けの補正が可能な状況を具体的に示す図である。   FIG. 4 is a diagram specifically illustrating a situation in which blur correction is possible.

図4(a)に示す被写体を、図3(a)に示すシャッタ開ランダム制御状態で、図3(b)に示す振れの推移を与えて撮影した画像が図4(b)である。図4(b)に示すように、Y方向への振れによって、被写体の黒点群は灰色の縦破線状に暈け、被写体の黒横線は灰色の横線に暈ける。   FIG. 4 (b) shows an image obtained by photographing the subject shown in FIG. 4 (a) in the shutter open random control state shown in FIG. 3 (a) while giving the shake transition shown in FIG. 3 (b). As shown in FIG. 4 (b), due to the shake in the Y direction, the black point group of the subject turns into a gray vertical broken line, and the black horizontal line of the subject turns into a gray horizontal line.

図4(c)は、図4(b)の画像の暈けを補正した画像を示す図で、黒横線と黒点群が復元されている。   FIG. 4 (c) is a diagram showing an image obtained by correcting the blur of the image of FIG. 4 (b), in which a black horizontal line and a black dot group are restored.

図5は図4(a)に示す被写体画像の周波数特性を示す図である。つまり、図4(a)に示す被写体のように、周波数特性が低周波から高周波まで満遍なく存在する画像の場合は、シャッタ開ランダム制御は暈けを好適に補正する。しかし、画像の周波数特性に偏りがある場合、シャッタ開ランダム制御は暈けを好適に補正することができない。   FIG. 5 is a diagram showing the frequency characteristics of the subject image shown in FIG. That is, in the case of an image in which the frequency characteristics exist evenly from low frequency to high frequency as in the subject shown in FIG. 4 (a), the shutter opening random control suitably corrects the blur. However, if there is a bias in the frequency characteristics of the image, the shutter-open random control cannot properly correct the blur.

図6は風景写真の一例と、その周波数特性を示す図である。つまり、図6(a)に示す写真画像は、図6(b)に示す低周波側に偏った周波数特性を有する。従って、図6(a)に示すような被写体の場合、シャッタ開ランダム制御の周波数特性と被写体の周波数特性が乖離し、その結果、暈けの補正によりノイズを増幅する場合がある。   FIG. 6 is a diagram showing an example of a landscape photograph and its frequency characteristics. That is, the photographic image shown in FIG. 6 (a) has a frequency characteristic biased toward the low frequency side shown in FIG. 6 (b). Therefore, in the case of a subject as shown in FIG. 6 (a), the frequency characteristics of the shutter opening random control and the frequency characteristics of the subject may deviate, and as a result, noise may be amplified by blur correction.

図7はシャッタ開ランダム制御を用いた暈けの補正がノイズを増幅する理由を説明する図である。   FIG. 7 is a diagram for explaining the reason why blur correction using shutter opening random control amplifies noise.

図7において、符号6001は被写体の周波数特性を示し、符号6002はシャッタ開ランダム制御の周波数特性を示す。撮影画像は、被写体の周波数特性6001とシャッタ開ランダム制御の周波数特性6002を乗算した周波数特性6003をもつ。周波数特性6003は、低周波側で応答が減衰した特性を示し、減衰分を補正して元の周波数特性6004に近付けるには、大きなゲインを与える必要がある。その結果、低周波側でノイズを増大させることになる。   In FIG. 7, reference numeral 6001 indicates the frequency characteristic of the subject, and reference numeral 6002 indicates the frequency characteristic of the shutter opening random control. The photographed image has a frequency characteristic 6003 obtained by multiplying the frequency characteristic 6001 of the subject by the frequency characteristic 6002 of the shutter opening random control. The frequency characteristic 6003 indicates a characteristic in which the response is attenuated on the low frequency side, and it is necessary to give a large gain in order to correct the attenuation and bring it close to the original frequency characteristic 6004. As a result, noise is increased on the low frequency side.

図8は低周波側でノイズが増幅された画像を示す図で、図6(a)に比べて、低周波のノイズが目立つ。   FIG. 8 is a diagram showing an image in which noise is amplified on the low frequency side. Compared with FIG. 6 (a), low frequency noise is conspicuous.

Coded Exposure Photography: Motion Deblurring using Fluttered Shutter, ACM SIGGRAPH 2006Coded Exposure Photography: Motion Deblurring using Fluttered Shutter, ACM SIGGRAPH 2006

本発明は、シャッタ開ランダム制御によって、振れよる画像の暈けを補正する際ノイズの増幅を抑制することを目的とする。 The present invention, by a shutter opening random control, and an object thereof is to suppress the amplification of noise at the time of correcting the blur of the image due to the shake.

本発明は、前記の目的を達成する一手段として、以下の構成を備える。   The present invention has the following configuration as one means for achieving the above object.

本発明にかかる画像処理は、撮像手段によりプレ撮像した画像データから被写体の周波数特性を解析し、前記解析の結果に基づき、前記撮像手段により前記被写体を本撮像する際の前記撮像手段のシャッタの開閉を制御する制御パターンとして、前記被写体の周波数特性に最も近い周波数特性を有する制御パターンを決定し、撮像手段の振れを検出し、前記決定した制御パターンおよび前記本撮像における前記撮像手段の振れから補正パラメータを算出し、前記補正パラメータを用いて前記本撮像された撮像データを補正することを特徴とする。 The image processing according to the present invention analyzes a frequency characteristic of a subject from image data pre-captured by an imaging unit, and based on a result of the analysis, a shutter of the imaging unit when the subject is actually imaged by the imaging unit. As a control pattern for controlling opening and closing, a control pattern having a frequency characteristic closest to the frequency characteristic of the subject is determined, a shake of the imaging unit is detected, and the determined control pattern and a shake of the imaging unit in the main imaging are detected. A correction parameter is calculated, and the actual captured image data is corrected using the correction parameter.

本発明によれば、シャッタ開ランダム制御によって、振れよる画像の暈けを補正する際ノイズの増幅を抑制することができる。 According to the present invention, the random-opening shutter control, the amplification of noise at the time of correcting the blur of the image due to the shake can be suppressed.

暈けの補正が不可能な例を説明する図。The figure explaining the example which cannot correct a blur. 暈けの補正が不可能な状況を具体的に示す図。The figure which shows the condition where the correction | amendment of a profit is impossible specifically. シャッタ開ランダム制御による暈けの補正を説明する図。The figure explaining the correction | amendment of the blur by shutter open random control. 暈けの補正が可能な状況を具体的に示す図。The figure which shows the condition where the correction | amendment of a blur is possible concretely. 図4(a)に示す被写体画像の周波数特性を示す図。FIG. 5 is a diagram showing frequency characteristics of the subject image shown in FIG. 風景写真の一例と、その周波数特性を示す図。The figure which shows an example of a landscape photograph, and its frequency characteristic. シャッタ開ランダム制御を用いた暈けの補正がノイズを増幅する理由を説明する図。The figure explaining the reason why the blur correction using the shutter opening random control amplifies the noise. 低周波側でノイズが増幅された画像を示す図。The figure which shows the image by which the noise was amplified by the low frequency side. 実施例の撮像装置の構成例を示すブロック図。1 is a block diagram illustrating a configuration example of an imaging apparatus according to an embodiment. 撮像装置の動作を説明するフローチャート。6 is a flowchart for explaining the operation of the imaging apparatus. プレ撮像によって撮影された画像例を示す図。The figure which shows the example of an image image | photographed by pre imaging. パターン保持部が保持する制御パターンの一例を示す図。The figure which shows an example of the control pattern which a pattern holding part hold | maintains. 補正パラメータの算出を説明する図。The figure explaining calculation of a correction parameter. 制御パターン生成装置の動作を説明するフローチャート。The flowchart explaining operation | movement of a control pattern production | generation apparatus. 制御パターンの生成の詳細を説明するフローチャート。The flowchart explaining the detail of the production | generation of a control pattern. サイズ32の初期制御パターンの一例を示す図。The figure which shows an example of the initial size control pattern of size 32. 交叉処理の一例を示す図。The figure which shows an example of a crossover process. 突然変異処理の一例を示す図。The figure which shows an example of a mutation process. シャッタ開ランダム制御を用いた暈けの補正においてノイズの増幅を抑制した様子を説明する図。The figure explaining a mode that amplification of noise was controlled in amendment correction using shutter opening random control. シャッタ開ランダム制御を用いた暈けの補正においてノイズの増幅を抑制した画像を示す図。The figure which shows the image which suppressed the amplification of the noise in correction | amendment of blur using shutter open random control.

以下、本発明にかかる実施例の画像処理を図面を参照して詳細に説明する。   Hereinafter, image processing according to an embodiment of the present invention will be described in detail with reference to the drawings.

[装置の構成]
図9は実施例の撮像装置の構成例を示すブロック図で、撮像装置11に制御パターン生成装置12が接続された状態を示す。
[Device configuration]
FIG. 9 is a block diagram illustrating a configuration example of the imaging device according to the embodiment, and illustrates a state where the control pattern generation device 12 is connected to the imaging device 11.

撮像装置11において、光学部101はレンズや光学ローパスフィルタなどを有する。撮像部102は、メカニカルシャッタや撮像デバイスなどを有する。   In the imaging device 11, the optical unit 101 includes a lens, an optical low-pass filter, and the like. The imaging unit 102 includes a mechanical shutter, an imaging device, and the like.

解析部104は、解析用データメモリ103が保持するデータに基づき被写体の周波数特性を解析する。パターン選択部105は、解析部104の解析結果に基づき、パターン保持部106が保持する制御パターンの中から制御パターンを選択する。   The analysis unit 104 analyzes the frequency characteristics of the subject based on the data stored in the analysis data memory 103. The pattern selection unit 105 selects a control pattern from the control patterns held by the pattern holding unit 106 based on the analysis result of the analysis unit 104.

振れ検出部107は、撮影時の振れを検出する。パラメータ算出部108は、パターン選択部105が選択した制御パターンと、振れ検出部107が検出した振れに基づき、補正パラメータを算出する。画像処理部109は、撮像部102が出力するアナログ信号をアナログ/ディジタル変換して撮像データに変換する。そして、撮像データに補正パラメータに基づく振れ補正を施し、さらにデモザイキング処理などを施して、画像データを出力する。   The shake detection unit 107 detects shake at the time of shooting. The parameter calculation unit 108 calculates a correction parameter based on the control pattern selected by the pattern selection unit 105 and the shake detected by the shake detection unit 107. The image processing unit 109 performs analog / digital conversion on the analog signal output from the imaging unit 102 and converts it into imaging data. Then, the image data is subjected to shake correction based on the correction parameter, further subjected to demosaicing processing, and the like, and image data is output.

解析用データメモリ103は、画像処理部109が出力する、後述するプレ撮像された画像データを、被写体の周波数特性の解析用に保持する。   The analysis data memory 103 holds pre-captured image data, which will be described later, output from the image processing unit 109 for analysis of the frequency characteristics of the subject.

画像メモリ110は、画像処理部109が出力する、後述するライブビュー用の画像データや本撮像された画像データを保持する。表示部111は、画像メモリ110に保持された画像データが表す画像などを表示するLCDなどである。出力部112は、外部装置に接続するインタフェイスや、メモリカードが装着可能なカードリーダライタなどであり、画像メモリ110に保持された画像データを外部装置に出力したり、メモリカードに格納する機能を有する。   The image memory 110 holds image data for live view, which will be described later, and image data that has been actually captured, which are output from the image processing unit 109. The display unit 111 is an LCD or the like that displays an image or the like represented by the image data held in the image memory 110. The output unit 112 is an interface connected to an external device, a card reader / writer to which a memory card can be attached, and the like. The output unit 112 outputs the image data held in the image memory 110 to the external device and stores it in the memory card. Have

制御パターン生成装置12は、パターン保持部106に格納する制御パターンを計算するパターン計算部201を有する。なお、撮像装置11と制御パターン生成装置12は、例えば、所定のインタフェイスを介して着脱自在に接続可能である。また、メモリカードによってパターン保持部106を構成し、撮像装置11から分離したメモリカードに制御パターン生成装置12によって制御パターンを書き込み、制御パターンを書き込んだメモリカードを撮像装置11に装着してもよい。   The control pattern generation device 12 includes a pattern calculation unit 201 that calculates a control pattern stored in the pattern holding unit 106. Note that the imaging device 11 and the control pattern generation device 12 can be detachably connected via a predetermined interface, for example. Alternatively, the pattern holding unit 106 may be configured by a memory card, a control pattern may be written to the memory card separated from the imaging device 11 by the control pattern generation device 12, and the memory card in which the control pattern is written may be attached to the imaging device 11. .

[撮像装置の動作]
図10は撮像装置11の動作を説明するフローチャートである。
[Operation of imaging device]
FIG. 10 is a flowchart for explaining the operation of the imaging apparatus 11.

撮像装置11は、図示しないシャッタボタンが押されるなど撮影が指示されると、プレ撮像を行い(S101)、プレ撮像した画像データを解析用データメモリ103に格納する(S102)。なお、プレ撮像された画像データをそのまま解析用データメモリ103に格納してもよいが、ダウンサンプリングした画像データを解析用データメモリ103に格納してもよい。   When imaging is instructed such as pressing a shutter button (not shown), the imaging device 11 performs pre-imaging (S101), and stores the pre-imaged image data in the analysis data memory 103 (S102). Note that pre-captured image data may be stored in the analysis data memory 103 as it is, or down-sampled image data may be stored in the analysis data memory 103.

撮像装置11は、撮像装置の振れによる画像の暈けが防げ、かつ、被写体の周波数特性の解析に充分な時間をプレ撮像の露光時間に設定する。従って、プレ撮像は、本撮像に比べて短い露光時間になり、画像処理部109は、プレ撮像された撮像データには振れ補正を施さない。図11はプレ撮像によって撮影された画像例を示す図で、光量が不足するため暗い画像になる。なお、ユーザが構図を決めている途中のライブビュー画像をプレ撮像の画像に利用してもよい。   The imaging device 11 sets a pre-imaging exposure time to a time sufficient to prevent image blurring due to the shake of the imaging device and to analyze the frequency characteristics of the subject. Therefore, the pre-imaging has a shorter exposure time than the main imaging, and the image processing unit 109 does not perform shake correction on the pre-imaged imaging data. FIG. 11 is a diagram showing an example of an image captured by pre-imaging, and the image becomes dark because the light amount is insufficient. Note that a live view image in the middle of composition determination by the user may be used as a pre-captured image.

次に、撮像装置11は、解析部104により、解析用データメモリ103に格納した画像データを解析して被写体の周波数特性を算出する(S103)。例えば、プレ撮像の画像データをフーリエ変換して、フーリエ変換後の応答(以下、振幅スペクトルF(s))を算出する。フーリエ変換後のデータは下式で表される。なお、振幅スペクトルではなく、パワースペクトルや、位相スペクトルを算出してもよい。
Rf(u, v) = Fourier{rp(x, y)}
Gf(u, v) = Fourier{gp(x, y)} …(1)
Bf(u, v) = Fourier{bp(x, y)}
ここで、rp(x, y)、gp(x, y)、bp(x, y)はプレ撮像された画像データのRGB値、
u、vは正規化された空間周波数、-0.5≦u≦0.5、-0.5≦v≦0.5、
u ,v=0の場合は直流成分を示す。
Next, the imaging device 11 uses the analysis unit 104 to analyze the image data stored in the analysis data memory 103 and calculate the frequency characteristics of the subject (S103). For example, Fourier transform is performed on the pre-captured image data, and a response after the Fourier transform (hereinafter referred to as an amplitude spectrum F (s)) is calculated. The data after Fourier transform is expressed by the following equation. Note that a power spectrum or a phase spectrum may be calculated instead of the amplitude spectrum.
Rf (u, v) = Fourier {rp (x, y)}
Gf (u, v) = Fourier {gp (x, y)}… (1)
Bf (u, v) = Fourier {bp (x, y)}
Here, rp (x, y), gp (x, y), bp (x, y) are RGB values of pre-captured image data,
u and v are normalized spatial frequencies, −0.5 ≦ u ≦ 0.5, −0.5 ≦ v ≦ 0.5,
When u and v = 0, the direct current component is indicated.

次に、撮像装置11は、パターン選択部105により、被写体の振幅スペクトルF(s)に基づき、パターン保持部106が保持する制御パターンの中から本撮像に使用する制御パターンを選択する(S104)。   Next, the imaging apparatus 11 uses the pattern selection unit 105 to select a control pattern to be used for main imaging from the control patterns held by the pattern holding unit 106 based on the amplitude spectrum F (s) of the subject (S104). .

●パターン選択部
図12はパターン保持部106が保持する制御パターンの一例を示す図である。パターン保持部106は、制御パターンPnと、その周波数特性(振幅スペクトルPn(s))を複数、制御パターン選択部の選択用に保持する。
Pattern Selection Unit FIG. 12 is a diagram illustrating an example of a control pattern held by the pattern holding unit 106. The pattern holding unit 106 holds a plurality of control patterns Pn and their frequency characteristics (amplitude spectrum Pn (s)) for selection by the control pattern selection unit.

パターン選択部105は、プレ撮像した画像のRGBそれぞれの二次元振幅スペクトルを、縦横平均化して一次元の振幅スペクトルに変換する。
Rg(s) = {√Rf(0, s)2 + √Rf(s, 0)2}/2
Gg(s) = {√Gf(0, s)2 + √Gf(s, 0)2}/2 …(2)
Bg(s) = {√Bf(0, s)2 + √Bf(s, 0)2}/2
ここで、0≦s≦0.5、正の空間周波数のみを考慮する。
The pattern selection unit 105 converts the RGB two-dimensional amplitude spectra of the pre-captured image into a one-dimensional amplitude spectrum by averaging the two-dimensional amplitude spectra.
Rg (s) = {√Rf (0, s) 2 + √Rf (s, 0) 2 } / 2
Gg (s) = {√Gf (0, s) 2 + √Gf (s, 0) 2 } / 2… (2)
Bg (s) = {√Bf (0, s) 2 + √Bf (s, 0) 2 } / 2
Here, 0 ≦ s ≦ 0.5, only positive spatial frequencies are considered.

さらに、パターン選択部105は、被写体の振幅スペクトルF(s)を下式によって算出する。
F(s) = {Rg(s) + Gg(s) + Bg(s)}/3 …(3)
Further, the pattern selection unit 105 calculates the amplitude spectrum F (s) of the subject using the following equation.
F (s) = {Rg (s) + Gg (s) + Bg (s)} / 3… (3)

さらに、パターン選択部105は、被写体の振幅スペクトルF(s)と、制御パターンPkの振幅スペクトルPk(s)の積の総和Tkを計算する
Tk = Σ{F(s)×Pk(s)} …(4)
ここで、Σの範囲はs=0から0.5、
1≦k≦n。
Further, the pattern selection unit 105 calculates a sum Tk of products of the amplitude spectrum F (s) of the subject and the amplitude spectrum Pk (s) of the control pattern Pk.
Tk = Σ {F (s) × Pk (s)}… (4)
Here, the range of Σ is s = 0 to 0.5,
1 ≦ k ≦ n.

そして、パターン選択部105は、Tk(被写体の振幅スペクトルF(s)と制御パターンPkの振幅スペクトルPk(s)の積の総和算、言い換えれば、振幅スペクトルの積分値)が最大になる制御パターンPnを選択する。   Then, the pattern selection unit 105 controls the control pattern that maximizes Tk (the sum of products of the amplitude spectrum F (s) of the subject and the amplitude spectrum Pk (s) of the control pattern Pk, in other words, the integral value of the amplitude spectrum). Select Pn.

なお、制御パターンの選択基準は「振幅スペクトルの積分値が最大」に限らず、例えば「パワースペクトルの二乗誤差が最小」や「被写体の位相スペクトルと最も相関が高い位相スペクトルをもつ制御パターン」でもよい。   The control pattern selection criterion is not limited to “maximum amplitude spectrum integrated value”, but may be “control pattern with phase spectrum having the highest correlation with the phase spectrum of the object” or “control pattern having the highest correlation with the phase spectrum of the subject”. Good.

次に、撮像装置11は、撮像部102により、選択した制御パターンPnを用いるシャッタ開制御を行い、本撮像を行う(S105)。なお、撮像部102はメカニカルシャッタを備えると説明したが、電子シャッタを利用してもよいし、メカニカルシャッタと電子シャッタの組み合わせでもよい。   Next, the imaging device 11 performs shutter opening control using the selected control pattern Pn by the imaging unit 102, and performs the main imaging (S105). In addition, although it has been described that the imaging unit 102 includes a mechanical shutter, an electronic shutter may be used, or a combination of a mechanical shutter and an electronic shutter may be used.

次に、撮像装置11は、パラメータ算出部108により、振れ検出部107が検出した本撮像時の振れと、本撮像に使用した制御パターンに基づき、暈けの点像分布関数(point spread function: PSF)を算出し、算出したPSFから補正パラメータを算出する(S106)。   Next, the imaging apparatus 11 uses the parameter calculation unit 108 based on the shake at the time of main imaging detected by the shake detection unit 107 and the control pattern used for the main imaging, and a point spread function (point spread function: PSF) is calculated, and a correction parameter is calculated from the calculated PSF (S106).

●補正パラメータの算出
振れ検出部107は、ジャイロセンサなどを用いて、本撮像中に撮像装置11が振れた方向と量を検出する。
Correction Parameter Calculation The shake detection unit 107 detects the direction and amount of shake of the imaging device 11 during the main imaging using a gyro sensor or the like.

図13は補正パラメータの算出を説明する図である。   FIG. 13 is a diagram illustrating calculation of correction parameters.

図13(a)は振れ検出部107による振れの検出結果の一例を示す図で、Y方向に等速に振れた場合を示す。図13(a)の例は、2.4秒間にY方向へ60画素分、等速に振れたことを表す。なお、説明を簡単にするため、等速の振れを説明するが、等速ではない場合もあり、その場合、振れの軌跡は曲線になる。   FIG. 13A is a diagram showing an example of a shake detection result by the shake detection unit 107, and shows a case where the shake is shaken at a constant speed in the Y direction. The example of FIG. 13 (a) represents that the camera shakes at a constant speed by 60 pixels in the Y direction in 2.4 seconds. In order to simplify the explanation, the constant-speed vibration will be described. However, there may be cases where the constant-speed vibration is not constant, and in this case, the locus of the vibration becomes a curve.

図13(b)はシャッタの開閉を示し、露光開始から終了まで2.4秒間の間にシャッタ開が1.2秒間ある例を示している。   FIG. 13 (b) shows opening and closing of the shutter, and shows an example in which the shutter is opened for 1.2 seconds from the start to the end of exposure for 2.4 seconds.

図13(c)は、図13(b)の露光と図13(a)の振れの軌跡を組み合わせた状態を示す。つまり、露光時間は断続的に2.4秒間であるから、Y方向へ60画素分の等速の振れが撮影された画像に影響することになる。   FIG. 13 (c) shows a state where the exposure of FIG. 13 (b) and the shake locus of FIG. 13 (a) are combined. That is, since the exposure time is intermittently 2.4 seconds, a constant-speed shake of 60 pixels in the Y direction affects the photographed image.

図13(d)は図13(c)の振れの軌跡をXY平面に写像した図で、太破線で表される部分がPSFに相当する。   FIG. 13 (d) is a diagram in which the shake trajectory of FIG. 13 (c) is mapped to the XY plane, and the portion indicated by a thick broken line corresponds to PSF.

パラメータ算出部108は、図13(d)に示す振れのPSFを用いて、暈け補正用の補正パラメータとして、例えばWienerフィルタを算出する。勿論、その他のフィルタでもよく、例えばカルマンフィルタでもよい。また、フィルタ処理を用いた暈けの補正に限らず、アンシャープマスクのような鮮鋭化処理でもよい。   The parameter calculation unit 108 calculates, for example, a Wiener filter as a correction parameter for blur correction, using the shake PSF shown in FIG. 13 (d). Of course, other filters may be used, for example, a Kalman filter. Further, not only blur correction using filter processing but also sharpening processing such as an unsharp mask may be used.

パラメータ算出部108は、図13(d)に示すPSFをフーリエ変換し、PSFの周波数特性であるFPSFを算出する。
FPSF(u, v) = Fourier{PSF(x, y)} …(5)
The parameter calculation unit 108 performs Fourier transform on the PSF shown in FIG. 13 (d) to calculate F PSF that is the frequency characteristic of the PSF .
F PSF (u, v) = Fourier {PSF (x, y)}… (5)

次に、パラメータ算出部108は、FPSFからWienerフィルタFwを算出する。
Fw(u, v) = 1/FPSF(u, v)・FPSF(u, v)2/{FPSF(u, v)2 + Noise(u, v)2} …(6)
ここで、Noise(u, v)は画像に重畳する周波数ごとのノイズ量。
Then, the parameter calculating unit 108 calculates the Wiener filter Fw from F PSF.
Fw (u, v) = 1 / F PSF (u, v) ・ F PSF (u, v) 2 / {F PSF (u, v) 2 + Noise (u, v) 2 }… (6)
Here, Noise (u, v) is the amount of noise for each frequency superimposed on the image.

そして、パラメータ算出部108は、周波数領域におけるFwを逆フーリエ変換して実空間のフィルタW(x, y)(補正パラメータ)を算出する。
W(x, y) = Fourier-1{Fw(u, v)} …(7)
Then, the parameter calculation unit 108 performs inverse Fourier transform on Fw in the frequency domain to calculate a real space filter W (x, y) (correction parameter).
W (x, y) = Fourier -1 {Fw (u, v)}… (7)

次に、撮像装置11は、画像処理部109により、補正パラメータの実空間のWienerフィルタを使用して、本撮像された撮像データの暈けを補正する(S107)。
Imgcorrect(x, y) = Img(x, y) * W(x, y) …(8)
ここで、Img(x, y)はA/D変換された撮像データ、
Imgcorrect(x, y)は暈け補正後の撮像データ、
*はコンボリューションを表す。
Next, the imaging apparatus 11 uses the image processing unit 109 to correct the blur of the captured image data using the Wiener filter in the real space of the correction parameter (S107).
Img correct (x, y) = Img (x, y) * W (x, y)… (8)
Where Img (x, y) is A / D converted imaging data,
Img correct (x, y) is the image data after blur correction,
* Represents convolution.

そして、撮像装置11は、画像処理部109により、暈け補正後の撮像データをデモザイキング処理した結果のRGB画像データ(本撮像された画像データ)を画像メモリ110に格納する(S108)。そして、本撮像した画像データの出力として、画像データが表す画像の表示部111への表示、出力部112を介した、外部装置への出力、メモリカードへの保存の少なくとも一つを行う(S109)。   Then, the image pickup device 11 stores the RGB image data (the image data that has been actually picked up) as a result of demosaicing processing of the image data after blur correction by the image processing unit 109 in the image memory 110 (S108). Then, as output of the captured image data, at least one of display on the display unit 111 of an image represented by the image data, output to an external device via the output unit 112, and storage in a memory card is performed (S109). ).

[制御パターン生成装置の動作]
●目標関数の設定
制御パターン生成装置12は、目標関数を設定して制御パターンを生成する。目標関数は、制御パターンの空間周波数特性、シャッタの開閉比率を表す。
[Operation of control pattern generator]
Setting Target Function The control pattern generation device 12 sets a target function and generates a control pattern. The target function represents the spatial frequency characteristics of the control pattern and the shutter open / close ratio.

制御パターンの周波数特性をガウス型の低域通過特性とすると、次式のようになる。なお、シャッタ開の比率をa、つまりシャッタ開の時間比率がa%に対して、シャッタ閉の時間比率は100-a%である。
G(f) = a√(2π)σ・N(μ, σ2)
= a√(2π)σ・N(0, σ2) …(9)
ここで、G(f)は周波数特性、
aはシャッタ開の比率、
N(μ, σ2)はガウス分布密度関数、
μは平均値、
σ2は分散。
If the frequency characteristic of the control pattern is a Gaussian low-pass characteristic, the following equation is obtained. The shutter opening ratio is a, that is, the shutter opening time ratio is a%, and the shutter closing time ratio is 100-a%.
G (f) = a√ (2π) σ ・ N (μ, σ 2 )
= a√ (2π) σ ・ N (0, σ 2 )… (9)
Where G (f) is the frequency characteristic,
a is the shutter open ratio,
N (μ, σ 2 ) is the Gaussian density function,
μ is the average value,
σ 2 is the variance.

式(9)において、分散σはガウス分布の拡がり度合いを示す。分散σが大きくなると減衰特性が弱い低域通過特性になり、分散σが小さいと減衰特性の強い低域通過特性になる。なお、制御パターンの周波数特性はガウス型の低域通過特性に限らず、例えば、矩形型の低域通過特性でもよいし、帯域通過特性や帯域阻止特性でもよい。   In equation (9), variance σ represents the degree of spread of the Gaussian distribution. When the dispersion σ increases, the low-pass characteristic has a weak attenuation characteristic, and when the dispersion σ is small, the low-pass characteristic has a strong attenuation characteristic. The frequency characteristic of the control pattern is not limited to the Gaussian low-pass characteristic, and may be, for example, a rectangular low-pass characteristic, a band-pass characteristic, or a band rejection characteristic.

●制御パターンの生成
図14は制御パターン生成装置12の動作を説明するフローチャートである。
Control Pattern Generation FIG. 14 is a flowchart for explaining the operation of the control pattern generation device 12.

パターン計算部201は、目標関数を設定し(S201)、制御パターンの周波数特性と目標関数の周波数特性の二乗平均誤差が最小になるように制御パターンを編集する(S202)。なお、本実施例において、遺伝的アルゴリズムにより、制御パターンの周波数特性と目標関数の周波数特性の二乗平均誤差が最小になるように制御パターンを編集して、目標関数にマッチする制御パターンを生成する。勿論、制御パターンの編集に他の編集アルゴリズムを用いてもよい。そして、生成した制御パターンをパターン保持部106に格納する(S203)。   The pattern calculation unit 201 sets a target function (S201), and edits the control pattern so that the mean square error between the frequency characteristic of the control pattern and the frequency characteristic of the target function is minimized (S202). In this embodiment, the control pattern is edited by a genetic algorithm so that the mean square error between the frequency characteristic of the control pattern and the frequency characteristic of the target function is minimized, and a control pattern that matches the target function is generated. . Of course, other editing algorithms may be used for editing the control pattern. Then, the generated control pattern is stored in the pattern holding unit 106 (S203).

図15は制御パターンの生成(S202)の詳細を説明するフローチャートである。   FIG. 15 is a flowchart for explaining the details of the generation of the control pattern (S202).

パターン計算部201は、サイズLの初期制御パターンを複数個P生成する(S301)。この処理は、遺伝的アルゴリズムにおけるP個の初期集団の生成と等価である。図16はサイズ32の初期制御パターンの一例を示す図で、白ドットはシャッタ開に、黒ドットはシャッタ閉に対応する。   The pattern calculation unit 201 generates a plurality P of initial control patterns of size L (S301). This process is equivalent to the generation of P initial populations in the genetic algorithm. FIG. 16 is a diagram illustrating an example of an initial control pattern of size 32. White dots correspond to shutter opening, and black dots correspond to shutter closing.

次に、パターン計算部201は、初期制御パターンの周波数特性と、目標関数の周波数特性が類似するか否かを評価する(S302)。本実施例においては、制御パターンの振幅スペクトルと、目標関数の周波数特性G(f)の二乗平均誤差を評価する。   Next, the pattern calculation unit 201 evaluates whether the frequency characteristic of the initial control pattern is similar to the frequency characteristic of the target function (S302). In this embodiment, the amplitude spectrum of the control pattern and the mean square error of the frequency characteristic G (f) of the target function are evaluated.

制御パターンをh(t)とすると、その振幅スペクトルHamp(f)は次式で表される。
H(f) = Fourier{h(t)} …(10)
Hamp(f) = √{H(f)2} …(11)
When the control pattern is h (t), the amplitude spectrum Hamp (f) is expressed by the following equation.
H (f) = Fourier {h (t)}… (10)
Hamp (f) = √ {H (f) 2 }… (11)

従って、評価値Jは次式で表される。
J = Σ{G(f) - Hamp(f)}2 …(12)
Therefore, the evaluation value J is expressed by the following equation.
J = Σ {G (f)-Hamp (f)} 2 … (12)

遺伝的アルゴリズムは、適応度が大きい個体を探索するアルゴリズムであるから、評価値Jが小さいほど大きな適応度を与える必要がある。このため、例えば適応度Fを以下のようにすればよい。
F = (Jmax - J)+α …(13)
ここで、αは正の定数、
Jmaxは現世代の集団の最大の評価値(評価が最低の個体の評価値)。
Since the genetic algorithm is an algorithm for searching for an individual having a high fitness, it is necessary to give a higher fitness as the evaluation value J is smaller. For this reason, for example, the fitness F may be set as follows.
F = (Jmax-J) + α (13)
Where α is a positive constant,
Jmax is the maximum evaluation value of the current generation population (the evaluation value of the individual with the lowest evaluation).

なお、評価値Jから適応度Fへの変換は、上式に限るものではなく、シグモイド関数などを用いて、評価値Jが小さくなるほど適応度Fが大きくなるようにすればよい。   Note that the conversion from the evaluation value J to the fitness F is not limited to the above formula, and the fitness F may be increased as the evaluation value J decreases using a sigmoid function or the like.

次に、パターン計算部201は、現世代の世代数と最大世代数を比較して、現世代の世代数が最大世代数に達した場合は、制御パターンの編集が終了したと判定する(S303)。つまり、後述する選択処理、交叉処理、突然変異処理(制御パターンの編集)により、現世代のP個の制御パターンから次世代のP個の制御パターンを生成する。そして、最大世代数に達するまで制御パターンの編集を繰り返し、最終的に現世代の中で最も適応度Fが高い制御パターンを目標関数にマッチする制御パターンとする。   Next, the pattern calculation unit 201 compares the number of generations of the current generation with the maximum number of generations, and determines that the editing of the control pattern is complete when the number of generations of the current generation reaches the maximum number of generations (S303). ). That is, the next generation P control patterns are generated from the current generation P control patterns by selection processing, crossover processing, and mutation processing (control pattern editing) described later. Then, editing of the control pattern is repeated until the maximum number of generations is reached, and finally, the control pattern having the highest fitness F in the current generation is set as a control pattern that matches the target function.

制御パターンの編集が未了の場合、パターン計算部201は、遺伝的アルゴリズムにおける選択を行う(S304)。遺伝的アルゴリズムにおける選択は、適応度Fの大きな制御パターンを次の世代に残す処理である。適応度Fが大きければ大きいほど選択される確率が大きくなるようにルーレットルール、または、トーナメント方式を採用する。なお、ルーレットルール、トーナメント方式は、遺伝的アルゴリズムにおける既知の処理である。   If the control pattern has not been edited, the pattern calculation unit 201 performs selection in the genetic algorithm (S304). Selection in the genetic algorithm is a process of leaving a control pattern having a large fitness F in the next generation. The roulette rule or the tournament method is adopted so that the higher the fitness F is, the higher the probability of being selected. The roulette rule and the tournament method are known processes in the genetic algorithm.

次に、パターン計算部201は、選択した制御パターン同士を交叉確率pc(0≦pc≦1)で交叉させる(S305)。図17は交叉処理の一例を示す図で、二つの制御パターンの間でパターンの一部を入れ替える。なお、制御パターンの交叉点はランダムに決定する。また、図17には一点交叉を示すが、二点交叉を利用してもよい。   Next, the pattern calculation unit 201 crosses the selected control patterns with a crossover probability pc (0 ≦ pc ≦ 1) (S305). FIG. 17 is a diagram showing an example of crossover processing, in which a part of the pattern is exchanged between two control patterns. Note that the intersection of the control patterns is determined randomly. FIG. 17 shows one-point crossing, but two-point crossing may be used.

次に、パターン計算部201は、選択した制御パターンを突然変異確率pm(0≦pm≦1)で突然変異させる(S306)。図18は突然変異処理の一例を示す図で、突然変異位置のシャッタの開閉を反転する。なお、突然変異位置(図18の例ではハッチング部分)はランダムに決定する。突然変異の処理が終了後、処理をステップS302へ戻す。   Next, the pattern calculation unit 201 mutates the selected control pattern with a mutation probability pm (0 ≦ pm ≦ 1) (S306). FIG. 18 is a diagram showing an example of the mutation process, in which the opening / closing of the shutter at the mutation position is reversed. The mutation position (hatched portion in the example of FIG. 18) is randomly determined. After the mutation process is completed, the process returns to step S302.

このように、本撮像の前に、仮撮像した被写体の周波数特性を解析する。そして、被写体の周波数特性に最も近い制御パターンを選択して本撮影を行う。従って、被写体の周波数特性と制御パターンの周波数特性の乖離を低減することができ、ノイズの増幅を抑制することができる。   In this manner, the frequency characteristics of the temporarily captured subject are analyzed before the main imaging. Then, the control pattern closest to the frequency characteristic of the subject is selected to perform the main photographing. Therefore, the difference between the frequency characteristics of the subject and the frequency characteristics of the control pattern can be reduced, and noise amplification can be suppressed.

図19はシャッタ開ランダム制御を用いた暈けの補正においてノイズの増幅を抑制した様子を説明する図である。   FIG. 19 is a diagram for explaining a state in which noise amplification is suppressed in blur correction using shutter open random control.

図19において、符号8001は被写体の周波数特性を示し、符号8002は制御パターンの周波数特性を示す。制御パターンの周波数特性8002は、被写体の周波数特性8001と同様に、低周波側成分を多くもつ。   In FIG. 19, reference numeral 8001 indicates the frequency characteristic of the subject, and reference numeral 8002 indicates the frequency characteristic of the control pattern. The frequency characteristic 8002 of the control pattern has many low frequency side components, like the frequency characteristic 8001 of the subject.

撮影画像は、被写体の周波数特性8001と制御パターンの周波数特性8002を乗算した周波数特性8003をもつ。周波数特性8003は、低周波側で応答が若干減衰した特性を示すが、減衰分を補正して元の周波数特性8004に近付けるには、図7の例に比べて大きなゲインを与える必要はない。その結果、低周波側のノイズの増幅を抑制することができる。   The captured image has a frequency characteristic 8003 obtained by multiplying the frequency characteristic 8001 of the subject and the frequency characteristic 8002 of the control pattern. The frequency characteristic 8003 shows a characteristic in which the response is slightly attenuated on the low frequency side. However, in order to correct the attenuation and bring it close to the original frequency characteristic 8004, it is not necessary to give a larger gain than the example of FIG. As a result, noise amplification on the low frequency side can be suppressed.

図20はシャッタ開ランダム制御を用いた暈けの補正においてノイズの増幅を抑制した画像を示す図で、図8に比べて、低周波のノイズが抑制されている。   FIG. 20 is a diagram illustrating an image in which noise amplification is suppressed in blur correction using shutter open random control. Compared with FIG. 8, low-frequency noise is suppressed.

[変形例]
上記では、制御パターン生成装置12が生成した制御パターンをパターン保持部106に保持し、パターン保持部106が保持する制御パターンから、被写体の周波数特性に最も近い制御パターンを選択して本撮像を行う例を説明した。
[Modification]
In the above, the control pattern generated by the control pattern generation device 12 is held in the pattern holding unit 106, and the control pattern closest to the frequency characteristic of the subject is selected from the control patterns held by the pattern holding unit 106, and the main imaging is performed. An example was explained.

しかし、制御パターンを予め用意せずに、プレ撮像で撮像した画像の周波数特性(被写体の周波数特性)にマッチする制御パターンをリアルタイムに生成してもよい。その際の目標関数はプレ撮像した画像の振幅スペクトルである。こうすれば、パターン保持部106が不要になり、撮像装置11が必要とするメモリ量を削減することができる。   However, without preparing a control pattern in advance, a control pattern that matches the frequency characteristic (frequency characteristic of a subject) of an image captured by pre-imaging may be generated in real time. The target function at that time is the amplitude spectrum of the pre-captured image. In this way, the pattern holding unit 106 becomes unnecessary, and the amount of memory required for the imaging device 11 can be reduced.

本発明の目的は、次のようにしても達成される。上記実施例の機能または先に説明したフローチャートを実現するコンピュータプログラムを記録した記録媒体または記憶媒体をシステムまたは装置に供給し、そのシステムまたは装置のコンピュータ(CPUやMPU)に前記コンピュータプログラムを実行させる。この場合、記録媒体から読み出されたソフトウェア自体が上記実施例の機能を実現することになり、そのコンピュータプログラムと、そのコンピュータプログラムを記憶する、コンピュータが読み取り可能な記録媒体は本発明を構成する。   The object of the present invention can also be achieved as follows. A recording medium or storage medium storing a computer program for realizing the functions of the above-described embodiments or the flowcharts described above is supplied to the system or apparatus, and the computer (CPU or MPU) of the system or apparatus is caused to execute the computer program. . In this case, the software read from the recording medium itself realizes the functions of the above embodiments, and the computer program and the computer-readable recording medium storing the computer program constitute the present invention. .

Claims (7)

撮像手段によりプレ撮像した画像データから被写体の周波数特性を解析する解析手段と、
前記解析の結果に基づき、前記撮像手段により前記被写体を本撮像する際の前記撮像手段のシャッタの開閉を制御する制御パターンとして、前記被写体の周波数特性に最も近い周波数特性を有する制御パターンを決定する決定手段と、
撮像手段の振れを検出する検出手段と、
前記決定した制御パターンおよび前記本撮像における前記撮像手段の振れから補正パラメータを算出する算出手段と、
前記補正パラメータを用いて前記本撮像された撮像データを補正する補正手段とを有することを特徴とする画像処理装置。
Analysis means for analyzing the frequency characteristics of the subject from image data pre-imaged by the imaging means;
Based on the result of the analysis, a control pattern having a frequency characteristic closest to the frequency characteristic of the subject is determined as a control pattern for controlling the opening and closing of the shutter of the imaging means when the subject is actually imaged by the imaging means. A determination means;
Detecting means for detecting shake of the imaging means;
Calculation means for calculating a correction parameter from the determined control pattern and shake of the imaging means in the main imaging;
An image processing apparatus comprising: a correction unit that corrects the captured image data using the correction parameter.
前記決定手段は、複数の制御パターンの中から一つの制御パターンを選択することを特徴とする請求項1に記載された画像処理装置。   2. The image processing apparatus according to claim 1, wherein the determination unit selects one control pattern from a plurality of control patterns. さらに、制御パターンの周波数特性およびシャッタの開閉比率に基づき、前記制御パターンを生成する生成手段と、
前記生成手段が生成した制御パターンを前記決定手段の選択用に保持する保持手段とを有することを特徴とする請求項2に記載された画像処理装置。
And generating means for generating the control pattern based on the frequency characteristics of the control pattern and the opening / closing ratio of the shutter;
3. The image processing apparatus according to claim 2, further comprising a holding unit that holds the control pattern generated by the generation unit for selection by the determination unit.
前記算出手段は、前記制御パターンおよび前記撮像手段の振れから画像の暈けを示す点像分布関数を算出し、前記点像分布関数に基づき前記補正パラメータを算出することを特徴とする請求項1から請求項3の何れか一項に記載された画像処理装置。 2. The calculation means calculates a point spread function indicating an image blur from the control pattern and a shake of the imaging means, and calculates the correction parameter based on the point spread function. 4. The image processing device according to any one of claims 3 to 4. 前記解析手段は、前記撮像手段の振れによる画像の暈けが防げ、かつ、前記被写体の周波数特性の解析が可能な時間を前記プレ撮像の露光時間に設定することを特徴とする請求項1から請求項4の何れか一項に記載された画像処理装置。 2. The analysis unit according to claim 1, wherein a time period during which an image can be prevented from blurring due to a shake of the imaging unit and the frequency characteristic of the subject can be analyzed is set as the exposure time for the pre-imaging. Item 5. The image processing device according to any one of Items 4 to 4 . 撮像手段によりプレ撮像した画像データから被写体の周波数特性を解析し、
前記解析の結果に基づき、前記撮像手段により前記被写体を本撮像する際の前記撮像手段のシャッタの開閉を制御する制御パターンとして、前記被写体の周波数特性に最も近い周波数特性を有する制御パターンを決定し、
撮像手段の振れを検出し、
前記決定した制御パターンおよび前記本撮像における前記撮像手段の振れから補正パラメータを算出し、
前記補正パラメータを用いて前記本撮像された撮像データを補正することを特徴とする画像処理方法。
Analyzing the frequency characteristics of the subject from the image data pre-imaged by the imaging means
Based on the result of the analysis, a control pattern having a frequency characteristic closest to the frequency characteristic of the subject is determined as a control pattern for controlling the opening and closing of the shutter of the imaging means when the subject is actually imaged by the imaging means. ,
Detecting shake of the imaging means,
Calculating a correction parameter from the determined control pattern and shake of the imaging means in the main imaging;
An image processing method, wherein the captured image data is corrected using the correction parameter.
画像処理装置に請求項6に記載された画像処理を実行させるためのプログラム。 A program for causing an image processing apparatus to execute the image processing described in claim 6 .
JP2009123537A 2009-05-21 2009-05-21 Image processing apparatus and method Active JP5383315B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009123537A JP5383315B2 (en) 2009-05-21 2009-05-21 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009123537A JP5383315B2 (en) 2009-05-21 2009-05-21 Image processing apparatus and method

Publications (3)

Publication Number Publication Date
JP2010273139A JP2010273139A (en) 2010-12-02
JP2010273139A5 JP2010273139A5 (en) 2012-06-21
JP5383315B2 true JP5383315B2 (en) 2014-01-08

Family

ID=43420810

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009123537A Active JP5383315B2 (en) 2009-05-21 2009-05-21 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP5383315B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5377073B2 (en) * 2009-05-20 2013-12-25 キヤノン株式会社 Imaging apparatus, blur repair method, and program
JP5773816B2 (en) * 2011-09-12 2015-09-02 キヤノン株式会社 Imaging device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006050782A1 (en) * 2004-11-10 2006-05-18 Fotonation Vision Limited A digital image acquisition system having means for determining a camera motion blur function
US7580620B2 (en) * 2006-05-08 2009-08-25 Mitsubishi Electric Research Laboratories, Inc. Method for deblurring images using optimized temporal coding patterns
JP5188205B2 (en) * 2007-06-12 2013-04-24 ミツビシ・エレクトリック・リサーチ・ラボラトリーズ・インコーポレイテッド Method for increasing the resolution of moving objects in an image acquired from a scene by a camera

Also Published As

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

Similar Documents

Publication Publication Date Title
JP7258604B2 (en) Image processing method, image processing device, program, and method for manufacturing learned model
US9036032B2 (en) Image pickup device changing the size of a blur kernel according to the exposure time
JP4152398B2 (en) Image stabilizer
US8311385B2 (en) Method and device for controlling video recordation property of camera module according to velocity of object
JP2008042874A (en) Image processing device, method for restoring image and program
JP2011119802A (en) Image processor and image processing method
WO2011099239A1 (en) Imaging device and method, and image processing method for imaging device
JP4145308B2 (en) Image stabilizer
JP2009088935A (en) Image recording apparatus, image correcting apparatus, and image pickup apparatus
JP5383315B2 (en) Image processing apparatus and method
CN110663249B (en) Apparatus and method for image processing
JP5543280B2 (en) Image processing apparatus and image processing method
CN115496673A (en) Image processing method, image processing apparatus, image processing system, and storage medium
JP5511403B2 (en) Image processing apparatus and control method thereof
JP2006279808A (en) Camera-shake correction apparatus
JP5616989B2 (en) Image processing apparatus and threshold setting processing program
JP2012085205A (en) Image processing apparatus, imaging device, image processing method, and image processing program
JP2017130167A (en) Image processing device, imaging device, and image processing program
JP2016119532A (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP6555881B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
WO2022215375A1 (en) Image processing method, method for producing machine learning model, image processing device, image processing system, and program
JP7225316B2 (en) Image processing method, image processing apparatus, image processing system, and program
JP2010108161A (en) Image processing apparatus and method, and computer program
JP2009088933A (en) Image recording apparatus, image correcting apparatus and image pickup apparatus
JP2021086272A (en) Image processing method, program, learnt model manufacturing method, image processing apparatus, and image processing system

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120508

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120508

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130419

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130507

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130510

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131001

R151 Written notification of patent or utility model registration

Ref document number: 5383315

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151