JP2012169772A - Image processing device, and image processing method - Google Patents

Image processing device, and image processing method Download PDF

Info

Publication number
JP2012169772A
JP2012169772A JP2011027630A JP2011027630A JP2012169772A JP 2012169772 A JP2012169772 A JP 2012169772A JP 2011027630 A JP2011027630 A JP 2011027630A JP 2011027630 A JP2011027630 A JP 2011027630A JP 2012169772 A JP2012169772 A JP 2012169772A
Authority
JP
Japan
Prior art keywords
blur
frame
focus
period
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.)
Withdrawn
Application number
JP2011027630A
Other languages
Japanese (ja)
Inventor
Shinichi Mitsumoto
信一 三ツ元
Hirochika Matsuoka
寛親 松岡
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 JP2011027630A priority Critical patent/JP2012169772A/en
Publication of JP2012169772A publication Critical patent/JP2012169772A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform blur correction image processing to a focus oscillation video with ease.SOLUTION: To such a video with oscillated focus as being once focused, then out of focus and focused again, a focused frame is specified as a reference frame image. A time period to a frame image being focused once, then blurred and focused again is set as a blur video time period by using the reference frame image as a reference. Blur characteristics of each frame are calculated based on the reference frame image in the blur video time period. Blur correction to each frame in the blur video time period is performed using the calculated blur characteristics to enable a video with modified blur to be outputted.

Description

本発明は画像処理装置及び画像処理方法に関し、特に、カメラでフォーカスレンズを操作し、撮影した際に生じるピントが振動した映像を簡単に補正するために用いて好適な技術に関する。   The present invention relates to an image processing apparatus and an image processing method, and more particularly to a technique suitable for easily correcting an image generated by a focus lens that is vibrated when a focus lens is operated with a camera.

デジタルスチルカメラやビデオカメラにおいて、フォーカスレンズをマニュアルで操作して撮影する際、ビューファインダー等に表示される被写体を見ながら行う場合には、表示面積が小さいので被写体にピントを合わせることが難しい。このため、フォーカスレンズを操作しながら被写体にピントを合わせる際、ピントが適正な状態から一度ピントが外れ、ピントを再修正する場合がある。このとき映像は、適正ピントの画像から一旦被写体がボケ、再度ピントが合うというように変化する(以下、ピント振動あるいはピント振動映像と呼ぶ)。   In digital still cameras and video cameras, when taking a picture by manually operating the focus lens, it is difficult to focus on the subject because the display area is small when viewing the subject displayed on the viewfinder or the like. For this reason, when focusing on the subject while operating the focus lens, the focus may be once out of focus and the focus may be corrected again. At this time, the image changes so that the subject is once out of focus and refocused from the image of the proper focus (hereinafter referred to as focus vibration or focus vibration image).

これに対する従来技術として、同一被写体の合焦点画像とボケ画像からボケ補正関数を計算し、ボケ補正を行う技術(例えば、特許文献1)がある。本技術は、同一被写体の合焦点画像とボケ画像からボケ補正関数(詳細フォーカス関数)を計算し、さらにこのボケ補正関数に対して教育データを与えてボケ補正用のスマートフォーカス関数を計算するものである。   As a conventional technique, there is a technique (for example, Patent Document 1) that calculates a blur correction function from a focused image and a blur image of the same subject and performs blur correction. This technology calculates a blur correction function (detailed focus function) from a focused image and a blur image of the same subject, and further gives a training data to the blur correction function to calculate a smart focus function for blur correction. It is.

特開2009−20844号公報JP 2009-20844 A

しかしながら特許文献1によれば、ボケ補正用のスマートフォーカス関数を計算するため、あらかじめ同一被写体の合焦点画像とボケ画像を準備しておく必要がある。また、補正対象が映像である場合は対象フレームを総て指定しなければならず、ユーザーの手間がかかるという課題があった。
本発明は前述の問題点に鑑み、ピント振動映像に対し、簡単にボケ補正画像処理を行うことができるようにすることを目的とする。
However, according to Patent Document 1, it is necessary to prepare a focused image and a blurred image of the same subject in advance in order to calculate a smart focus function for blur correction. In addition, when the correction target is an image, all the target frames must be specified, and there is a problem that it takes time and effort for the user.
SUMMARY OF THE INVENTION In view of the above-described problems, an object of the present invention is to make it possible to easily perform blur correction image processing on a focused vibration image.

本発明の画像処理装置は、入力された映像を選択して表示装置に表示する表示手段と、前記表示装置に表示された映像からピントが合っているフレームを基準フレーム画像として指定する基準フレームの指定手段と、前記基準フレーム画像から、ピントが振動しているボケているフレーム期間を検出するボケ期間検出手段と、前記ボケ期間検出手段で検出した、ボケている映像期間に対し、前記基準フレーム画像を基に前記ボケ期間の各フレームのボケ特性を算出するボケ特性算出手段と、前記ボケ特性算出手段で算出された各フレームのボケ特性を基に、各フレームのボケ補正を行うボケ補正処理手段とを備えることを特徴とする。   An image processing apparatus according to the present invention includes a display unit that selects an input video and displays the selected video on a display device, and a reference frame that designates a frame that is in focus from the video displayed on the display device as a reference frame image. A reference means, a blur period detecting means for detecting a blurred frame period in which the focus is oscillating from the reference frame image; and the reference frame for the blurred video period detected by the blur period detecting means. A blur characteristic calculation unit that calculates a blur characteristic of each frame in the blur period based on an image, and a blur correction process that performs blur correction of each frame based on the blur characteristic of each frame calculated by the blur characteristic calculation unit Means.

