JP2009237657A - Image determination device, method, and program - Google Patents
Image determination device, method, and program Download PDFInfo
- Publication number
- JP2009237657A JP2009237657A JP2008079659A JP2008079659A JP2009237657A JP 2009237657 A JP2009237657 A JP 2009237657A JP 2008079659 A JP2008079659 A JP 2008079659A JP 2008079659 A JP2008079659 A JP 2008079659A JP 2009237657 A JP2009237657 A JP 2009237657A
- Authority
- JP
- Japan
- Prior art keywords
- image
- frequency
- unit
- camera shake
- determination
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、画像データに基づく画像の特性を判定する画像判定技術に関し、特に、画像データに基づく写真画像が手ブレによってぼやけているか否か、すなわち「手ブレ」していないか否かの判定(以下、「手ブレ判定」とも呼ぶ)を実施する技術に関する。 The present invention relates to an image determination technique for determining the characteristics of an image based on image data, and in particular, whether or not a photographic image based on image data is blurred due to camera shake, that is, whether or not it is “camera shake”. (Hereinafter, also referred to as “camera shake determination”).
手ブレした画像(以下、「手ブレ画像」とも呼ぶ)は、手ブレしていない正常な画像に比べて、印刷や編集などの二次的な利用に供される可能性が低いため、写真画像が記録された複数の画像データの中から正常な画像と手ブレ画像とを区別するために種々の手ブレ判定技術が提案されてきた。例えば、下記特許文献1には、画像から分離して抽出された高周波成分と低周波成分との成分比に基づいて、手ブレやピンぼけ等でぼやけた不良画像であるか否かを判定する画像品質判定技術が開示されている。 Pictures that have been shaken (hereinafter also referred to as “blurred images”) are less likely to be used for secondary use, such as printing and editing, compared to normal images that are not shaken. Various camera shake determination techniques have been proposed in order to distinguish a normal image and a camera shake image from among a plurality of image data in which images are recorded. For example, in Patent Document 1 below, an image for determining whether or not a defective image is blurred due to camera shake or defocusing based on the component ratio between a high-frequency component and a low-frequency component extracted separately from the image. A quality judgment technique is disclosed.
しかしながら、従来の画像品質判定技術では、接写(マクロ)モードで撮影された画像や、比較的に小さなF値で撮影された画像は、焦点の合った部分が少なく相対的に高周波成分も少ないため、正常な画像であっても不良画像であると誤判定してしまう場合があるという問題があった。 However, in the conventional image quality determination technique, an image photographed in the close-up (macro) mode or an image photographed with a relatively small F value has few in-focus portions and relatively few high-frequency components. There is a problem that even a normal image may be erroneously determined to be a defective image.
本発明は、上記した課題を踏まえ、画像品質判定における誤判定を抑制することが可能な技術を提供することを目的とする。 In view of the above-described problems, an object of the present invention is to provide a technique capable of suppressing erroneous determination in image quality determination.
本発明は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の形態または適用例として実現することが可能である。 SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented as the following forms or application examples.
[適用例1] 適用例1の画像判定装置は、画像データに基づく画像が手ブレによってぼやけているか否かを判定する画像判定装置であって、前記画像におけるエッジ量が基準値よりも多いエッジ領域を特定するエッジ領域特定部と、前記エッジ領域特定部によって特定されたエッジ領域における空間領域の画像を周波数領域で表したパワースペクトルを生成する周波数変換部と、前記周波数変換部によって生成されたパワースペクトルにおける振幅値の第二主成分方向を特定する手ブレ方向推定部と、前記パワースペクトルにおいて前記第二主成分方向に略沿った領域における振幅値を周波数軸上に一次元化した一次元振幅データを生成する一次元化部と、前記一次元化部によって生成された一次元振幅データを周波数に応じて重み付けする重み付け部と、前記重み付け部によって重み付けされた一次元振幅データにおいて振幅値が谷状に変化する領域の周波数に基づいて、前記画像が手ブレによってぼやけているか否かを判定する判定部とを備えることを特徴とする。ここで、手や体などの直線的な移動に起因する手ブレ画像は、実空間上の被写体に対し矩形関数を畳み込んだ画像になり、周波数空間上ではシンク関数(sinc関数)を畳み込んだ画像になると考えられる。そのため、適用例1の画像判定装置によれば、周波数領域の画像において手ブレ方向に現れるシンク関数の影響の度合いに基づいて手ブレ判定を実施することができる。その結果、相対的に高周波成分の少ない画像であっても、手ブレ判定における誤判定を抑制することができる。また、エッジ領域に絞り込んで手ブレ判定を実施することができるため、手ブレ方向に現れるシンク関数の影響の度合いを評価するための処理負荷を軽減することができる。 Application Example 1 An image determination apparatus according to Application Example 1 is an image determination apparatus that determines whether an image based on image data is blurred due to camera shake, and an edge having an edge amount larger than a reference value in the image. An edge region specifying unit for specifying a region, a frequency converting unit for generating a power spectrum representing an image of a spatial region in the edge region specified by the edge region specifying unit in a frequency region, and the frequency converting unit A camera shake direction estimator for identifying the second principal component direction of the amplitude value in the power spectrum, and a one-dimensional one-dimensional representation of the amplitude value in the region substantially along the second principal component direction in the power spectrum on the frequency axis A one-dimensional unit for generating amplitude data, and the one-dimensional amplitude data generated by the one-dimensional unit are weighted according to frequency. A weighting unit; and a determination unit that determines whether the image is blurred due to camera shake based on a frequency of a region in which an amplitude value changes in a valley shape in the one-dimensional amplitude data weighted by the weighting unit. It is characterized by that. Here, a camera shake image resulting from a linear movement of a hand or body is an image obtained by convolving a rectangular function with a subject in real space, and a sink function (sinc function) is convolved in a frequency space. It will be an image. Therefore, according to the image determination device of Application Example 1, it is possible to perform the camera shake determination based on the degree of influence of the sync function that appears in the camera shake direction in the frequency domain image. As a result, erroneous determination in camera shake determination can be suppressed even for an image with relatively few high-frequency components. In addition, since the hand shake determination can be performed by narrowing down to the edge region, it is possible to reduce the processing load for evaluating the degree of influence of the sync function appearing in the hand shake direction.
[適用例2] 適用例1の画像判定装置において、前記画像データが空間領域から周波数領域に変換符号化された画像データである場合、前記エッジ領域特定部は、該画像データに基づく該変換符号化の重み係数から算出される評価値に基づいて前記エッジ領域を特定するとしても良い。適用例2の画像判定装置によれば、画像データに基づく変換符号化の重み係数を利用してエッジ量を評価することができるため、エッジ領域を特定するための処理負荷を軽減することができる。 Application Example 2 In the image determination apparatus according to Application Example 1, when the image data is image data that has been transform-encoded from a spatial domain to a frequency domain, the edge region specifying unit is configured to convert the transform code based on the image data. The edge region may be specified on the basis of an evaluation value calculated from the weighting factor. According to the image determination apparatus of Application Example 2, since the edge amount can be evaluated using the weighting coefficient of transform coding based on the image data, it is possible to reduce the processing load for specifying the edge region. .
[適用例3] 適用例1または2の画像判定装置において、前記周波数変換部は、離散フーリエ変換(Discrete Fourier Transform, DFT)および高速フーリエ変換(Fast Fourier Transform, FFT)のいずれかによって、前記画像を周波数領域で表したパワースペクトルを生成しても良い。適用例3の画像判定装置によれば、シンク関数の影響によって振幅値が谷状に変化する領域を特定するのに十分な周波数分解能を得ることができる。 [Application Example 3] In the image determination apparatus according to Application Example 1 or 2, the frequency transforming unit is configured to perform either the discrete Fourier transform (DFT) or the fast Fourier transform (FFT). May be generated in the frequency domain. According to the image determination apparatus of Application Example 3, it is possible to obtain a frequency resolution sufficient to specify a region where the amplitude value changes in a valley shape due to the influence of the sync function.
[適用例4] 適用例1ないし3のいずれかの画像判定装置において、前記重み付け部は、前記一次元化部によって生成された一次元振幅データに周波数を掛け合わせることによって、該一次元振幅データを重み付けし、前記手ブレ判定部は、前記重み付け部によって重み付けされた一次元振幅データにおいて周波数50ヘルツから575ヘルツの範囲で振幅値が最小値をとる周波数が60ヘルツから300ヘルツである場合、前記画像が手ブレによってぼやけていると判定するとしても良い。適用例4の画像判定装置によれば、手ブレ画像であると人間が認識可能な周波数領域に絞り込んで手ブレ判定を実施することによって、手ブレ判定に要する処理負荷を軽減することができる。 Application Example 4 In the image determination apparatus according to any one of Application Examples 1 to 3, the weighting unit multiplies the one-dimensional amplitude data generated by the one-dimensionalization unit by a frequency to thereby generate the one-dimensional amplitude data. When the frequency at which the amplitude value takes the minimum value in the frequency range of 50 Hz to 575 Hz in the one-dimensional amplitude data weighted by the weighting unit is 60 Hz to 300 Hz, It may be determined that the image is blurred due to camera shake. According to the image determination device of Application Example 4, the processing load required for the camera shake determination can be reduced by performing the camera shake determination by narrowing down to a frequency region that can be recognized by a human as a camera shake image.
[適用例5] 適用例1ないし4のいずれかの画像判定装置において、更に、前記エッジ領域が前記エッジ領域特定部によって特定された場合であって、前記画像が手ブレによってぼやけていないと前記手ブレ判定部によって判定された場合、前記画像の焦点が合っていると判定する合焦判定部を備えるとしても良い。適用例5の画像判定装置によれば、手ブレ画像の特定に加え、焦点(ピント)が合っている合焦画像を特定することができる。 Application Example 5 In the image determination device according to any one of Application Examples 1 to 4, the edge region is specified by the edge region specifying unit, and the image is not blurred due to camera shake. When determined by the camera shake determination unit, an in-focus determination unit that determines that the image is in focus may be provided. According to the image determination apparatus of Application Example 5, in addition to specifying a camera shake image, it is possible to specify a focused image in focus.
[適用例6] 適用例1ないし5のいずれかの画像判定装置において、更に、前記エッジ領域が前記エッジ領域特定部によって特定されなかった場合、前記画像の焦点が合っていないと判定するピンぼけ判定部を備えるとしても良い。適用例6の画像判定装置によれば、手ブレ画像の特定に加え、焦点が合っていないピンぼけ画像を特定することができる。 Application Example 6 In the image determination device according to any one of Application Examples 1 to 5, a defocus determination that determines that the image is not in focus when the edge region is not specified by the edge region specifying unit. A part may be provided. According to the image determination apparatus of the application example 6, in addition to specifying a camera shake image, an out-of-focus image that is out of focus can be specified.
また、適用例1ないし6のいずれかの画像判定装置であって、更に、前記画像データから再生される画像を印刷する印刷部と、前記画像データから再生される画像のうち前記判定部によって手ブレと判定された画像が前記印刷部によって印刷されるのを禁止する禁止部とを備えても良い。これによって、画像データから再生される画像を印刷する場合に、手ブレ画像が印刷されてしまうのを抑制することができる。 The image determination apparatus according to any one of Application Examples 1 to 6, further comprising: a printing unit that prints an image reproduced from the image data; and a determination unit that performs an operation by the determination unit among images reproduced from the image data. The image processing apparatus may further include a prohibition unit that prohibits printing of the image determined to be blurred by the printing unit. Thus, when an image reproduced from the image data is printed, it is possible to suppress a hand shake image from being printed.
また、適用例1ないし6のいずれかの画像判定装置であって、更に、前記判定部によって手ブレではないと判定された画像と、該判定部によって手ブレと判定された画像とを区別して表示する表示部を備えても良い。これによって、画像データから再生する画像を表示する場合に、手ブレであるか否かを区別して画像を表示することができる。 The image determination apparatus according to any one of Application Examples 1 to 6, further distinguishing between an image determined not to be camera shake by the determination unit and an image determined to be camera shake by the determination unit. You may provide the display part to display. As a result, when displaying an image to be reproduced from the image data, it is possible to display the image while distinguishing whether there is camera shake or not.
本発明の形態は、画像処理装置に限るものではなく、画像処理装置が組み込まれた印刷装置(プリンタ),画像表示装置(ビューア)や、コンピュータを用いた画像判定方法、コンピュータプログラムなど他の形態に適用することもできる。また、本発明は、前述の形態に何ら限定されるものではなく、本発明の趣旨を逸脱しない範囲内において様々な形態で実施し得ることは勿論である。 The form of the present invention is not limited to the image processing apparatus, and other forms such as a printing apparatus (printer), an image display apparatus (viewer) incorporating the image processing apparatus, an image determination method using a computer, a computer program, and the like. It can also be applied to. Further, the present invention is not limited to the above-described embodiments, and it is needless to say that the present invention can be implemented in various forms without departing from the spirit of the present invention.
以上説明した本発明の構成および作用を一層明らかにするために、以下本発明を適用した画像処理装置について説明する。なお、本実施例では、画像処理装置の一形態として、画像処理装置としての機能を有するプリンタを例に挙げて説明する。 In order to further clarify the configuration and operation of the present invention described above, an image processing apparatus to which the present invention is applied will be described below. In this embodiment, a printer having a function as an image processing apparatus will be described as an example of an image processing apparatus.
A.第1実施例:
A1.プリンタの構成:
図1は、プリンタ10の外観構成を主に示す説明図である。プリンタ10は、紙やラベルなどの印刷媒体900にインク滴を噴射して文字や画像などのデータを印刷するインクジェット式プリンタである。本実施例では、プリンタ10は、いわゆる複合機としてスキャナやコピーなどの各種機能を有する。
A. First embodiment:
A1. Printer configuration:
FIG. 1 is an explanatory diagram mainly showing the external configuration of the
プリンタ10は、カードスロット140と、通信コネクタ150とを備える。プリンタ10のカードスロット140は、フラッシュメモリや小型ハードディスクなどの記憶媒体を内蔵するメモリカード810とデータをやり取り可能に接続するインタフェースである。プリンタ10の通信コネクタ150は、パーソナルコンピュータやデジタルスチルカメラ,デジタルビデオカメラなどの外部機器820とデータをやり取り可能に接続するインタフェースである。本実施例では、プリンタ10は、カードスロット140に接続されたメモリカード810や、通信コネクタ150に接続された外部機器820に記憶されている画像データを印刷する機能を有する。本実施例では、更に、プリンタ10は、メモリカード810や外部機器820に記憶されている画像データについて画像品質判定を実施することによって、手ブレしていない画像やピントが合っていない画像を印刷対象として選定し、手ブレ画像やピンぼけ画像を印刷対象から除外する「画像品質判定付き印刷機能」を有する。プリンタ10にて実行される「画像品質判定付き印刷機能」の詳細については後述する。
The
プリンタ10は、更に、スキャナ部130と、ディスプレイ160と、操作パネル170とを備える。プリンタ10のスキャナ部130は、原稿台に載置された原稿を読み取ってデジタルデータに変換(スキャン、scan)する。プリンタ10のディスプレイ160は、プリンタ10のユーザに向けて文字や画像を表示する。プリンタ10の操作パネル170は、プリンタ10のユーザからの指示入力を受け付ける。
The
図2は、プリンタ10の内部構成を主に示す説明図である。プリンタ10は、図1で説明したカードスロット140や通信コネクタ150などの他、更に、プリンタ10の各部を制御するメイン制御部110と、印刷媒体900への印刷を実行する印刷機構部120とを備える。
FIG. 2 is an explanatory diagram mainly showing the internal configuration of the
プリンタ10のメイン制御部110は、「画像品質判定付き印刷機能」を実現するための機能要素として、画像読出部310と、エッジ領域特定部315と、周波数変換部320と、手ブレ方向推定部330と、一次元化部340と、重み付け部350と、判定部360と、印刷指示部370とを備える。メイン制御部110の画像読出部310は、カードスロット140に接続されたメモリカード810や、通信コネクタ150に接続された外部機器820から画像データを読み出す。メイン制御部110のエッジ領域特定部315は、画像読出部310によって読み出された画像データに基づく画像におけるエッジ量が基準値よりも多いエッジ領域を特定する。メイン制御部110の周波数変換部320は、エッジ領域特定部315によって特定されたエッジ領域における空間領域の画像を周波数領域で表したパワースペクトルを生成する。メイン制御部110の手ブレ方向推定部330は、周波数変換部320によって生成されたパワースペクトルにおける振幅値の第二主成分方向を特定する。メイン制御部110の一次元化部340は、手ブレ方向推定部330によって特定された第二主成分方向に略沿ったパワースペクトルの領域における振幅値を周波数軸上に一次元化した一次元振幅データを生成する。メイン制御部110の重み付け部350は、一次元化部340によって生成された一次元振幅データを周波数に応じて重み付けする。メイン制御部110の判定部360は、重み付け部350によって重み付けされた一次元振幅データにおいて振幅値が谷状に変化する領域の周波数に基づいて、画像データに基づく画像が手ブレによってぼやけているか否かを判定する。メイン制御部110の印刷指示部370は、判定部360によって手ブレしていないと判断された正常な画像を印刷するよう印刷機構部120に指示する。
The
本実施例では、プリンタ10のメイン制御部110は、セントラルプロセッシングユニット(Central Processing Unit、以下、CPUという),リードオンリメモリ(Read Only Memory、以下、ROMという),ランダムアクセスメモリ(Random Access Memory、以下、RAMという)などのハードウェアを有するASIC(Application Specific Integrated Circuits)を備える。本実施例では、メイン制御部110には、画像読出部310,エッジ領域特定部315,周波数変換部320,手ブレ方向推定部330,一次元化部340,重み付け部350,判定部360,印刷指示部370の各機能を実現させるためのソフトウェアがインストールされている。メイン制御部110の動作についての詳細は後述する。
In this embodiment, the
プリンタ10の印刷機構部120は、図2に示すように、ヘッドユニット210と、キャリッジ200と、キャリッジ駆動部240と、搬送部250とを備える。印刷機構部120のヘッドユニット210は、ブラック,シアン,ライトシアン,マゼンダ,ライトマゼンダ,イエロの各色のインク毎に計6個の噴射ヘッド211,212,213,214,215,216を有する。噴射ヘッド211〜216の各々は、ピエゾ素子(図示しない)の電圧調整によってインクを噴射する。印刷機構部120のキャリッジ200は、ヘッドユニット210を保持する。印刷機構部120のキャリッジ駆動部240は、印刷媒体900の上方で、キャリッジ200を主走査方向に駆動する。印刷機構部120の搬送部250は、キャリッジ200が移動する主走査方向に交差する副走査方向に、印刷媒体900を搬送する。印刷機構部120の噴射ヘッド211〜216,キャリッジ駆動部240,搬送部250の各部が、メイン制御部110の指示に基づいて協働することによって、印刷媒体900への印刷が実現される。
As shown in FIG. 2, the printing mechanism unit 120 of the
A2.プリンタの動作:
A2−1.画像印刷処理:
図3は、プリンタ10のメイン制御部110によって実行される画像印刷処理を示すフローチャートである。図3の画像印刷処理は、前述した「画像品質判定付き印刷機能」を実現するための処理である。本実施例では、カードスロット140に取り付けられたメモリカード810や通信コネクタ150に取り付けられた外部機器820に記憶された画像データについて「画像品質判定付き印刷機能」を実施するようにとの実施要求が、プリンタ10のユーザから操作パネル170を介して受け付けられた場合に、プリンタ10のメイン制御部110は、図3の画像印刷処理を開始する。本実施例では、図3の画像印刷処理は、メイン制御部110のCPUがソフトウェアに基づいて動作することによって実現されるが、他の実施形態として、メイン制御部110の電子回路がその物理的な回路構成に基づいて動作することによって実現されても良い。
A2. Printer behavior:
A2-1. Image printing process:
FIG. 3 is a flowchart illustrating image printing processing executed by the
プリンタ10のメイン制御部110は、図3の画像印刷処理を開始すると、印刷条件を設定する印刷条件設定処理を実行する(ステップS100)。印刷条件設定処理(ステップS100)で設定される印刷条件には、印刷対象となる画像データ,印刷用紙,印刷サイズ,印刷枚数,印刷品質などが含まれる。本実施例では、印刷条件設定処理(ステップS100)で設定される印刷条件は、プリンタ10のユーザから操作パネル170を介して受け付けられた情報に基づいて設定されるが、他の実施形態として、予め設定されている既定の印刷条件に基づいて設定されるとしても良い。
When starting the image printing process of FIG. 3, the
印刷条件設定処理(ステップS100)の後、メイン制御部110は、印刷条件設定処理(ステップS100)で設定された印刷条件の範囲で、メモリカード810や外部機器820に記憶されている画像データを順次選定することによって、手ブレ判定の判定対象となる画像データを準備する(ステップS302)。本実施例では、判定対象となる画像データは、そのファイル名の順序に従って選定されるが、他の実施形態として、ファイル形式、撮影日時、ファイル更新日時などの各種属性に応じた順序に従って選定されるとしても良い。
After the print condition setting process (step S100), the
画像データが準備された後(ステップS302)、メイン制御部110は、その準備された画像データに基づく画像が手ブレ画像やピンぼけ画像であるか否かを判定する画像品質判定処理を実行する(ステップS200)。画像品質判定処理(ステップS200)の詳細については後述する。
After the image data is prepared (step S302), the
画像品質判定処理(ステップS200)の後、メイン制御部110は、画像品質判定処理(ステップS200)にて判定された画像データが手ブレ画像またはピンぼけ画像であるか否かを判断する(ステップS304)。画像品質判定処理(ステップS200)にて判定された画像データが正常な画像である場合(ステップS304)、メイン制御部110は、印刷指示部370として動作することによって、その画像を印刷対象として選定し、その画像を印刷媒体900に印刷するよう印刷機構部120に指示する(ステップS306)。一方、画像品質判定処理(ステップS200)にて判定された画像データが手ブレ画像やピンぼけ画像である場合(ステップS304)、メイン制御部110は、その画像を印刷対象から除外することによって、その画像が印刷機構部120によって印刷されるのを禁止する(ステップS307)。
After the image quality determination process (step S200), the
画像品質が判定された画像について印刷実行または印刷禁止を処理した後(ステップS306,S307)、メイン制御部110は、画像品質判定を実施すべき画像データの全てについて処理するまで、画像品質判定処理(ステップS200)からの処理を繰り返し実行する(ステップS308,S309)。全ての画像データについて処理を終えた後(ステップS308)、メイン制御部110は、画像品質判定(ステップS200)の処理結果をユーザに向けて表示する結果表示処理を実行する(ステップS500)。
After printing execution or printing prohibition is processed for an image whose image quality is determined (steps S306 and S307), the
図4は、結果表示処理(ステップS500)でディスプレイ160に表示される結果表示画面60の一例を示す説明図である。図4の結果表示画面60は、画像品質判定処理(ステップS200)で判定された画像データの一覧を表示する画像一覧部610を備える。本実施例では、画像一覧部610に表示される画像データのうち、画像品質判定処理(ステップS200)にて手ブレ画像やピンぼけ画像と判定された画像データ、すなわち、印刷が禁止された画像データには太枠620が付され、手ブレ画像やピンぼけ画像と、正常な画像とが区別して表示される。
FIG. 4 is an explanatory diagram illustrating an example of the
A2−2.画像品質判定処理:
図5は、図3における画像品質判定処理(ステップS200)の詳細を示すフローチャートである。プリンタ10のメイン制御部110は、図5の画像品質判定処理(ステップS200)を開始すると、メイン制御部110のメモリ(図示しない)に保持される合焦フラグをオフ(二値数の「0」)に設定する(ステップS205)。その後、メイン制御部110は、画像読出部310として動作することによって、判定対象となる画像データをメモリカード810や外部機器820から読み出す画像読出処理を実行する(ステップS210)。本実施例では、画像読出処理(ステップS210)においてメモリカード810や外部機器820から読み出される画像データは、JPEG(ジェイペグ)形式でデータ圧縮されたJPEGデータであり、離散コサイン変換(Discrete Cosine Transform、DCT)を用いて変換符号化されている。
A2-2. Image quality judgment processing:
FIG. 5 is a flowchart showing details of the image quality determination process (step S200) in FIG. When the
画像読出処理(ステップS210)の後、メイン制御部110は、画像読出処理(ステップS210)で読み出された画像データに基づく画像における領域の一部として、画像品質判定を実施するための判定領域を設定する判定領域設定処理を実行する(ステップS220)。
After the image reading process (step S210), the
図6は、判定領域設定処理(ステップS220)が実施される様子の一例を示す説明図である。図6の画像50は、画像読出処理(ステップS210)で読み出された画像データに基づく画像をラスタデータとして模式的に現したものである。本実施例では、図6に示すように、判定領域540は、画像50よりも小さな矩形状の領域として画定される。本実施例では、画像50に対して最初に判定領域設定処理(ステップS220)が実施される場合、その判定領域540は、画像50の左上の隅に設定される。その画像50に対して二回目以降に判定領域設定処理(ステップS220)が実施される場合、その判定領域540は、先回設定された判定領域540の右隣に設定され、画像50の右端まで設定されると、一段下の左端から右方向へと同様に設定される。本実施例では、判定領域540の大きさは、縦および横方向に128画素×128画素に相当する領域であるが、画像50の画素数,印刷サイズ,印刷解像度などの印刷条件に応じて適宜設定することができる。
FIG. 6 is an explanatory diagram showing an example of how the determination area setting process (step S220) is performed. An
判定領域設定処理(ステップS220)の後、メイン制御部110は、エッジ領域特定部315として動作することによってエッジ領域特定処理を実行する(ステップS500)。エッジ領域特定処理(ステップS500)では、メイン制御部110は、判定領域設定処理(ステップS220)で設定された判定領域540のエッジ量が基準値よりも多い場合、その判定領域540をエッジ領域と判定する。エッジ領域特定処理(ステップS500)の詳細は後述する。
After the determination area setting process (step S220), the
エッジ領域特定処理(ステップS500)で判定領域540がエッジ領域であると判定された場合(ステップS230)、メイン制御部110は、合焦フラグをオン(二値数の「1」)に設定する(ステップS240)。その後、メイン制御部110は、エッジ領域特定処理(ステップS500)でエッジ領域と判定された判定領域540に基づく画像が手ブレ画像であるか否かを判定する手ブレ判定処理を実行する(ステップS400)。手ブレ判定処理(ステップS400)の詳細は後述する。
When the
手ブレ判定処理(ステップS400)で判定領域540に基づく画像が手ブレ画像であると判定された場合(ステップS250)、メイン制御部110は、画像読出処理(ステップS210)で読み出された画像データが手ブレ画像であると判定した後(ステップS286)、画像品質判定処理(ステップS200)を終了する。
When it is determined that the image based on the
一方、エッジ領域特定処理(ステップS500)で判定領域540がエッジ領域であると判定されなかった場合(ステップS230)や、手ブレ判定処理(ステップS400)で判定領域540に基づく画像が手ブレ画像でないと判定された場合(ステップS250)、メイン制御部110は、画像読出処理(ステップS210)で読み出された画像データに基づく画像50の全体に判定領域540が設定されたか否か、すなわち判定領域540が画像50の右下まで設定されたか否かを判断する(ステップS260)。画像50の全体に判定領域540が設定されていない場合(ステップS260)、メイン制御部110は、判定領域設定処理(ステップS220)からの処理を繰り返し実行する。
On the other hand, when the
画像50の全体に判定領域540が設定されている場合(ステップS260)、メイン制御部110は、合焦フラグがオン(二値数の「1」)であるか否かを判定する(ステップS270)。合焦フラグがオン(二値数の「1」)である場合(ステップS282)、メイン制御部110は、画像読出処理(ステップS210)で読み出された画像データが焦点の合った合焦画像であると判定した後(ステップS282)、画像品質判定処理(ステップS200)を終了する。一方、合焦フラグがオフ(二値数の「0」)である場合(ステップS282)、メイン制御部110は、画像読出処理(ステップS210)で読み出された画像データが焦点の合っていないピンぼけ画像であると判定した後(ステップS284)、画像品質判定処理(ステップS200)を終了する。
When the
A2−3.エッジ領域特定処理:
図7は、図5におけるエッジ領域特定処理(ステップS500)の詳細を示すフローチャートである。プリンタ10のメイン制御部110は、図7のエッジ領域特定処理(ステップS500)を開始すると、画像読出処理(ステップS210)で読み出された画像データに対して逆ハフマン符号化および逆量子化を実施することによって、判定領域設定処理(ステップS220)で設定された判定領域540における離散コサイン変換係数(DCT係数)を生成する(ステップS510)。その後、メイン制御部110は、DCT係数に基づいて判定領域540におけるエッジ量Eを算出する(ステップS520)。本実施例では、エッジ量Eは、DCT係数に対応付けられた輝度変化のパターンを用いて算出される。エッジ量Eが閾値T以上である場合(ステップS540)メイン制御部110は、判定領域設定処理(ステップS220)で設定された判定領域540がエッジ領域であると判定する(ステップS550)。一方、エッジ量Eが閾値Tよりも小さい場合(ステップS540)、メイン制御部110は、判定領域設定処理(ステップS220)で設定された判定領域540がエッジ領域ではないと判定する(ステップS560)。閾値Tの値は、画像50の画素数,印刷サイズ,印刷解像度などの印刷条件に応じて適宜設定することができる。
A2-3. Edge area identification processing:
FIG. 7 is a flowchart showing details of the edge region specifying process (step S500) in FIG. When the
A2−4.手ブレ判定処理:
図8および図9は、図5における手ブレ判定処理(ステップS400)の詳細を示すフローチャートである。プリンタ10のメイン制御部110は、図8の手ブレ判定処理を開始すると、周波数変換部320として動作することによって周波数変換処理を実行する(ステップS420)。周波数変換処理(ステップS420)では、メイン制御部110は、エッジ領域特定処理(ステップS500)でエッジ領域と判定された判定領域540における空間領域の画像を周波数領域で表したパワースペクトルを生成する。
A2-4. Camera shake judgment processing:
8 and 9 are flowcharts showing details of the camera shake determination process (step S400) in FIG. When the camera shake determination process in FIG. 8 is started, the
本実施例では、周波数変換処理(ステップS420)において、メイン制御部110は、画像読出処理(ステップS210)で読み出されたJPEGデータのうち、エッジ領域特定処理(ステップS500)でエッジ領域と判定された判定領域540に対応する部分のデータをデコードすることによって、その判定領域540に対応する非圧縮のラスタデータをメイン制御部110のメモリ上(図示しない)に準備する(ステップS422)。なお、ラスタデータとは、色情報を有する複数の画素(ピクセル)を縦横に羅列して画像を表現したデータを意味する。
In the present embodiment, in the frequency conversion process (step S420), the
図10は、周波数変換処理(ステップS420)が実施される様子の一例を示す説明図である。図10のサンプル画像70は、エッジ領域特定処理(ステップS500)でエッジ領域と判定された判定領域540に対応する空間領域のラスタデータを模式的に表したものである。本実施例では、サンプル画像70のサイズは、縦横128×128ピクセルであるが、メイン制御部110の演算能力の他、印刷サイズや印刷品質などの印刷条件に応じて適宜設定されるとしても良い。
FIG. 10 is an explanatory diagram showing an example of how the frequency conversion process (step S420) is performed. A
図8および図9の説明に戻り、サンプル画像70が準備された後(ステップS422)、メイン制御部110は、サンプル画像70を高速フーリエ変換することによってパワースペクトルを生成する(ステップS424)。本実施例では、パワースペクトルの生成に高速フーリエ変換が用いられるが、他の実施形態として、離散フーリエ変換が用いられるとしても良い。
Returning to the description of FIGS. 8 and 9, after the
図10のパワースペクトル80は、サンプル画像70を高速フーリエ変換することによって生成された周波数領域の画像データを模式的に表したものである。図10のパワースペクトル80には、横軸であるx軸に水平周波数をとると共に、縦軸であるy軸に垂直周波数をとることによって、高速フーリエ変換後の複素係数の絶対値が振幅値(パワー)としてスケーリング表示されている。パワースペクトル80における振幅値は、白く見える部分ほど比較的に大きな振幅値であることを示し、黒く見える部分ほど比較的に小さな振幅値であることを示す。図10に示す例では、サンプル画像70が手ブレ画像であるため、パワースペクトル80における振幅値の分布は、第二象限および第四象限から原点に向かう手ブレ方向に圧縮された態様を示す。
A
図8および図9の説明に戻り、周波数変換処理(ステップS420)の後、メイン制御部110は、手ブレ方向推定部330として動作することによって手ブレ方向推定処理を実行する(ステップS430)。手ブレ方向推定処理(ステップS430)では、メイン制御部110は、周波数変換処理(ステップS420)で生成されたパワースペクトル80における振幅値の第二主成分方向を特定する。
Returning to the description of FIG. 8 and FIG. 9, after the frequency conversion process (step S420), the
本実施例では、手ブレ方向推定処理(ステップS430)において、メイン制御部110は、周波数変換処理(ステップS420)で生成されたパワースペクトル80において画像の平均輝度を示す直流成分(DC成分)に依存する振幅値を「0(零)」に置き換える(ステップS432)。その後、メイン制御部110は、そのパワースペクトル80にハニング窓関数(Hanning Window)を掛け合わせる。本実施例では、ハニング窓係数を掛け合わせることによってパワースペクトル80を処理したが、他の実施形態として、ハニング窓関数に代えて、ハミング窓関数やブラックマン窓関数などの窓関数を利用しても良い。
In the present embodiment, in the camera shake direction estimation process (step S430), the
図11は、手ブレ方向推定処理(ステップS430)が実施される様子の一例を示す説明図である。図11のパワースペクトル82は、周波数変換処理(ステップS420)で生成されたパワースペクトル80について直流成分を「0」に置き換えた後にハニング窓関数を掛け合わせた周波数領域の画像データを模式的に表したものである。パワースペクトル82には、水平周波数をとった横軸であるx軸と、垂直周波数をとった縦軸であるy軸とが示され、図面の理解を容易にするために、パワースペクトル82において比較的に大きな振幅値が分布する部位を領域828として表現することによって、振幅値の分布が簡略化して図示されている。
FIG. 11 is an explanatory diagram showing an example of how the camera shake direction estimation process (step S430) is performed. The
図8および図9の説明に戻り、ハニング窓関数で処理されたパワースペクトル82が生成された後(ステップS434)、メイン制御部110は、主成分分析(Principal Component Analysis, PCA)を応用して、次の数式1から求められる第二主成分方向「y/x」を手ブレ方向として推定する(ステップS436)。
Returning to the description of FIGS. 8 and 9, after the
ここで、λは固有ベクトルであり、係数Vxx,Vyy,Vxyは、次の数式2から求められる。 Here, λ is an eigenvector, and the coefficients V xx , V yy , and V xy are obtained from the following Equation 2.
ここで、係数axyは、パワースペクトル82における位置(x,y)上の周波数振幅値である。なお、本実施例では、サンプル画像70の大きさから「−128≦x,y≦128」であり、直流成分に依存する係数ax0,a0yは「0」である。
Here, the coefficient a xy is a frequency amplitude value on the position (x, y) in the
数式1から「y/x」として求められた第二主成分方向は、図11に示すように、パワースペクトル82においてx軸およびy軸の原点を通り主成分方向821に直交する手ブレ方向822として特定される。
The second principal component direction obtained from Equation 1 as “y / x” is a
図8および図9の説明に戻り、手ブレ方向推定処理(ステップS430)の後、メイン制御部110は、一次元化部340として動作することによって一次元化処理を実行する(ステップS440)。一次元化処理(ステップS440)では、メイン制御部110は、手ブレ方向推定処理(ステップS430)で特定された手ブレ方向822に略沿ったパワースペクトル82の領域における振幅値を周波数軸上に一次元化した一次元振幅データを生成する。
Returning to the description of FIGS. 8 and 9, after the camera shake direction estimation process (step S430), the
本実施例では、一次元化処理(ステップS440)において、メイン制御部110は、パワースペクトル82における領域のうち、手ブレ方向推定処理(ステップS430)で推定された手ブレ方向822を含む中心角を有する扇型領域を特定する(ステップS442)。その後、メイン制御部110は、その扇型領域における振幅値を円周方向に合計することによって一次元振幅データを生成する(ステップS444)。
In the present embodiment, in the one-dimensionalization process (step S440), the
図12は、一次元化処理(ステップS440)が実施される様子の一例を示す説明図である。図12のパワースペクトル82は、手ブレ方向推定処理(ステップS430)によって手ブレ方向822が推定された画像データを模式的に表したものである。本実施例では、図12のパワースペクトル82には、x軸およびy軸の原点を中心として第一象限および第二象限にわたる180度の半円領域を八等分した扇型領域が設定されている。これら八個の扇型領域のうち、手ブレ方向822を含む中心角を有する扇型領域824が、メイン制御部110によって特定される(ステップS422)。図12には、手ブレ方向822の扇型領域824における振幅値を円周方向に合算することによって、振幅値の合計値が一次元の周波数軸上に分布する一次元振幅データ84が生成される様子が図示されている(ステップS444)。図12の一次元振幅データ84には、周波数振幅値が、横軸に周波数をとり縦軸に振幅をとって図示されている。なお、一次元振幅データ84のためにパワースペクトル82から抽出される領域は、半円領域を八等分した扇型領域に限るものではなく、半円領域を8以下や8以上に等分した扇型領域であっても良いし、手ブレ方向822に沿った帯状領域であっても良い。
FIG. 12 is an explanatory diagram illustrating an example of a state in which the one-dimensionalization process (step S440) is performed. The
図8および図9の説明に戻り、一次元化処理(ステップS440)の後、メイン制御部110は、重み付け部350として動作することによって重み付け処理を実行する(ステップS450)。重み付け処理(ステップS450)では、メイン制御部110は、一次元化処理(ステップS440)で生成された一次元振幅データ84を周波数に応じて重み付けする。
Returning to the description of FIGS. 8 and 9, after the one-dimensionalization process (step S440), the
本実施例では、重み付け処理(ステップS450)において、メイン制御部110は、一次元化処理(ステップS440)で生成された一次元振幅データ84を、周波数50ヘルツを含む領域で平滑化する(ステップS452)。本実施例における一次元振幅データ84を平滑化する範囲である周波数50ヘルツの値は、本発明者による検証によって好適な値として設定されたものであるが、一次元振幅データ84を平滑化する範囲は、周波数50ヘルツに限定するものではなく、判定対象となる画像に応じて適切な値を適宜設定しても良い。本実施例では、一次元振幅データ84が平滑化された後(ステップS452)、メイン制御部110は、平滑化された一次元振幅データ84に周波数の値を掛け合わせることによって重み付けを実施する(ステップS454)。
In the present embodiment, in the weighting process (step S450), the
図13は、重み付け処理(ステップS450)が実施される様子の一例を示す説明図である。図13の一次元振幅データ84には、周波数50ヘルツを含む領域で平滑化された周波数振幅値が、横軸に周波数をとり縦軸に振幅をとって図示されている。図13の一次元振幅データ86には、周波数を掛け合わせることによって重み付けされた周波数振幅値が、横軸に周波数をとり縦軸に振幅をとって図示されている。一次元振幅データ86の周波数振幅値は、重み付け処理(ステップS450)によって周波数が大きくなるほど大きな重み付けがなされている。例えば、一次元振幅データ84における周波数60ヘルツの周波数振幅値には、その周波数の値である「60」が掛け合わされ、周波数300ヘルツの周波数振幅値には、その周波数の値である「300」が掛け合わされる。
FIG. 13 is an explanatory diagram illustrating an example of a state in which the weighting process (step S450) is performed. In the one-
図8および図9の説明に戻り、重み付け処理(ステップS450)の後、メイン制御部110は、判定部360として動作することによって判定処理を実行する(ステップS460)。判定処理(ステップS460)では、メイン制御部110は、重み付け処理(ステップS450)で生成された一次元振幅データ86において振幅値が谷状に変化する領域の周波数に基づいて、画像読出処理(ステップS410)で読み出された画像データが手ブレ画像であるか否かを判定する。
Returning to the description of FIG. 8 and FIG. 9, after the weighting process (step S450), the
本実施例では、判定処理(ステップS460)において、メイン制御部110は、重み付け処理(ステップS450)で生成された一次元振幅データ86における周波数50ヘルツから575ヘルツの範囲で周波数振幅が最小値をとる周波数fbを特定する(ステップS462)。本実施例における周波数振幅の最小値を検索する範囲である周波数50ヘルツから575ヘルツの値は、本発明者による検証によって好適な値として設定されたものであるが、周波数振幅の最小値を検索する範囲は、周波数50ヘルツから575ヘルツの値に限定するものではなく、判定対象となる画像に応じて適切な値を適宜設定しても良い。
In the present embodiment, in the determination process (step S460), the
周波数fbが周波数60ヘルツよりも大きく周波数300ヘルツより小さい場合、メイン制御部110は、エッジ領域特定処理(ステップS500)でエッジ領域と判定された判定領域540が手ブレ画像であると判定した後(ステップS466)、手ブレ判定処理(ステップS400)を終了する。一方、周波数fbが周波数60ヘルツ以下または周波数300ヘルツ以上である場合、メイン制御部110は、エッジ領域特定処理(ステップS500)でエッジ領域と判定された判定領域540が手ブレ画像はない正常な画像であると判定した後(ステップS468)、手ブレ判定処理(ステップS400)を終了する。本実施例における周波数fbの判定範囲である周波数60ヘルツから300ヘルツの値は、本発明者による検証によって好適な値として設定されたものであるが、周波数fbの判定範囲は、周波数60ヘルツから300ヘルツの値に限定するものではなく、判定対象となる画像に応じて適切な値を適宜設定しても良い。なお、本実施例における周波数fbの判定範囲である周波数300ヘルツは、L版サイズ(127mm×89mm)で印刷した場合に手ブレ幅が約0.3mmとなる値に相当する。
When the frequency fb is larger than the
図14は、判定処理(ステップS460)が実施される様子の一例を示す説明図である。図14には、重み付け処理(ステップS450)で生成された一次元振幅データ86が、周波数を横軸にとり振幅を縦軸にとって図示されている。図14に示す例では、周波数50ヘルツから575ヘルツの範囲において、一次元振幅データ86が最小値pbをとる周波数fbは、周波数60ヘルツよりも大きく300ヘルツよりも小さな手ブレ範囲にある。この場合、メイン制御部110は、エッジ領域特定処理(ステップS500)でエッジ領域と判定された判定領域540が手ブレ画像であると判定する(ステップS466)。本実施例では、一次元振幅データ86において振幅値が谷状に変化する領域の周波数を、振幅値が最小値pbをとる周波数fbとして特定したが、他の実施形態として、振幅値が一次元振幅データ86に施された重み付けに応じた条件を満たす極小値をとる周波数として特定しても良い。
FIG. 14 is an explanatory diagram showing an example of how the determination process (step S460) is performed. In FIG. 14, the one-
A3.効果
以上説明したプリンタ10によれば、手や体などの直線的な移動に起因する手ブレ画像が、実空間上の被写体に対し矩形関数(数式3)を畳み込んだ画像になり、周波数空間上ではシンク関数(数式4)を畳み込んだパワースペクトル80になると考えられることから、周波数領域の画像において手ブレ方向に現れるシンク関数の影響の度合いに基づいて手ブレ判定を実施することができる。
A3. Effect According to the
ここで、γは、手ブレ幅、すなわち手ブレによる直線移動距離を示し、kは周波数を示す。 Here, γ indicates a camera shake width, that is, a linear movement distance by camera shake, and k indicates a frequency.
図15は、手ブレ画像とシンク関数の関係を示す説明図である。図15には、周波数振幅La,Lb,Lcが、横軸に周波数をとり縦軸に振幅をとって図示されている。周波数振幅Laは、手ブレなしで正常に撮影された被写体の周波数振幅を示す。周波数振幅Lbは、次の数式4で表されるシンク関数の周波数振幅を示す。周波数振幅Lbは、被写体の周波数振幅Laにシンク関数の周波数振幅Lbを畳み込んだ手ブレ画像の周波数振幅を示す。図15において、数式4のシンク関数が「0」になる点B1,B2,B3では、周波数kが1/γ,2/γ,3/γをとる。 FIG. 15 is an explanatory diagram illustrating a relationship between a camera shake image and a sync function. In FIG. 15, the frequency amplitudes La, Lb, and Lc are shown with the horizontal axis representing frequency and the vertical axis representing amplitude. The frequency amplitude La indicates the frequency amplitude of a subject that is normally photographed without camera shake. The frequency amplitude Lb indicates the frequency amplitude of the sinc function expressed by the following Equation 4. The frequency amplitude Lb indicates the frequency amplitude of a camera shake image obtained by convolving the frequency amplitude Lb of the sync function with the frequency amplitude La of the subject. In FIG. 15, at points B1, B2, and B3 where the sink function of Equation 4 is “0”, the frequencies k are 1 / γ, 2 / γ, and 3 / γ.
本発明者による検証において、デジタルカメラで撮影した正常写真370枚および手ブレ写真110枚について、本実施例の手ブレ判定処理(ステップS400)を実施したところ、正常写真370枚のうち358枚を正常画像であるとして判定(正答率96.8%)し、手ブレ写真110枚のうち69枚を手ブレ画像であると判定(正答率62.7%)することができた。これらのことから、プリンタ10によれば、相対的に高周波成分の少ない画像であっても、手ブレ判定における誤判定を抑制することができる。
In the verification by the present inventor, the camera shake determination process (step S400) of the present embodiment was performed on 370 normal photographs and 110 camera shake photographs taken with a digital camera. As a result, 358 out of 370 normal photographs were obtained. It was determined that the image was a normal image (correct answer rate: 96.8%), and 69 out of 110 hand-blurred photos could be determined to be camera-shake images (correct answer rate: 62.7%). For these reasons, according to the
また、また、エッジ領域である判定領域540に絞り込んで手ブレ判定処理(ステップS400)を実施することができるため、手ブレ方向822に現れるシンク関数の影響の度合いを評価するための処理負荷を軽減することができる。また、JPEGデータのDCT係数を利用してエッジ量を評価することができるため、判定領域540がエッジ領域であるか否かを特定するための処理負荷を軽減することができる。
In addition, since the camera shake determination process (step S400) can be performed by narrowing down to the
また、プリンタ10の周波数変換部320は、高速フーリエ変換によってパワースペクトル80を生成するため(ステップS424)、シンク関数の影響によって振幅値が谷状に変化する領域を特定するのに十分な周波数分解能を得ることができる。また、プリンタ10の手ブレ方向推定部330は、ハニング窓関数を掛け合わせたパワースペクトル82から手ブレ方向822を推定するため(ステップS434)、手ブレ方向822の特定誤差を抑制することができる。また、プリンタ10の手ブレ方向推定部330は、パワースペクトル80における直流成分の振幅値ax0,a0yを零に置き換えた主成分分析によって手ブレ方向822を推定するため(ステップS432)、直流成分の影響を排除することによって手ブレ方向822の特定誤差を抑制することができる。
Further, since the frequency conversion unit 320 of the
また、プリンタ10の一次元化部340は、手ブレ方向822の扇型領域824から一次元振幅データ84を生成するため(ステップS442)、主成分方向に近い方向の振幅値を一次元振幅データ84から排除することができる。また、プリンタ10の重み付け部350は、一次元振幅データ84を、周波数50ヘルツを含む領域で平滑化するため(ステップS452)、被写体に依存する振幅特性が一次元振幅データ84に与える影響を抑制することができる。また、プリンタ10の重み付け部350は、一次元振幅データ84に周波数を掛け合わせて重み付けするため(ステップS454)、周波数に応じた振幅値の影響度合いを考慮して一次元振幅データ86を分析することができる。
In addition, the one-
また、プリンタ10の判定部360は、周波数50ヘルツから575ヘルツの範囲で周波数fbを特定するため(ステップS462)、手ブレ判定に有用な周波数範囲を絞り込むことによって手ブレ判定に要する処理負荷を軽減することができる。また、プリンタ10の判定部360は、周波数fbが60ヘルツから300ヘルツの間である場合に手ブレ画像であると判定するため(ステップS466)、手ブレ画像であると人間が認識可能な度合いで手ブレ判定を実施することができる。
In addition, the
A4.変形例:
前述の実施例では、プリンタ10のメイン制御部110は、DCT係数に基づいてエッジ領域を特定するエッジ領域特定処理(ステップS500)を実施するが、他の実施形態において、画素間の輝度値の差分に基づいてエッジ領域を特定しても良い。図16および図17は、変形例におけるエッジ領域特定処理(ステップS600)を示すフローチャートである。図18は、画素間の輝度値の差分からエッジ抽出を行う様子を示す説明図である。変形例では、画像品質判定処理(ステップS200)において、プリンタ10のメイン制御部110は、図7のエッジ領域特定処理(ステップS500)に代えて、図16および図17のエッジ領域特定処理(ステップS600)を実行する。
A4. Variations:
In the above-described embodiment, the
プリンタ10のメイン制御部110は、図16および図17のエッジ領域特定処理(ステップS600)を開始すると、判定領域540において所定方向に並んだ画素の輝度値の差分ΔZを演算する(ステップS610)。本変形例では、水平方向および垂直方向の両方向について輝度値の差分ΔZを演算するが、図18では、説明の簡略化のため水平方向について輝度値の差分ΔZを演算する様子が示されている。図18(A)には、各画素の輝度値Zの一例が示され、図18(B)には、図18(A)に示す場合における輝度値Zの差分ΔZの一例が示されている。本変形例では、輝度値の差分ΔZは、正負の符号付きの値である。本変形例における説明では、差分ΔZは、画素間について逐次演算されるので、必要に応じて、今回着目している差分をΔZ(n)として表記し、着目画素の一つ前の画素についての差分をΔZ(n−1)として表記するものとする。
When starting the edge area specifying process (step S600) in FIGS. 16 and 17, the
輝度値の差分ΔZが演算された後(ステップS610)、メイン制御部110は、着目している画素について演算した輝度値の差分ΔZ(n)の符号が一つの前の画素について演算して求めた輝度値の差分ΔZ(n−1)の符号と同一か否かを判断する(ステップS612)。輝度値の差分ΔZ(n)の符号と輝度値の差分ΔZ(n−1)の符号とが一致する場合(ステップS612:「YES」)、メイン制御部110は、エッジが継続していると判断し、輝度値の差分ΔZ(n)を累積した累積値SZを算出する(ステップS614)。具体的には、エッジが開始されたと判断したときに0にリセットされる累積値SZに、今回の差分ΔZ(n)が加算される(SZ←SZ+ΔZ(n))。累積値SZに差分ΔZ(n)が加算された後(ステップS614)、メイン制御部110は、着目画素の位置を所定の方向に1だけ進め(ステップS616:n←n+1)、上記処理を継続する(ステップS610ないしS616)。
After the luminance value difference ΔZ is calculated (step S610), the
上記の処理を繰り返すうちに、着目している画素について演算した輝度値の差分ΔZ(n)の符号が一つの前の画素について演算した求めた輝度値の差分ΔZ(n−1)の符号と同一でないと判断されると(ステップS612:「NO」)、メイン制御部110は、そこまで求めて来た累積値SZの絶対値|SZ|が、予め定めた閾値Th1より大きいか否かを判断する(ステップS620)。図18(B)には、この判断の様子が示されている。累積値SZの絶対値が閾値Th1より大きい場合(ステップS620:「YES」)、判定すべきエッジがある可能性があると考えられるので、メイン制御部110は、エッジの幅Weを演算する(ステップS622)。エッジの幅Weは、輝度値の差分ΔZが同一符号で継続する画素数として設定される。
While repeating the above process, the sign of the difference ΔZ (n) in the luminance value calculated for the pixel of interest is the sign of the difference ΔZ (n−1) in the calculated luminance value calculated for the previous pixel. If it is determined that they are not the same (step S612: “NO”), the
エッジの幅Weが演算された後(ステップS622)、メイン制御部110は、このエッジの幅Weが予め定めた閾値Th2以下か否かを判断する(ステップS624)。エッジの幅Weが閾値Th2以下である場合(ステップS624:「YES」)、メイン制御部110は、これらの画素は合焦の状態にあるとして、エッジ量Eに値「1」を加算する(ステップS626)。本変形例では、エッジ量Eは、エッジ領域特定処理(ステップS600)の開始時に値「0」にリセットされている。エッジ量Eが加算された後(ステップS626)、メイン制御部110は、累積値SZを値「0」にリセットし(ステップS634)、着目画素の位置を所定の方向に1だけ進める(ステップS636:n←n+1)。他方、ステップS620またはS624での判断が「NO」である場合、合焦の状態にあると判断できるエッジではないとして、何の処理も行なわず、ステップS634で累積値SZをリセットする処理に移行する。これらの処理により、図18に示したように、隣接画素の輝度値の差分ΔZの符号が隣接画素間で同一でなくなったときに、エッジの有無を、この差分ΔZの累積値SZの大きさで判定し、判定の如何に関わらず、累積値SZを次の判定に備えて、値0にリセットすることになる。
After the edge width We is calculated (step S622), the
そこで、上記の一連の処理により一つのエッジについての判定が完了すると、総ての画素についての判断が終わったかを判定し(ステップS638)、終わっていなければ、ステップS610に戻って、上記の処理(ステップS610ないしS626)の処理を繰り返す。総ての画素について上記の判断が終わっていれば(ステップS638:「YES」)、メイン制御部110は、エッジ量Eが閾値T以上であるか否かを判断する(ステップS640)。エッジ量Eが閾値T以上である場合(ステップS640)メイン制御部110は、判定領域設定処理(ステップS220)で設定された判定領域540がエッジ領域であると判定する(ステップS650)。一方、エッジ量Eが閾値Tよりも小さい場合(ステップS640)、メイン制御部110は、判定領域設定処理(ステップS220)で設定された判定領域540がエッジ領域ではないと判定する(ステップS660)。閾値Tの値は、画像50の画素数,印刷サイズ,印刷解像度などの印刷条件に応じて適宜設定することができる。
Therefore, when the determination for one edge is completed through the above-described series of processing, it is determined whether all the pixels have been determined (step S638). If not, the processing returns to step S610 to perform the above processing. The processing of (Steps S610 to S626) is repeated. If the above determination is completed for all the pixels (step S638: “YES”), the
以上説明した変形例によれば、エッジの抽出を、隣接画素の輝度値の差分ΔZの符号が隣接画素間で同一でなくなったときに、この差分ΔZの累積値SZの大きさを判定することにより行なっている。したがって、画素の並びがエッジを構成しているとき、途中に差分ΔZが小さい画素間が存在したとき、その前後を別々のエッジと判定することがない。他方、全体の傾向としては、画素の輝度値が漸増または漸減していても、途中で差分ΔZが値0になるか、その符号が変更されれば、そこでエッジが分かれていると判断するので、エッジの存在領域を見誤る可能性が低減される。この結果、ノイズなどが存在しても、合焦の情報として扱うべきエッジの存在を的確に判定することができる。 According to the modification described above, the edge is extracted by determining the magnitude of the accumulated value SZ of the difference ΔZ when the sign of the luminance value difference ΔZ of the adjacent pixels is not the same between the adjacent pixels. It is done by. Therefore, when the arrangement of pixels constitutes an edge and there is an inter-pixel having a small difference ΔZ in the middle, the front and rear are not determined as separate edges. On the other hand, as an overall tendency, even if the luminance value of the pixel gradually increases or decreases, if the difference ΔZ becomes 0 or changes its sign in the middle, it is determined that the edge is divided there. The possibility of mistaking the edge existence area is reduced. As a result, even if there is noise or the like, it is possible to accurately determine the presence of an edge that should be handled as focusing information.
B.その他の実施形態:
以上、本発明の実施の形態について説明したが、本発明はこうした実施の形態に何ら限定されるものではなく、本発明の趣旨を逸脱しない範囲内において様々な形態で実施し得ることは勿論である。例えば、本実施例では、JPEGデータに基づくDCT係数を利用してエッジ領域を特定したが(ステップS500)、他の実施形態として、アダマール変換や離散フーリエ変換などの正規直交変換を用いて変換符号化された画像データである場合、その変換符号化の重み係数を利用してエッジ領域を特定しても良いし、また、ラスタデータから輝度変化量を算出することによってエッジ領域を特定しても良いし、また、画像データからデータを間引いて生成された縮小画像(サムネイル)を利用してエッジ領域を特定しても良い。また、本実施例では、判定領域540がエッジ領域であると特定される度に、手ブレ判定処理(ステップS240)を実施したが、他の実施形態として、全ての判定領域540についてエッジ領域であるか否かを特定した後に手ブレ判定処理(ステップS240)を実施しても良い。
B. Other embodiments:
As mentioned above, although embodiment of this invention was described, this invention is not limited to such embodiment at all, Of course, it can implement with various forms within the range which does not deviate from the meaning of this invention. is there. For example, in the present embodiment, the edge region is specified using DCT coefficients based on JPEG data (step S500), but as another embodiment, transform codes using orthonormal transform such as Hadamard transform and discrete Fourier transform are used. In the case of the image data, the edge area may be specified by using the weighting coefficient of the transform coding, or the edge area may be specified by calculating the luminance change amount from the raster data. Alternatively, the edge region may be specified using a reduced image (thumbnail) generated by thinning out data from the image data. In this embodiment, the camera shake determination process (step S240) is performed every time the
また、上述の実施例では、本発明をプリンタに適用した例について説明したが、他の実施形態として、例えば、パーソナルコンピュータ,デジタルカメラ,ビューワなど画像データを取り扱う電子機器に本発明を適用しても良い。 In the above-described embodiment, the example in which the present invention is applied to a printer has been described. However, as another embodiment, the present invention is applied to an electronic device that handles image data, such as a personal computer, a digital camera, and a viewer. Also good.
10...プリンタ
50...画像
60...結果表示画面
70...サンプル画像
80...パワースペクトル
82...パワースペクトル
84...一次元振幅データ
86...一次元振幅データ
110...メイン制御部
120...印刷機構部
130...スキャナ部
140...カードスロット
150...通信コネクタ
160...ディスプレイ
170...操作パネル
200...キャリッジ
210...ヘッドユニット
211...噴射ヘッド
240...キャリッジ駆動部
250...搬送部
310...画像読出部
315...エッジ領域特定部
320...周波数変換部
330...手ブレ方向推定部
340...一次元化部
350...重み付け部
360...判定部
370...印刷指示部
540...判定領域
610...画像一覧部
620...太枠
810...メモリカード
820...外部機器
821...主成分方向
822...手ブレ方向
824...扇型領域
828...領域
900...印刷媒体
fb...周波数
pb...最小値
10 ...
Claims (8)
前記画像におけるエッジ量が基準値よりも多いエッジ領域を特定するエッジ領域特定部と、
前記エッジ領域特定部によって特定されたエッジ領域における空間領域の画像を周波数領域で表したパワースペクトルを生成する周波数変換部と、
前記周波数変換部によって生成されたパワースペクトルにおける振幅値の第二主成分方向を特定する手ブレ方向推定部と、
前記パワースペクトルにおいて前記第二主成分方向に略沿った領域における振幅値を周波数軸上に一次元化した一次元振幅データを生成する一次元化部と、
前記一次元化部によって生成された一次元振幅データを周波数に応じて重み付けする重み付け部と、
前記重み付け部によって重み付けされた一次元振幅データにおいて振幅値が谷状に変化する領域の周波数に基づいて、前記画像が手ブレによってぼやけているか否かを判定する手ブレ判定部と
を備える画像判定装置。 An image determination apparatus that determines whether an image based on image data is blurred due to camera shake,
An edge region specifying unit for specifying an edge region having an edge amount in the image larger than a reference value;
A frequency conversion unit that generates a power spectrum representing an image of a spatial region in the edge region specified by the edge region specifying unit in a frequency domain;
A camera shake direction estimation unit that identifies the second principal component direction of the amplitude value in the power spectrum generated by the frequency conversion unit;
A one-dimensionalization unit that generates one-dimensional amplitude data in which the amplitude value in a region substantially along the second principal component direction in the power spectrum is one-dimensionally plotted on the frequency axis;
A weighting unit that weights the one-dimensional amplitude data generated by the one-dimensionalization unit according to a frequency;
An image determination comprising: a camera shake determination unit that determines whether the image is blurred due to camera shake based on a frequency of a region where an amplitude value changes in a valley shape in the one-dimensional amplitude data weighted by the weighting unit. apparatus.
前記重み付け部は、前記一次元化部によって生成された一次元振幅データに周波数を掛け合わせることによって、該一次元振幅データを重み付けし、
前記手ブレ判定部は、前記重み付け部によって重み付けされた一次元振幅データにおいて周波数50ヘルツから575ヘルツの範囲で振幅値が最小値をとる周波数が60ヘルツから300ヘルツである場合、前記画像が手ブレによってぼやけていると判定する、画像判定装置。 The image determination device according to any one of claims 1 to 3,
The weighting unit weights the one-dimensional amplitude data by multiplying the one-dimensional amplitude data generated by the one-dimensionalization unit by a frequency,
When the frequency at which the amplitude value has a minimum value in the frequency range of 50 Hz to 575 Hz in the one-dimensional amplitude data weighted by the weighting unit is 60 Hz to 300 Hz, An image determination apparatus that determines that the image is blurred due to blurring.
コンピュータが備えるエッジ領域特定手段が、前記画像におけるエッジ量が基準値よりも多いエッジ領域を特定する工程と、
コンピュータが備える周波数変換手段が、前記エッジ領域特定手段によって特定されたエッジ領域における空間領域の画像を周波数領域で表したパワースペクトルを生成する工程と
コンピュータが備える手ブレ方向推定手段が、前記周波数変換手段によって生成されたパワースペクトルにおける振幅値の第二主成分方向を特定する工程と、
コンピュータが備える一次元化手段が、前記パワースペクトルにおいて前記第二主成分方向に略沿った領域における振幅値を周波数軸上に一次元化した一次元振幅データを生成する工程と、
コンピュータが備える重み付け手段が、前記一次元化手段によって生成された一次元振幅データを周波数に応じて重み付けする工程と、
コンピュータが備える判定手段が、前記重み付け手段によって重み付けされた一次元振幅データにおいて振幅値が谷状に変化する領域の周波数に基づいて、前記画像が手ブレによってぼやけているか否かを判定する工程と
を備える画像判定方法。 An image determination method for determining whether an image based on image data is blurred due to camera shake using a computer,
An edge region specifying means provided in the computer specifies an edge region having an edge amount in the image larger than a reference value;
The frequency conversion means provided in the computer generates a power spectrum representing the spatial domain image in the edge area specified by the edge area specifying means in the frequency domain, and the camera shake direction estimation means provided in the computer includes the frequency conversion Identifying a second principal component direction of the amplitude value in the power spectrum generated by the means;
One-dimensionalization means provided in the computer generates one-dimensional amplitude data in which the amplitude value in a region substantially along the second principal component direction in the power spectrum is one-dimensionalized on the frequency axis;
A weighting means provided in the computer weights the one-dimensional amplitude data generated by the one-dimensionalization means according to the frequency;
A step of determining whether or not the image is blurred due to camera shake based on a frequency of a region where the amplitude value changes in a valley shape in the one-dimensional amplitude data weighted by the weighting unit; An image determination method comprising:
前記画像におけるエッジ量が基準値よりも多いエッジ領域を特定するエッジ領域特定機能と、
前記エッジ領域特定機能によって特定されたエッジ領域における空間領域の画像を周波数領域で表したパワースペクトルを生成する周波数変換機能と
前記周波数変換機能によって生成されたパワースペクトルにおける振幅値の第二主成分方向を特定する手ブレ方向推定機能と、
前記パワースペクトルにおいて前記第二主成分方向に略沿った領域における振幅値を周波数軸上に一次元化した一次元振幅データを生成する一次元化機能と、
前記一次元化機能によって生成された一次元振幅データを周波数に応じて重み付けする重み付け機能と、
前記重み付け機能によって重み付けされた一次元振幅データにおいて振幅値が谷状に変化する領域の周波数に基づいて、前記画像が手ブレによってぼやけているか否かを判定する判定機能と
をコンピュータに実現させるためのプログラム。 A program for causing a computer to realize a function of determining whether an image based on image data is blurred due to camera shake,
An edge area specifying function for specifying an edge area having an edge amount in the image larger than a reference value;
A frequency conversion function for generating a power spectrum representing a spatial domain image in the edge area specified by the edge area specifying function in a frequency domain; and a second principal component direction of an amplitude value in the power spectrum generated by the frequency conversion function. Camera shake direction estimation function to identify
A one-dimensionalization function for generating one-dimensional amplitude data in which the amplitude value in a region substantially along the second principal component direction in the power spectrum is one-dimensional on the frequency axis;
A weighting function for weighting the one-dimensional amplitude data generated by the one-dimensionalization function according to the frequency;
In order to cause a computer to realize a determination function for determining whether or not the image is blurred due to camera shake based on the frequency of a region where the amplitude value changes in a valley shape in the one-dimensional amplitude data weighted by the weighting function Program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008079659A JP2009237657A (en) | 2008-03-26 | 2008-03-26 | Image determination device, method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008079659A JP2009237657A (en) | 2008-03-26 | 2008-03-26 | Image determination device, method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009237657A true JP2009237657A (en) | 2009-10-15 |
Family
ID=41251568
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008079659A Pending JP2009237657A (en) | 2008-03-26 | 2008-03-26 | Image determination device, method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009237657A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2830003A2 (en) | 2013-07-26 | 2015-01-28 | Fujitsu Limited | Image processing apparatus and method |
JP2019096364A (en) * | 2019-03-18 | 2019-06-20 | 株式会社ニコン | Image evaluation device |
-
2008
- 2008-03-26 JP JP2008079659A patent/JP2009237657A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2830003A2 (en) | 2013-07-26 | 2015-01-28 | Fujitsu Limited | Image processing apparatus and method |
US9405956B2 (en) | 2013-07-26 | 2016-08-02 | Fujitsu Limited | Image processing apparatus and method |
US9483710B1 (en) | 2013-07-26 | 2016-11-01 | Fujitsu Limited | Image processing apparatus and method |
JP2019096364A (en) * | 2019-03-18 | 2019-06-20 | 株式会社ニコン | Image evaluation device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4042563B2 (en) | Image noise reduction | |
JP2006172417A (en) | Image evaluating method, image evaluating device, and printer | |
JP4972122B2 (en) | Image processing device | |
JP4350778B2 (en) | Image processing apparatus, image processing program, and recording medium | |
JP6781406B2 (en) | Image processing equipment and computer programs | |
JP4137015B2 (en) | Image processing apparatus and method | |
JP2006343863A (en) | Image processor and image processing method | |
JP2009239394A (en) | Coloring image generating apparatus and method | |
US7924468B2 (en) | Camera shake determination device, printing apparatus and camera shake determination method | |
JP4492706B2 (en) | Judgment of shooting scene and image processing according to shooting scene | |
JP3925476B2 (en) | Judgment of shooting scene and image processing according to shooting scene | |
JP4513764B2 (en) | Image determination apparatus and image determination method | |
JP2009237657A (en) | Image determination device, method, and program | |
JP2009027223A (en) | Image display device, image display method, and program | |
US8547590B2 (en) | Determining a resolution of a device based on a calculated principal spatial frequency response (SFR) selected from a calculated SFR | |
JP2006113658A (en) | Image processing apparatus and method, and storage medium with program recorded thereon | |
JP2009230598A (en) | Image determination device, image determination method, and image determination program | |
JP2006262404A (en) | Device and method for estimating light source, image processor, and method for image processing | |
JP4040528B2 (en) | Image processing apparatus, image processing method, image processing program, recording medium storing image processing program, and image forming apparatus including image processing apparatus | |
JP2010004300A (en) | Image processing method, image processing apparatus, image processing program, and printer | |
JP2005284423A (en) | Image processor and image processing method | |
JP4665802B2 (en) | Lightness correction processing apparatus and lightness correction determination method | |
JP4096989B2 (en) | Judgment of shooting scene and image processing according to shooting scene | |
JP2009027397A (en) | Apparatus, method and program for image processing | |
JP6394060B2 (en) | Image processing apparatus and computer program |