本発明によれば、ピントを合わすためのフォーカスサポート機能があっても取り除くことが出来ないピントが振動している映像を、ボケ補正することにより、編集などの素材映像に用いることが可能となる効果を奏する。
また本発明は、マニュアルフォーカス時だけでなくオートフォーカス時において発生するピント振動映像への適用も可能である。オートフォーカスには超音波や赤外線を用いてオートフォーカスを行うアクティブ方式や、撮像画像のコントラストや位相差に基づいてオートフォーカスを行うパッシブ方式が存在する。被写体との位置関係や明るさ等の影響によりオートフォーカスが不安定となりピントが振動するような映像となる場合があるが、このような課題に対しても本発明は適用できる。
According to the present invention, it is possible to use an image in which a focus is vibrated that cannot be removed even if there is a focus support function for focusing, by using the material image such as editing by correcting the blur. There is an effect.
Further, the present invention can be applied not only to manual focus but also to a focus vibration image generated during auto focus. There are an active method for performing autofocus using ultrasonic waves or infrared rays, and a passive method for performing autofocus based on the contrast or phase difference of a captured image. There are cases where the image is such that the autofocus becomes unstable and the focus vibrates due to the influence of the positional relationship with the subject, brightness, etc. The present invention can also be applied to such a problem.

本発明の第1の実施形態の画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus of the 1st Embodiment of this invention. 映像編集を行うユーザーインターフェースの一例を示す図である。It is a figure which shows an example of the user interface which performs video editing. 第1の実施形態の全体処理を示すフローチャートである。It is a flowchart which shows the whole process of 1st Embodiment. 第1の実施形態のピント領域指定処理を示すフローチャートである。It is a flowchart which shows the focus area | region designation | designated process of 1st Embodiment. ピント領域の修正を行う際に領域を指定する様子を説明する模式図である。It is a schematic diagram explaining a mode that an area | region is designated when correcting a focus area | region. 第1の実施形態のボケ期間検出処理の一例を示すフローチャートである。It is a flowchart which shows an example of the blur period detection process of 1st Embodiment. 第1の実施形態の類似度算出処理を示すフローチャートである。It is a flowchart which shows the similarity calculation process of 1st Embodiment. 類似度算出処理における有効周波数領域、直線近似の関係を示す図である。It is a figure which shows the relationship of the effective frequency area | region and linear approximation in a similarity calculation process. ボケ期間におけるボケ特性算出処理を示すフローチャートである。It is a flowchart which shows the blur characteristic calculation process in a blur period. ボケ期間におけるボケ補正処理を示すフローチャートである。It is a flowchart which shows the blurring correction process in a blurring period. ピントが振動する様子を説明する図である。It is a figure explaining a mode that a focus vibrates. ピントが振動している期間に行うボケ補正の様子を説明する図である。It is a figure explaining the mode of the blur correction performed during the period when the focus is vibrating.

(第1の実施形態)
以下、本発明の第1の実施形態による画像処理装置について図面を参照して説明する。
本発明はピントが振動している映像を編集アプリケーションによりボケ補正を行うものである。編集アプリケーションを動作させる画像処理装置システムの全体構成について、図1の構成図を用いて説明する。
(First embodiment)
An image processing apparatus according to a first embodiment of the present invention will be described below with reference to the drawings.
The present invention performs blur correction on an image in which the focus is vibrating by an editing application. The overall configuration of an image processing apparatus system that operates an editing application will be described with reference to the configuration diagram of FIG.

ボケ画像を補正する画像処理装置101は、映像を入出力する外部記録インターフェース(I/F)102、ユーザーの制御を指定するユーザーインターフェース(I/F)103を備えている。また、ネットワークに接続するためのネットワークインターフェースカード(NIC)104、ディスプレイに画像を表示する表示インターフェース(I/F)105を備えている。また更に、プログラムの演算・制御処理を行うCPU106、実行するプログラムや各種データを格納するROM107、映像データや実行プログラムを展開するRAM108を備えている。   An image processing apparatus 101 that corrects a blurred image includes an external recording interface (I / F) 102 that inputs and outputs video, and a user interface (I / F) 103 that specifies user control. In addition, a network interface card (NIC) 104 for connecting to a network and a display interface (I / F) 105 for displaying an image on a display are provided. Furthermore, a CPU 106 that performs program calculation / control processing, a ROM 107 that stores programs to be executed and various data, and a RAM 108 that develops video data and execution programs are provided.

以下では、ボケ補正するために用いる編集アプリケーションのユーザーインターフェースの例について、図2を用いて説明する。
映像編集ウィンドウ201は、映像編集アプリケーションの全体を表す。複数の映像から編集する映像を選択する映像選択画面202、編集映像のフレームを表示するプレビュー画面203を備えている。また、時間軸に映像、音声などを配置したタイムライン編集画面204、タイムライン上から編集対象フレームを選択する編集対象フレーム設定部205を備えている。
Hereinafter, an example of a user interface of an editing application used for blur correction will be described with reference to FIG.
The video editing window 201 represents the entire video editing application. A video selection screen 202 for selecting a video to be edited from a plurality of videos and a preview screen 203 for displaying a frame of the edited video are provided. In addition, a timeline editing screen 204 in which video, audio, and the like are arranged on the time axis, and an editing target frame setting unit 205 that selects an editing target frame from the timeline are provided.

以下では、図3のフローチャートを用いて、編集アプリケーションにおいてピントが振動している映像に対しボケ補正を行う部分のアルゴリズムを説明する。ここでは、各ステップの概略を説明し、詳細処理についてはS301を除いて後述で説明する。   In the following, an algorithm of a part for performing blur correction on an image whose focus is oscillating in an editing application will be described using the flowchart of FIG. Here, an outline of each step will be described, and detailed processing will be described later except for S301.

処理が開始されると、入力映像を選択し、ディスプレイ(表示装置)に表示する(S301)。
次に、ピントの合っている基準フレームをユーザーが選択するのを待機する(S302)。
次に、選択された基準フレーム画像に対し、周波数解析処理を行い、ピントの合っている被写体領域を抽出する(S303)。
周波数解析の結果、抽出されたピント被写体領域を画面上に表示する。ユーザーの意図と異なっている場合はピント領域を指定する仕組みを有する(S304)。
When the process is started, the input video is selected and displayed on the display (display device) (S301).
Next, it waits for the user to select a reference frame that is in focus (S302).
Next, frequency analysis processing is performed on the selected reference frame image to extract a focused subject area (S303).
As a result of the frequency analysis, the extracted focus subject area is displayed on the screen. If it is different from the user's intention, a mechanism for designating a focus area is provided (S304).

S302で選択された基準フレームの周波数成分と各フレームの周波数成分とから類似度を算出し、ピントが振動してボケているフレーム期間を検出するピント振動期間を算出する(S305)。
次に、ピント振動期間の各フレームに対し、ボケのPSF関数を算出する(S306)。
次に、各フレームに対し、PSF関数に基づいてボケ補正処理を行う(S307)。
次に、修正した映像を外部記録インターフェース102から記録媒体に記録する(S308)。
A similarity is calculated from the frequency component of the reference frame selected in S302 and the frequency component of each frame, and a focus vibration period for detecting a frame period in which the focus is vibrated and blurred is calculated (S305).
Next, a blur PSF function is calculated for each frame in the focus vibration period (S306).
Next, blur correction processing is performed on each frame based on the PSF function (S307).
Next, the corrected video is recorded on the recording medium from the external recording interface 102 (S308).

以下では、S302における基準フレーム指定方法について、図2を用いて説明する。
ボケ補正したい映像を映像選択画面202で選択し、タイムライン編集画面204に配置された映像に対し、編集対象フレーム設定部205において、ピントの合っているフレームを検索する。検索方法はタイムライン編集画面204において、マウスなどのポインティングデバイスを操作することにより、編集対象フレーム設定部205でプレビュー画面203に表示されるフレームを変更する。プレビュー画面203で表示される画像を確認しながら、ピントの合っているフレームを確認する。この際、フレームを時間軸で過去、未来と動かしながら、最もピントが合っているフレームを選択する。選択したフレームを基準フレームとする。
Hereinafter, the reference frame designation method in S302 will be described with reference to FIG.
A video to be corrected for blurring is selected on the video selection screen 202, and a frame in focus is searched for in the editing target frame setting unit 205 for the video arranged on the timeline editing screen 204. In the search method, the frame displayed on the preview screen 203 is changed by the editing target frame setting unit 205 by operating a pointing device such as a mouse on the timeline editing screen 204. While checking the image displayed on the preview screen 203, the frame in focus is checked. At this time, the most focused frame is selected while moving the frame from the past to the future on the time axis. The selected frame is set as a reference frame.

以下では、S303における基準フレームの被写体領域抽出について図4のフローチャートを用いて説明する。
S302で指定した基準フレーム画像全体に指定したフレームの画像に二次微分フィルターを施し、二次微分画像を取得する処理を行う(S401)。
次に、所定のしきい値を用いて二次微分画像を2値化し、2値画像を生成する2値画像生成処理を行う(S402)。
Hereinafter, the extraction of the subject area of the reference frame in S303 will be described with reference to the flowchart of FIG.
A process of obtaining a secondary differential image by applying a secondary differential filter to the image of the specified frame on the entire reference frame image specified in S302 (S401).
Next, the binary differential image is binarized using a predetermined threshold value, and a binary image generation process for generating a binary image is performed (S402).

2値化画像からさらに所定面積以下の孤立点を除去し、エッジ画像を生成するエッジ画像生成処理を行う(S403)。
次に、総てのエッジに外接する方形領域を求め、ピント領域と推定するピント領域推定処理を行う(S404)。
An isolated point having a predetermined area or less is further removed from the binarized image, and edge image generation processing for generating an edge image is performed (S403).
Next, a rectangular region circumscribing all the edges is obtained, and a focus region estimation process for estimating a focus region is performed (S404).

以下では、S304における被写体領域の表示について図5を用いて説明する。S303で求めたピントの合っている被写体領域501を、図2のプレビュー画面203に表示する。
図5(a)の太い線で囲まれたピント推定領域503のように、ピント領域が分かりやすくなるよう、明示的に領域を線で囲む処理を行う。
また、図5(b)のピント推定量領域504のように囲まれた領域に対して色を付けて明示的にピント領域の表示処理を行い、確認する。
Hereinafter, the display of the subject area in S304 will be described with reference to FIG. The in-focus subject area 501 obtained in S303 is displayed on the preview screen 203 in FIG.
As in the focus estimation area 503 surrounded by a thick line in FIG. 5A, a process of explicitly surrounding the area with a line is performed so that the focus area can be easily understood.
Also, the focus area is explicitly displayed by adding a color to the enclosed area, such as the focus estimation amount area 504 in FIG.

一方、図5の(c)のように、検出されたピント推定領域503がユーザーの意図と異なり、被写体502の領域506がユーザーの所望する領域である場合は、マウスなどのユーザーインターフェースでユーザーが所望する領域を指定する機能を有する。指定方法としては、ポインティングカーソル507で設定したいピント領域をペンの様なツールで囲み方形に領域を設定する方法や、予め囲まれた方形の領域を呼び出し、囲む方法などが挙げられる。   On the other hand, as shown in FIG. 5C, when the detected focus estimation area 503 is different from the user's intention and the area 506 of the subject 502 is an area desired by the user, the user can use a user interface such as a mouse. It has a function of designating a desired area. Examples of the designation method include a method in which a focus area desired to be set with the pointing cursor 507 is enclosed with a pen-like tool, a square is set, and a square area enclosed in advance is called and enclosed.

以下では、S305におけるボケ期間検出処理について、図6のフローチャートを用いて説明する。
S304で得られた基準フレームのピント領域を取得する(S601)。
次に、検索対象フレームを基準フレームの前のフレームに変更し、初期化する(S602)。
次に、検索対象フレームを過去へ1フレーム移動する(S603)。
次に、検索対象フレームに対し、基準フレームとの位置合わせ処理を行う(S604)。位置合わせ処理に関しては、位相限定相関法を用いた処理を用いてもよい。基準フレームの二次元フーリエ変換をI1とし、検索対象フレームの二次元フーリエ変換をI2とすると、位相限定相関は、以下の(1式)を逆フーリエ変換することで算出される。
Hereinafter, the blur period detection process in S305 will be described with reference to the flowchart of FIG.
The focus area of the reference frame obtained in S304 is acquired (S601).
Next, the search target frame is changed to a frame before the reference frame and initialized (S602).
Next, the search target frame is moved to the past by one frame (S603).
Next, alignment processing with the reference frame is performed on the search target frame (S604). Regarding the alignment process, a process using the phase only correlation method may be used. When the two-dimensional Fourier transform of the reference frame is I 1 and the two-dimensional Fourier transform of the search target frame is I 2 , the phase-only correlation is calculated by inverse Fourier transform of the following (1).

Figure 2012169772
Figure 2012169772

この結果、相関ピーク座標からシフト量が求まる。位置合わせ処理は他の処理でもよく、処理方法を限定するものではない。   As a result, the shift amount is obtained from the correlation peak coordinates. The alignment process may be another process and does not limit the processing method.

次に、位置合わせ後のフレームからピント領域を取得する(S605)。
次に、検索対象フレームと基準フレームのピント領域から類似度の算出を行う(S606)。算出処理の詳細は後述する。
次に、S606で算出した類似度が、ある所定値より大きいか否かを判定する(S607)。大きい場合は、類似度が高いとし、所定値以下の場合は類似度が低いとする。類似度が低い場合にはS608に移行し、フレーム移動量を判断する。高い場合はS610に移行する。
Next, a focus area is acquired from the frame after alignment (S605).
Next, the similarity is calculated from the focus area of the search target frame and the reference frame (S606). Details of the calculation process will be described later.
Next, it is determined whether the similarity calculated in S606 is greater than a predetermined value (S607). If it is large, the similarity is high, and if it is below a predetermined value, the similarity is low. If the similarity is low, the process proceeds to S608, and the frame movement amount is determined. If it is higher, the process proceeds to S610.

次に、フレーム移動量を判断する。検索するピント振動期間(ボケ期間)がある所定値以上である場合、今回想定しているピント振動区間の検出ではなく全体にボケている場合や、意図的に長くぼやかしている区間に対して処理を行ってしまう。また、映像フレームの先端や終端に辿り着いた場合も閾値以上と判断する(S608)。閾値以下となる場合にはS603に移行し、閾値より大きい場合は、類似度判定の閾値の再設定を行う(S609)。   Next, the frame movement amount is determined. If the focus vibration period (blurring period) to be searched is greater than or equal to a predetermined value, this is not the detection of the focus vibration section that is assumed this time, but the entire section is blurred, or the section is intentionally blurred for a long time Will go. Also, when reaching the leading edge or the ending edge of the video frame, it is determined that the threshold is equal to or greater than the threshold (S608). If it is less than or equal to the threshold, the process proceeds to S603, and if it is greater than the threshold, the similarity determination threshold is reset (S609).

その後、S602に移行し、検索対象フレームの初期化を行う。また、再設定を行う際には、自動的に再設定処理を行うだけでなく、表示画面上に「再設定を行う」ことを警告し、ユーザーに再設定処理を行っていることを認知させてもよい。   Thereafter, the process proceeds to S602, where the search target frame is initialized. In addition, when resetting, not only the resetting process is automatically performed, but also a warning is displayed on the display screen indicating that the resetting process is being performed, and the user is made aware that the resetting process is being performed. May be.

一方、類似度判定の閾値を再設定ではなく、基準フレームからのピント振動している映像区間が無い場合となるため、基準フレームを再選択してもよい。この場合も表示画面上に「ピント振動区間が見つからない」旨の警告を出し、基準フレームの再選択を促す表示を行い、図3のフローチャートのS302に移行し、再処理を行う。
S610においては、基準フレームと類似度の高いフレームからピント振動期間を算出し、算出したピント振動期間のフレーム数、ピント振動期間が終了となるフレームを記憶する。
On the other hand, the threshold value for similarity determination is not reset, and there is no video section that is in focus vibration from the reference frame, so the reference frame may be reselected. Also in this case, a warning that “the focus vibration section cannot be found” is issued on the display screen, a display prompting the user to reselect the reference frame is displayed, and the process proceeds to S302 in the flowchart of FIG. 3 to perform reprocessing.
In step S610, the focus vibration period is calculated from a frame having a high degree of similarity to the reference frame, and the calculated number of frames in the focus vibration period and the frame in which the focus vibration period ends are stored.

以下では、S606における類似度の算出について、図7のフローチャートを用いて説明する。
基準フレームのピント領域と検索対象フレームにおける対応する領域に対し、窓関数を乗ずる(S701)。窓関数はハミング窓関数を用いるが、これに限定されるものではない。窓関数を乗じた画像にフーリエ変換を施し、周波数成分を取得する(S702)。
Hereinafter, the calculation of the similarity in S606 will be described with reference to the flowchart of FIG.
The window function is multiplied by the focus area of the reference frame and the corresponding area in the search target frame (S701). The window function uses a Hamming window function, but is not limited to this. Fourier transform is performed on the image multiplied by the window function to obtain a frequency component (S702).

周波数成分を1次元データに変換する(S703)。変換方法は円周方向の周波数毎に周波数成分を積算する。周波数成分の円周方向の成分を積算してもよく、あるいは垂直成分や水平成分を積算してもよい。
基準フレームのピント領域から類似度算出に使用するための有効周波数領域を算出する(S704)。基準フレームのピント領域をフーリエ変換して絶対値をとり、周波数振幅成分が所定のしきい値となる領域を有効周波数領域とする。
The frequency component is converted into one-dimensional data (S703). The conversion method integrates frequency components for each circumferential frequency. The frequency component in the circumferential direction may be integrated, or the vertical component and the horizontal component may be integrated.
An effective frequency region to be used for similarity calculation is calculated from the focus region of the reference frame (S704). The focus area of the reference frame is Fourier-transformed to obtain an absolute value, and an area where the frequency amplitude component becomes a predetermined threshold is set as an effective frequency area.

検索対象フレームの周波数成分の1次元データと基準フレームの周波数成分の1次元データで除し、ボケ周波数情報を取得する(S705)。
ボケ周波数情報と有効周波数領域とをPSF算出用情報として記憶する(S706)。ここで、PSFは点像分布関数(point spread function)であり、ボケ特性をデータとして表す方法として用いる。
有効周波数領域内のボケ周波数情報を用い、所定区間を直線に近似し、近似した直線の傾きを類似度情報とする(S707)。所定区間は、有効周波数領域における相対位置から定める。
By dividing the one-dimensional data of the frequency component of the search target frame by the one-dimensional data of the frequency component of the reference frame, blur frequency information is acquired (S705).
The blur frequency information and the effective frequency region are stored as PSF calculation information (S706). Here, PSF is a point spread function, which is used as a method of expressing blur characteristics as data.
Using the blur frequency information in the effective frequency region, a predetermined section is approximated to a straight line, and the slope of the approximated straight line is set as similarity information (S707). The predetermined section is determined from the relative position in the effective frequency region.

図8(a)に、画像の周波数成分の1次元データ、有効周波数領域を示す。また、図8(b)に、ボケ周波数情報、直線近似区間の関係を模式図として示す。   FIG. 8A shows the one-dimensional data of the frequency components of the image and the effective frequency region. FIG. 8B is a schematic diagram showing the relationship between the blur frequency information and the straight line approximation section.

以下では、S306におけるボケ関数算出処理(ボケ特性算出処理)について、図9のフローチャートを用いて説明する。ボケ特性算出処理においては、ピント振動期間のフレーム数を上限とし、上限まで繰り返し処理を行う。
まず、検索対象フレームの初期化を行う(S901)。
次に、対象フレームのPSF算出用情報を取得する(S902)。
次に、有効周波数領域において、ボケ周波数情報を近似するガウス関数を求める(S903)。
Hereinafter, the blur function calculation process (blur characteristic calculation process) in S306 will be described with reference to the flowchart of FIG. In the blur characteristic calculation process, the number of frames in the focus vibration period is set as the upper limit, and the process is repeated up to the upper limit.
First, the search target frame is initialized (S901).
Next, PSF calculation information of the target frame is acquired (S902).
Next, a Gaussian function approximating the blur frequency information is obtained in the effective frequency region (S903).

次に、近似したガウス関数に逆フーリエ変換をかけ、算出された係数をPSFとする(S904)。
次に、算出されたPSFを記憶し、対象フレームを次フレームへ更新する(S905)。
次に、更新されたフレームが補正期間のフレーム数を超えるかを判別する(S906)。超えない場合はS902へ移行し、超えた場合はボケ特性算出処理を終了する。
Next, inverse Fourier transform is applied to the approximated Gaussian function, and the calculated coefficient is set as PSF (S904).
Next, the calculated PSF is stored, and the target frame is updated to the next frame (S905).
Next, it is determined whether the updated frame exceeds the number of frames in the correction period (S906). When it does not exceed, the process proceeds to S902, and when it exceeds, the blur characteristic calculation process ends.

次に、S307におけるボケ補正処理を説明する。本実施形態では、MAP推定法に基づいてボケ補正処理を行う。(2式)は、MAP推定法において最小化すべき評価関数である。   Next, the blur correction process in S307 will be described. In the present embodiment, blur correction processing is performed based on the MAP estimation method. (Equation 2) is an evaluation function to be minimized in the MAP estimation method.

Figure 2012169772
Figure 2012169772

ここで、xは補正画像を、yはフレーム画像を1次元表現で表したものである。また、行列Pはボケモデルであり、PSFのコンボリューションを行列表現で表したものである。ここで、画像サイズを横W画素、縦H画素とすると、xとyはH×W行の列ベクトルであり、Pは(H×W)×(H×W)の正方行列である。   Here, x is a corrected image, and y is a one-dimensional representation of a frame image. The matrix P is a blur model, and represents the PSF convolution in matrix representation. Here, if the image size is horizontal W pixels and vertical H pixels, x and y are column vectors of H × W rows, and P is a square matrix of (H × W) × (H × W).

(2式)の右辺第一項は、補正画像xを行列Pでぼかした画像とフレーム画像yとの二乗誤差であり、条件付け確率に対応する。σはフレーム画像のノイズ量の標準偏差である。右辺第二項は画像の滑らかさの評価値であり、非エッジの事前確率に対応する。
2xm,nは画像の二次微分に相当し、以下の(3式)によって計算することができる。なお、αは係数である。
The first term on the right side of (Formula 2) is the square error between the image obtained by blurring the corrected image x with the matrix P and the frame image y, and corresponds to the conditioning probability. σ is a standard deviation of the noise amount of the frame image. The second term on the right side is an evaluation value of the smoothness of the image and corresponds to the prior probability of non-edge.
2 x m, n corresponds to the second derivative of the image and can be calculated by the following (Equation 3). Α is a coefficient.

Figure 2012169772
Figure 2012169772

以下、前述したMAP推定法を用いたボケ補正期間に対するボケ補正処理を、図10のフローチャートを用いて説明する。なお、本実施形態では評価関数最小化に最急降下法を用いる。
まず、ボケ期間の映像に対し、ボケ補正を行う対象フレームを基準フレームの一つ過去のフレームに設定し、初期化する(S1001)。
Hereinafter, the blur correction process for the blur correction period using the MAP estimation method described above will be described with reference to the flowchart of FIG. In this embodiment, the steepest descent method is used for minimizing the evaluation function.
First, a target frame to be subjected to blur correction is set to a frame that is one past of the reference frame and is initialized (S1001).

次に、対象フレームに対応するPSFを取得し、行列Pを更新する(S1002)。
次に、補正画像xを対象フレーム画像で初期設定する(S1003)。
次に、以下の(4式)及び(5式)により、画像の更新量を算出する(S1004)。
Next, the PSF corresponding to the target frame is acquired, and the matrix P is updated (S1002).
Next, the corrected image x is initialized with the target frame image (S1003).
Next, the update amount of the image is calculated by the following (formula 4) and (formula 5) (S1004).

Figure 2012169772
次に、補正画像の各画素に更新量の各画素を足す(S1005)。t回の繰り返し処理が行われた補正画像をx(t)とすると、x(t+1)とは下記の(6式)より計算される。
Figure 2012169772
Next, the update amount of each pixel is added to each pixel of the corrected image (S1005). If a corrected image that has been subjected to t iterations is x (t) , x (t + 1) is calculated from (Equation 6) below.

Figure 2012169772
Figure 2012169772

ここで、εは更新の幅であり、値が大きいと収束に早く近づくが、大き過ぎると誤差が大きくなったり、発散したりする。
次に、処理回数が所定値以上かを判定し(S1006)、判定が真であればS1007に移行し、偽であればS1004に移行して補正画像の修正処理を続行する。
Here, ε is the width of the update. If the value is large, the convergence approaches quickly, but if it is too large, the error becomes large or diverges.
Next, it is determined whether the number of processing times is equal to or greater than a predetermined value (S1006). If the determination is true, the process proceeds to S1007, and if it is false, the process proceeds to S1004 to continue the correction image correction process.

処理回数が所定値以上の場合、ボケ補正を施したフレームを記憶する(S1007)。次に、補正対象フレームを次のフレームへ移動させる(S1008)。
次に、移動させたボケ補正対象フレームがボケ補正期間の処理フレームを超えているかを判定する(S1009)。処理フレーム数を超えていない場合はS1002に移行し、繰り返し処理を行う。一方、処理フレーム数を超えている場合は、ボケ補正処理を終了する。
If the number of processing times is equal to or greater than the predetermined value, the frame subjected to blur correction is stored (S1007). Next, the correction target frame is moved to the next frame (S1008).
Next, it is determined whether or not the moved blur correction target frame exceeds the processing frame for the blur correction period (S1009). If the number of processing frames has not been exceeded, the process moves to S1002 to perform repeated processing. On the other hand, if the number of processing frames is exceeded, the blur correction process is terminated.

本実施形態のボケ補正処理は、MAP推定法を用いた処理の例であるが、これに限定するものではなく、PSFに基づく逆フィルターやウィナーフィルターなどその他の手法を用いてもよい。   The blur correction process of the present embodiment is an example of a process using the MAP estimation method, but is not limited to this, and other methods such as an inverse filter or a Wiener filter based on PSF may be used.

また、ボケ特性の算出処理とボケ補正処理をそれぞれの処理ブロック毎に切り分けて記載したが、フレーム毎に順次処理を行ってもよい。また、本実施形態では、コンピュータ上で動作するアプリケーションの様な実施形態を説明したが、デジタルスチルカメラやビデオカメラの様な撮影機器内に実装されても動作する形態であっても構わない。   Further, although the blur characteristic calculation process and the blur correction process are described separately for each processing block, the process may be sequentially performed for each frame. Further, in the present embodiment, an embodiment such as an application that operates on a computer has been described. However, the present invention may be implemented even when mounted in a photographing device such as a digital still camera or a video camera.

また、本実施形態では、ピント振動期間の指定について、始点となる基準フレームを設定し、終点を自動で求めている。しかし、ユーザーが終点となるフレームの指定を行ってもよい。また、本実施形態では、ピント振動期間を補正する映像に関して、外部の記録媒体を用いる記載となっているが、入力映像・出力映像のどちらか、もしくは両方がネットワーク経由であっても構わない。   Further, in the present embodiment, for the designation of the focus vibration period, a reference frame as a starting point is set and the end point is automatically obtained. However, the user may designate a frame as the end point. In the present embodiment, an external recording medium is used for the video for correcting the focus vibration period. However, either or both of the input video and the output video may be via a network.

以上、説明したように、本発明によれば、図11のように撮影時に被写体へフォーカスを合わせる際に、ピントが振動してしまった映像に対して、ピントが合っているフレームを指定することにより、ボケている映像期間を自動で検出する。そして、ピントが振動しているボケ期間に対し、フレーム毎のボケ特性を算出し、図12のように、その特性を利用してボケ補正を行い、修正した映像を出力することができる。   As described above, according to the present invention, when focusing on a subject at the time of shooting as shown in FIG. 11, a frame in focus is designated for an image whose focus has vibrated. Thus, the blurred video period is automatically detected. Then, a blur characteristic for each frame is calculated for the blur period in which the focus is oscillating, and blur correction is performed using the characteristic as shown in FIG. 12, and a corrected video can be output.

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(コンピュータプログラム)を、ネットワーク又は各種のコンピュータ読み取り可能な記憶媒体を介してシステム或いは装置に供給する。そして、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention can also be realized by executing the following processing. That is, software (computer program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various computer-readable storage media. Then, the computer (or CPU, MPU, etc.) of the system or apparatus reads out and executes the program.

101 画像処理装置、102 外部記録インターフェース、103 ユーザーインターフェース、104 ネットワークインターフェースカード、105 表示インターフェース、106 CPU、107 ROM、108 RAM DESCRIPTION OF SYMBOLS 101 Image processing apparatus 102 External recording interface 103 User interface 104 Network interface card 105 Display interface 106 CPU, 107 ROM, 108 RAM

Claims (7)

入力された映像を選択して表示装置に表示する表示手段と、
前記表示装置に表示された映像からピントが合っているフレームを基準フレーム画像として指定する基準フレーム指定手段と、
前記基準フレーム画像から、ピントが振動しているフレーム期間をボケ期間として検出するボケ期間検出手段と、
前記ボケ期間検出手段で検出した、ボケているフレーム期間に対し、前記基準フレーム画像を基に前記ボケ期間の各フレームのボケ特性を算出するボケ特性算出手段と、
前記ボケ特性算出手段で算出された各フレームのボケ特性を基に、各フレームのボケ補正を行うボケ補正処理手段と
を備えることを特徴とする画像処理装置。
Display means for selecting and displaying the input video on a display device;
Reference frame designating means for designating a frame in focus from the video displayed on the display device as a reference frame image;
A blur period detecting means for detecting a frame period in which the focus is vibrating from the reference frame image as a blur period;
A blur characteristic calculation unit that calculates a blur characteristic of each frame in the blur period based on the reference frame image with respect to a blurred frame period detected by the blur period detection unit;
An image processing apparatus comprising: a blur correction processing unit that performs blur correction of each frame based on the blur characteristic of each frame calculated by the blur characteristic calculation unit.
前記基準フレームのピント領域を推定するピント領域推定手段を有し、
前記ピント領域推定手段は、前記基準フレームのピント領域を明示的に表示し、ユーザーにピント推定の領域を表示することを特徴とする請求項1に記載の画像処理装置。
A focus area estimation means for estimating a focus area of the reference frame;
The image processing apparatus according to claim 1, wherein the focus area estimation unit explicitly displays a focus area of the reference frame and displays a focus estimation area to a user.
前記ピント領域推定手段は、ユーザーによって推定領域を変更する変更手段を有することを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the focus area estimation unit includes a changing unit that changes the estimation area by a user. 基準フレーム画像を指定するとともに、ピント振動期間が終了となるフレームを記憶媒体に記憶する記憶手段を有することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, further comprising a storage unit that specifies a reference frame image and stores a frame in which the focus vibration period ends in a storage medium. 入力された映像を選択して表示装置に表示する表示工程と、
前記表示装置に表示された映像からピントが合っているフレームを基準フレーム画像として指定する基準フレーム指定工程と、
前記基準フレーム画像から、ピントが振動しているフレーム期間をボケ期間として検出するボケ期間検出工程と、
前記ボケ期間検出工程で検出した、ボケているフレーム期間に対し、前記基準フレーム画像を基に前記ボケ期間の各フレームのボケ特性を算出するボケ特性算出工程と、
前記ボケ特性算出工程で算出された各フレームのボケ特性を基に、各フレームのボケ補正を行うボケ補正処理工程と
を備えることを特徴とする画像処理方法。
A display process of selecting the input video and displaying it on the display device;
A reference frame designating step for designating a frame in focus from the video displayed on the display device as a reference frame image;
From the reference frame image, a blur period detection step of detecting a frame period in which the focus is vibrating as a blur period;
A blur characteristic calculating step of calculating a blur characteristic of each frame in the blur period based on the reference frame image with respect to the blurred frame period detected in the blur period detecting step;
An image processing method comprising: a blur correction process step of performing blur correction of each frame based on the blur characteristic of each frame calculated in the blur characteristic calculation step.
入力された映像を選択して表示装置に表示する表示工程と、
前記表示装置に表示された映像からピントが合っているフレームを基準フレーム画像として指定する基準フレーム指定工程と、
前記基準フレーム画像から、ピントが振動しているフレーム期間をボケ期間として検出するボケ期間検出工程と、
前記ボケ期間検出工程で検出した、ボケているフレーム期間に対し、前記基準フレーム画像を基に前記ボケ期間の各フレームのボケ特性を算出するボケ特性算出工程と、
前記ボケ特性算出工程で算出された各フレームのボケ特性を基に、各フレームのボケ補正を行うボケ補正処理工程とをコンピュータに実行させることを特徴とするプログラム。
A display process of selecting the input video and displaying it on the display device;
A reference frame designating step for designating a frame in focus from the video displayed on the display device as a reference frame image;
From the reference frame image, a blur period detection step of detecting a frame period in which the focus is vibrating as a blur period;
A blur characteristic calculating step of calculating a blur characteristic of each frame in the blur period based on the reference frame image with respect to the blurred frame period detected in the blur period detecting step;
A program causing a computer to execute a blur correction processing step of performing blur correction of each frame based on the blur characteristic of each frame calculated in the blur characteristic calculation step.
請求項6に記載のプログラムを記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 6.
JP2011027630A 2011-02-10 2011-02-10 Image processing device, and image processing method Withdrawn JP2012169772A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011027630A JP2012169772A (en) 2011-02-10 2011-02-10 Image processing device, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011027630A JP2012169772A (en) 2011-02-10 2011-02-10 Image processing device, and image processing method

Publications (1)

Publication Number Publication Date
JP2012169772A true JP2012169772A (en) 2012-09-06

Family

ID=46973506

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011027630A Withdrawn JP2012169772A (en) 2011-02-10 2011-02-10 Image processing device, and image processing method

Country Status (1)

Country Link
JP (1) JP2012169772A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115996322A (en) * 2023-03-21 2023-04-21 深圳市安科讯实业有限公司 Image data management method for digital video shooting

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115996322A (en) * 2023-03-21 2023-04-21 深圳市安科讯实业有限公司 Image data management method for digital video shooting

Similar Documents

Publication Publication Date Title
KR102480245B1 (en) Automated generation of panning shots
US10187546B2 (en) Method and device for correcting document image captured by image pick-up device
US8754963B2 (en) Processing images having different focus
JP5825172B2 (en) Image determination apparatus, image determination method, and computer program for image determination
JP5699432B2 (en) Image processing device
KR20130018330A (en) Imaging apparatus, image processing method, and recording medium for recording program thereon
EP3093822B1 (en) Displaying a target object imaged in a moving picture
JP2013005258A (en) Blur correction apparatus, blur correction method, and business form
KR20150126768A (en) Method for composing image and electronic device thereof
JP2009047497A (en) Stereoscopic imaging device, control method of stereoscopic imaging device, and program
JP2011193443A (en) Target tracking device
JP4958806B2 (en) Blur detection device, blur correction device, and imaging device
JP2009047498A (en) Stereoscopic imaging device, control method of stereoscopic imaging device, and program
JP2009047496A (en) Stereoscopic imaging device, control method of stereoscopic imaging device, and program
JP2009047495A (en) Stereoscopic imaging device, control method of stereoscopic imaging device, and program
Lee et al. Fast-rolling shutter compensation based on piecewise quadratic approximation of a camera trajectory
JP2019067169A (en) Moving vector calculation method, device, program, and moving vector calculation method including noise cancellation processing
JP6579816B2 (en) Image processing apparatus, image processing method, and program
JP2015207090A (en) Image processor, and control method thereof
JP7129201B2 (en) IMAGE PROCESSING DEVICE, IMAGING DEVICE, IMAGE PROCESSING METHOD, AND PROGRAM
JP2012169772A (en) Image processing device, and image processing method
JP2009118434A (en) Blurring correction device and imaging apparatus
Zhen et al. Multi-image motion deblurring aided by inertial sensors
CN110692235B (en) Image processing apparatus, image processing program, and image processing method
JP2009042900A (en) Imaging device and image selection device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140513