JP2005182745A - Image processing method, device and program - Google Patents

Image processing method, device and program Download PDF

Info

Publication number
JP2005182745A
JP2005182745A JP2004169699A JP2004169699A JP2005182745A JP 2005182745 A JP2005182745 A JP 2005182745A JP 2004169699 A JP2004169699 A JP 2004169699A JP 2004169699 A JP2004169699 A JP 2004169699A JP 2005182745 A JP2005182745 A JP 2005182745A
Authority
JP
Japan
Prior art keywords
blur
edge
image
condition
degree
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.)
Granted
Application number
JP2004169699A
Other languages
Japanese (ja)
Other versions
JP4493416B2 (en
Inventor
Tatsuya Aoyama
達也 青山
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.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
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 Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP2004169699A priority Critical patent/JP4493416B2/en
Priority to US10/949,745 priority patent/US7720302B2/en
Publication of JP2005182745A publication Critical patent/JP2005182745A/en
Application granted granted Critical
Publication of JP4493416B2 publication Critical patent/JP4493416B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To enhance an effect of blurring correction by improving discriminating accuracy of blurring in a digital photographic image. <P>SOLUTION: A tag information reading means 110a of a condition setting means 100a reads tag information of the digital photographic image. A condition adjustment means 120a acquires easiness of blurring at the time of picking up an image D based on the tag information and adjusts default values of edge detecting conditions and discriminating conditions for discriminating the blurring in the digital photographic image stored in a default condition data base 150a according to the easiness of blurring. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明はデジタル写真画像、特にデジタルカメラにより取得されたデジタル写真画像に対してボケの判別、ボケの補正を行う画像処理方法および装置並びにそのためのプログラムに関するものである。   The present invention relates to an image processing method and apparatus for performing blur discrimination and blur correction on a digital photographic image, particularly a digital photographic image acquired by a digital camera, and a program therefor.

ネガフィルムやカラーリバーサルフィルムなどの写真フィルムに記録された写真画像をスキャナーなどの読取装置で光電的に読み取って得たデジタル写真画像や、デジタルスチルカメラ(DSC)で撮像して得たデジタル写真画像などに対して、種々の画像処理を施してプリントすることが行われている。これらの画像処理の一つとして、ボケた画像(ボケ画像)からボケを取り除くボケ画像修復処理が挙げられる。   Digital photographic images obtained by photoelectrically reading photographic images recorded on photographic films such as negative films and color reversal films with a reading device such as a scanner, and digital photographic images obtained by taking images with a digital still camera (DSC) For example, printing with various image processing is performed. As one of these image processes, there is a blurred image restoration process that removes a blur from a blurred image (blurred image).

被写体を撮像して得た写真画像がぼけてしまう理由としては、焦点距離が合わないことに起因するピンボケと、撮像者の手のぶれに起因するぶれボケ(以下略してぶれという)が挙げられる。ピンボケの場合には、点像が2次元的に広がり、すなわち写真画像上における広がりが無方向性を呈することに対して、ぶれの場合には、点像がある軌跡を描き画像上に1次元的に広がり、すなわち写真画像上における広がりがある方向性を呈する。   Reasons for blurring a photographic image obtained by capturing an image of a subject include out-of-focus due to the focal length being out of focus, and out-of-focus blur due to camera shake (hereinafter referred to as blurring). . In the case of out-of-focus, the point image spreads two-dimensionally, that is, the spread on the photographic image exhibits non-directionality, whereas in the case of blur, a locus with a point image is drawn on the image one-dimensionally. Spreads, that is, has a direction with a spread on a photographic image.

デジタル写真画像の分野において、従来、ボケ画像を修復するために、様々な方法が提案されている。写真画像の撮像時にぶれの方向やぶれ幅などの情報が分かれば、Wienerフィルタや逆フィルタなどの復元フィルタを写真画像に適用することにより修復ができることから、撮像時にぶれの方向やぶれ幅などの情報を取得することができる装置(例えば加速度センサー)を撮像装置に設け、撮像と共にぶれの方向やぶれ幅などの情報を取得し、取得された情報に基づいて修復を図る方法が広く知られている(例えば、特許文献1参照)。   In the field of digital photographic images, various methods have been conventionally proposed for restoring blurred images. If you know information such as blur direction and blur width when capturing a photographic image, you can restore it by applying a restoration filter such as a Wiener filter or inverse filter to the photographic image. There is widely known a method of providing an apparatus (for example, an acceleration sensor) that can be acquired in an imaging apparatus, acquiring information such as a blur direction and a blur width together with imaging, and performing repair based on the acquired information (for example, , See Patent Document 1).

また、例えば、特許文献2に記載されたように、ボケ画像(ボケがある画像)に対して劣化関数を設定し、設定された劣化関数に対応する復元フィルタでボケ画像を修復し、修復後の画像を評価し、評価の結果に基づいて劣化関数を再設定するようにして、所望の画質になるまで、修復、評価、劣化関数の再設定を繰り返すことによって修復を図る方法も知られている。   Further, for example, as described in Patent Document 2, a degradation function is set for a blurred image (an image with blur), and the blurred image is restored with a restoration filter corresponding to the set degradation function. A method is also known in which the image is evaluated, and the degradation function is reset based on the result of the evaluation, and the restoration is performed by repeating the restoration, evaluation, and resetting of the degradation function until the desired image quality is obtained. Yes.

一方、携帯電話の急激な普及に伴って、携帯電話機の機能が向上し、その中でも携帯電話付属のデジタルカメラ(以下略した携帯カメラという)の機能の向上が注目を浴びている。近年、携帯カメラの画素数が100万の桁に上がり、携帯カメラが通常のデジタルカメラと同様な使い方がされている。友達同士で旅行に行く時の記念写真などは勿論、好きなタレント、スポーツ選手を携帯カメラで撮像する光景が日常的になっている。このような背景において、携帯カメラにより撮像して得た写真画像は、携帯電話機のモニタで鑑賞することに留まらず、例えば、通常のデジタルカメラにより取得した写真画像と同じようにプリントすることも多くなっている。   On the other hand, with the rapid spread of mobile phones, the functions of mobile phones have improved, and among them, the improvement of the functions of digital cameras attached to mobile phones (hereinafter referred to as mobile cameras) has been attracting attention. In recent years, the number of pixels of a portable camera has increased to one million, and the portable camera is used in the same way as a normal digital camera. Of course, commemorative photos when traveling with friends, as well as scenes of picking up favorite talents and athletes with a portable camera, are becoming commonplace. In such a background, a photographic image obtained by capturing with a mobile camera is not limited to being viewed on a monitor of a mobile phone, and for example, is often printed in the same manner as a photographic image acquired with a normal digital camera. It has become.

他方、携帯カメラは、人間工学的に、本体(携帯電話機)が撮像専用に製造されていないため、撮像時のホールド性が悪いという問題がある。また、携帯カメラは、フラッシュがないため、通常のデジタルカメラよりシャッタースピードが遅い。このような理由から携帯カメラにより被写体を撮像するときに、通常のカメラより手ぶれが起きやすい。極端な手ぶれは、携帯カメラのモニタで確認することができるが、小さな手ぶれは、モニタで確認することができず、プリントして初めて画像のぶれに気付くことが多いため、携帯カメラにより撮像して得た写真画像に対してぶれの補正を施す必要性が高い。   On the other hand, since the main body (mobile phone) is not manufactured exclusively for imaging, the portable camera has a problem of poor holdability during imaging. Moreover, since a portable camera does not have a flash, the shutter speed is slower than that of a normal digital camera. For these reasons, camera shake is more likely to occur when shooting a subject with a portable camera than with a normal camera. Extreme camera shake can be confirmed on the monitor of the portable camera, but small camera shake cannot be confirmed on the monitor, and often you will notice image blur for the first time after printing. There is a high need to perform blur correction on the obtained photographic image.

しかしながら、携帯電話機の小型化は、その性能、コストに並び、各携帯電話機メーカの競争の焦点の1つであり、携帯電話機付属のカメラに、ぶれの方向やぶれ幅を取得する装置を設けることが現実的ではないため、特許文献1に提案されたような方法は、携帯カメラに適用することができない。また、特許文献2に提案されたような方法は、劣化関数の設定、修復、評価、劣化関数の再設定・・・の処理を繰り返す必要があるため、処理時間がかかり、効率が良くないという問題がある。   However, downsizing of mobile phones is one of the focus of competition among mobile phone manufacturers, along with their performance and cost, and a camera attached to a mobile phone is provided with a device that acquires the direction and width of blur. Since it is not realistic, the method proposed in Patent Document 1 cannot be applied to a portable camera. Further, the method as proposed in Patent Document 2 needs to repeat the process of setting, repairing, evaluating the deterioration function, resetting the deterioration function, etc., so that it takes time and is not efficient. There's a problem.

そこで、特別な装置を撮像装置に設けることを必要とせずにデジタル写真画像からボケに関する情報を取得すると共に、デジタル写真画像に対してボケの補正を効率良く行うことが可能な方法としては、デジタル写真画像からエッジを検出し、これらのエッジのエッジ幅や、エッジ幅の分布を示すヒストグラムなどのエッジ特徴量を算出して、エッジ特徴量に基づいてデジタル写真画像におけるボケの状態(ボケの有無、ボケがある場合のボケの程度など)を判別して補正を行うことが考えられる。さらに、エッジを検出する際に、複数の異なる方向毎にエッジを検出し、各方向毎にエッジ特徴量を算出するようにすれば、このエッジ特徴量に基づいてボケの方向の判別(有方向と無方向の判別も含む)や、ボケの程度や、手ぶれの程度などを判別して補正を行うことができる。この方法は、ボケは画像中の点像の広がりを引き起こし、ボケがある画像に点像の広がりに応じたエッジの広がりが生じるため、画像中におけるエッジの広がりの態様は画像中におけるボケと直接関係することに着目したものである。
特開2002−112099号公報 特開平7−121703号公報
Therefore, as a method capable of acquiring blur-related information from a digital photographic image without requiring a special device to be provided in the imaging device, and correcting the blur efficiently for the digital photographic image, there is a digital method. Edges are detected from a photographic image, the edge widths of these edges and edge feature values such as a histogram showing the distribution of edge widths are calculated, and the blur state (the presence or absence of blur) in the digital photographic image is calculated based on the edge feature values. It is conceivable to perform correction by discriminating the degree of blur when there is blur. Further, when detecting an edge for each of a plurality of different directions and calculating an edge feature amount for each direction, the direction of blur is determined based on the edge feature amount (directional direction). Correction can be performed by determining the degree of blur, the degree of camera shake, and the like. In this method, the blur causes the spread of the point image in the image, and an edge spread occurs in the image with the blur according to the spread of the point image. Therefore, the edge spread mode in the image is directly different from the blur in the image. It focuses on the relationship.
Japanese Patent Laid-Open No. 2002-112099 JP-A-7-121703

しかしながら、デジタル写真画像を撮像する際に、シャッタースピードの速い遅いや、ストロボONかOFFかなどの撮像条件によって、撮像して得た画像にぶれがおきやすい確率(ぶれやすさ)が異なる。デジタル写真画像に対して異なる方向毎にエッジを検出し、検出されたエッジの特徴量に基づいてボケの状態の判別を行う上記の方法において、これらの撮像条件を視野に入れず、全てのデジタル写真画像に対して同じエッジ検出条件(検出するエッジの強度や、エッジを検出する方向や数など)と同じ判別条件(ボケの有無や、ボケの方向、ボケの程度、ぶれの程度などを判別するための条件)を用いてエッジの検出や、ボケの判別を行うようにすると、精度が欠けるという問題がある。   However, when a digital photographic image is captured, the probability (blurring ease) that the image obtained by the imaging is likely to be blurred differs depending on imaging conditions such as whether the shutter speed is fast and slow or whether the strobe is ON or OFF. In the above method in which edges are detected in different directions with respect to a digital photographic image, and the state of blur is determined based on the detected feature amount of the edge, all the digital images are not taken into consideration in the field of view. Discriminating the same edge detection conditions (intensity of edge to be detected, direction and number of edges to be detected, etc.) for photographic images (existence of blur, direction of blur, degree of blur, degree of blur, etc.) If the edge detection or blur determination is performed using the (conditions for performing the above), there is a problem that accuracy is lacking.

また、携帯電話機付属のデジタルカメラの場合、機種によってぶれやすさ(撮像時にぶれる確率)や、ぶれやすい方向(例えば縦撮りの機種は上下にぶれやすく、横撮りの機種が斜め方向にぶれやすい)が異なり、これらの機種の特性を用いてデジタル写真画像の補正の効果を高めることが希望されている。   In addition, in the case of a digital camera attached to a mobile phone, the ease of camera shake (probability of camera shake during shooting) and the direction in which camera shakes easily (for example, vertical camera models are likely to shake up and down, and horizontal camera models are likely to shake diagonally) However, it is desired to enhance the effect of correcting digital photographic images using the characteristics of these models.

また、人物などの主要被写体をアップにして撮像して得た被写界深度の浅い画像は、主要被写体の部分の画像を除いて、他の部分の画像がボケている。このような画像に対してエッジを検出してエッジの特徴量に基づいてボケの判別を行う際に画像全体を用いると、主要被写体がボケていない画像でもボケ画像として判別される可能性が高く、結果的に良い補正結果を得ることができないという問題がある。   In addition, an image with a shallow depth of field obtained by imaging a main subject such as a person is blurred in images of other portions except for the image of the main subject portion. When an edge is detected in such an image and the entire image is used when blur is determined based on the feature amount of the edge, it is highly possible that an image in which the main subject is not blurred is determined as a blurred image. As a result, there is a problem that a good correction result cannot be obtained.

また、例えばデジタルカメラを用いて撮像を行う際に、被写体を撮像して得た画像データが一度圧縮されてから出力(記録媒体への記録またはネットワークを介しての送信)されるようになっている。デジタル写真画像の圧縮の強度の大小に関わらず同じ判別条件を適用すると、後に判別の結果に基づいてボケ補正を行った結果、圧縮の強度の大きい画像は、圧縮の強度の小さい画像に比べて圧縮に起因するノイズが元々多いため、補正後の画像にはノイズが目立ってしまうという問題がある。   For example, when imaging using a digital camera, image data obtained by imaging a subject is compressed once before being output (recorded on a recording medium or transmitted via a network). Yes. If the same discrimination condition is applied regardless of the compression strength of a digital photographic image, blur correction based on the discrimination results will result in an image with a high compression strength compared to an image with a low compression strength. Since there is originally a lot of noise due to compression, there is a problem that noise becomes conspicuous in the corrected image.

本発明は、上記事情に鑑み、デジタル写真画像におけるエッジの特徴量を取得し、このエッジ特徴量に基づいてボケの判別を精度良く行うことができ、判別されたボケを補正して良い補正効果を得ることができる画像処理方法および装置並びにそのためのプログラムを提供することを目的とするものである。   In view of the above circumstances, the present invention obtains edge feature amounts in a digital photographic image, can accurately determine blur based on the edge feature amounts, and can correct the determined blur. An object of the present invention is to provide an image processing method and apparatus capable of obtaining the above and a program therefor.

本発明の画像処理方法は、デジタル写真画像に対して、所定のエッジ検出条件でエッジを検出し、
検出された前記エッジの特徴量を取得し、
該エッジ特徴量を用いて前記デジタル写真画像におけるボケの状態を所定の判別条件に基づいて判別する画像処理方法において、
前記デジタル写真画像の撮像条件を示す撮像条件情報を取得し、
該撮像条件情報に基づいて前記エッジ検出条件および/または前記判別条件を設定することを特徴とするものである。
The image processing method of the present invention detects an edge under a predetermined edge detection condition for a digital photographic image,
Obtain the feature amount of the detected edge,
In the image processing method for determining a blur state in the digital photographic image based on a predetermined determination condition using the edge feature amount,
Obtaining imaging condition information indicating imaging conditions of the digital photographic image;
The edge detection condition and / or the determination condition is set based on the imaging condition information.

また、前記検出は、複数の異なる方向毎に行われるものであり、前記エッジの特徴量は、各前記方向に対して取得されるものであり、前記ボケの状態は、少なくともボケ方向を含むものであることが好ましい。   The detection is performed for each of a plurality of different directions, the feature amount of the edge is acquired for each of the directions, and the blur state includes at least the blur direction. It is preferable.

本発明の画像処理方法において、前記判別の結果に基づいて前記ボケを補正するためのパラメータを設定し、該パラメータを用いて前記デジタル写真画像を補正することができる。   In the image processing method of the present invention, a parameter for correcting the blur can be set based on the determination result, and the digital photographic image can be corrected using the parameter.

本発明の画像処理装置は、所定のエッジ検出条件でエッジを検出するエッジ検出手段と、
検出された前記エッジの特徴量を取得するエッジ特徴量取得手段と、
該エッジ特徴量を用いて前記デジタル写真画像におけるボケの状態を所定の判別条件に基づいて判別するボケ判別手段とを有する画像処理装置において、
前記デジタル写真画像の撮像条件を示す撮像条件情報を取得する撮像条件情報取得手段と、
該撮像条件情報に基づいて前記エッジ検出条件および/または前記判別条件を設定する条件設定手段とを備えたことを特徴とするものである。
An image processing apparatus according to the present invention includes an edge detection unit that detects an edge under a predetermined edge detection condition;
Edge feature quantity acquisition means for acquiring a feature quantity of the detected edge;
An image processing apparatus having a blur determination unit that determines a blur state in the digital photographic image based on a predetermined determination condition using the edge feature amount.
Imaging condition information acquisition means for acquiring imaging condition information indicating an imaging condition of the digital photographic image;
And a condition setting means for setting the edge detection condition and / or the discrimination condition based on the imaging condition information.

また、前記検出手段は、複数の異なる方向毎に前記検出を行うものであり、
前記エッジ特徴量取得手段は、各前記方向に対して前記エッジ特徴量を取得するものであり、
前記ボケの状態は、少なくともボケ方向を含むものであることが好ましい。
The detection means performs the detection for each of a plurality of different directions.
The edge feature amount acquisition means acquires the edge feature amount for each of the directions,
The blur state preferably includes at least a blur direction.

本発明の画像処理装置は、前記ボケ判別手段による判別の結果に基づいて前記ボケを補正するためのパラメータを設定するパラメータ設定手段と、該パラメータを用いて前記デジタル写真画像を補正する補正手段とをさらに備えてもよい。   The image processing apparatus according to the present invention includes a parameter setting unit that sets a parameter for correcting the blur based on a determination result by the blur determination unit, and a correction unit that corrects the digital photographic image using the parameter. May be further provided.

ここで、「エッジ特徴量」は、デジタル写真画像におけるエッジの広がりの態様と関係する特徴量を意味し、例えば、前記エッジの鮮鋭度、および前記エッジの鮮鋭度の分布を含むものとすることができる。   Here, the “edge feature value” means a feature value related to an aspect of edge spread in a digital photographic image, and may include, for example, the edge sharpness and the edge sharpness distribution. .

ここで、「エッジの鮮鋭度」は、エッジの鮮鋭さを現すことができるものであれば如何なるパラメータを用いてもよく、例えば、図3のエッジプロファイルにより示されるエッジの場合、エッジ幅が大きいほどエッジの鮮鋭度が低いように、エッジ幅をエッジの鮮鋭度として用いることは勿論、エッジの明度変化の鋭さ(図3におけるプロファイル曲線の勾配)が高いほどエッジの鮮鋭度が高いように、エッジのプロファイル曲線の勾配をエッジの鮮鋭度として用いるようにしてもよい。   Here, as the “edge sharpness”, any parameter can be used as long as it can express the sharpness of the edge. For example, in the case of the edge shown by the edge profile in FIG. 3, the edge width is large. The edge width is used as the edge sharpness so that the edge sharpness is low, as well as the edge brightness change sharpness (the gradient of the profile curve in FIG. 3) is high so that the edge sharpness is high. The gradient of the edge profile curve may be used as the edge sharpness.

また、「ボケ」は、無方向性のボケすなわちピンボケと、有方向性のボケすなわちぶれがあり、ぶれの場合は、ボケ方向がぶれ方向に相当し、ピンボケの場合において、その「ボケ方向」は「無方向」となる。本発明において、「無方向」もボケの方向とする。   In addition, “blurring” includes non-directional blurring or out-of-focus blur and directional blurring or blurring. In the case of blur, the blur direction corresponds to the blur direction. Becomes “no direction”. In the present invention, “no direction” is also defined as a blur direction.

また、「複数の異なる方向」とは、デジタル写真画像におけるボケの方向の特定を可能とするための方向を意味し、ボケの方向に近い方向を含むことが必要であるため、その数が多ければ多いほど特定の精度が高いが、処理速度との兼ね合いに応じた適宜な個数を用いることが好ましい。   In addition, “a plurality of different directions” means directions for enabling specification of the direction of blur in a digital photographic image, and it is necessary to include directions close to the direction of blur, so the number is large. The greater the number, the higher the specific accuracy, but it is preferable to use an appropriate number according to the balance with the processing speed.

また、「エッジ検出条件」は、前記エッジを検出する複数の方向は勿論、検出するエッジを規定するいかなる条件であってもよい。   The “edge detection condition” may be any condition that defines the edge to be detected as well as a plurality of directions in which the edge is detected.

デジタル写真画像におけるボケを補正するために、前記ボケの方向は重要な情報である。例えば、ボケ方向(無方向またはぶれの方向)が分かれば、補正用の前記パラメータを設定する際に、ピンボケの場合には等方性補正用の等方性補正パラメータを、ぶれの場合には方向性補正用の方向性補正パラメータを設定するようにすることができる。なお、「等方性補正」とは、各方向に対して同等に作用する補正を意味し、「方向性補正」とは、所定の方向にのみ作用する補正あるいは方向により作用が異なる補正を意味する。一方、ボケが、エッジの広がりとして画像に現れるため、ボケを補正する方法としては、従来公知の、画像の鮮鋭度を向上させるための補正方法、例えば、USM(アン・シャープネス・マスキング)などを用いることができる。前記補正のパラメータを設定する際に、所用の補正方法に応じてパラメータを設定する。例えば、補正の方法としてUSMを用いる場合に、等方性補正パラメータとして等方性補正マスクを設定し、方向性補正のパラメータとしては前記ぶれ方向に作用する方向性補正マスクを設定するようにすればよい。   In order to correct blur in a digital photographic image, the direction of the blur is important information. For example, if the blur direction (no direction or blur direction) is known, when setting the parameters for correction, the isotropic correction parameter for isotropic correction in the case of blurring, Directionality correction parameters for directionality correction can be set. “Isotropic correction” means correction that works equally in each direction, and “directional correction” means correction that works only in a predetermined direction or correction that works differently depending on the direction. To do. On the other hand, since blur appears in the image as the spread of the edge, a conventionally known correction method for improving the sharpness of the image, for example, USM (Unsharpness Masking) is used as a method for correcting the blur. Can be used. When setting the correction parameters, the parameters are set according to the required correction method. For example, when USM is used as a correction method, an isotropic correction mask is set as an isotropic correction parameter, and a directionality correction mask that operates in the blur direction is set as a directionality correction parameter. That's fine.

本発明における前記「判別条件」は、少なくとも前記デジタル写真画像のボケ方向を判別するための条件であり、前記ボケの程度の大小や、ぶれの程度の大小などを判別するための条件が含まれてもよい。   The “discrimination condition” in the present invention is a condition for determining at least the blur direction of the digital photographic image, and includes a condition for determining the degree of blur, the degree of blur, and the like. May be.

本発明において、前記「撮像条件情報」とは、前記デジタル写真画像を撮像する際の条件のうち、前記ボケの判別、前記ボケを補正することと関係する条件を示す情報を意味し、例えば、前記デジタル写真画像を撮像した際に該デジタル写真画像に有方向性のボケとなるぶれをもたらす確率の大きさを示すぶれやすさおよび/または前記ぶれが起きやすい方向を示すぶれやすい方向情報を含むものとすることができ、この場合、前記条件設定手段は、該ぶれやすさおよび/または前記ぶれやすい方向情報に基づいて前記エッジ検出条件および/または前記判別条件を設定するものとなる。   In the present invention, the “imaging condition information” means information indicating conditions relating to the determination of the blur and the correction of the blur among the conditions when the digital photographic image is captured. When the digital photographic image is picked up, the digital photographic image includes the blurring property indicating the probability of causing blurring that causes directional blur and / or the blurring direction information indicating the direction in which the blurring easily occurs. In this case, the condition setting means sets the edge detection condition and / or the determination condition based on the ease of shaking and / or the direction information that easily shakes.

ここで、前記撮像条件情報取得手段は、前記デジタル写真画像に付属されたタグ情報に基づいて前記ぶれやすさおよび/または前記ぶれやすい方向情報を取得するものとすることができる。   Here, the imaging condition information acquisition unit may acquire the ease of blurring and / or the direction information easily blurring based on tag information attached to the digital photographic image.

デジタル写真画像にはタグ情報が付属されているとき、このタグ情報には該デジタル写真画像を撮像した撮像条件を示す情報が含まれている場合が多い。これらの情報のうち、本発明における撮像条件情報の例として、シャッタースピード、ストロボのON/OFF、ISO感度、被写体の明るさを示すEV値、ズーム撮像か否かなどを挙げることができる。   When tag information is attached to a digital photograph image, the tag information often includes information indicating an imaging condition for capturing the digital photograph image. Among these pieces of information, examples of imaging condition information in the present invention include shutter speed, strobe ON / OFF, ISO sensitivity, EV value indicating the brightness of the subject, and whether or not zoom imaging is performed.

例えば、シャッタースピードが遅いと手ぶれが生じやすいので、シャッタースピードの遅さを前記ぶれやすさとすることができる。すなわち、シャッタースピードが遅いほど、前記ぶれやすさが大きい。   For example, camera shake is likely to occur when the shutter speed is slow, and thus the slowness of the shutter speed can be set as the ease of camera shake. That is, the slower the shutter speed, the greater the likelihood of blurring.

また、ストロボONのときはシャッタースピードが遅くなるので、ストロボOFFの場合よりもストロボONの場合のぶれやすさが大きい。   In addition, since the shutter speed is slow when the strobe is on, the degree of blurring when the strobe is on is greater than when the strobe is off.

同様に、ISO感度や、被写体の明るさ(EV値)も、シャッタースピードと関係するものであり、これらの条件に基づいてぶれやすさを取得することができる。例えば、ISO感度が低いとシャッタースピードが遅くなるので、ISO感度が低いほどぶれやすさが大きいように前記ぶれやすさを取得することができ、被写体の明るさが低い(EV値が小さい)とシャッタースピードが遅くなるので、EV値が小さい方ほどぶれやすさが大きいように前記ぶれやすさを取得することができる。   Similarly, the ISO sensitivity and the brightness (EV value) of the subject are also related to the shutter speed, and the ease of blurring can be acquired based on these conditions. For example, when the ISO sensitivity is low, the shutter speed is slowed down. Therefore, the lower the ISO sensitivity, the higher the blur sensitivity can be acquired, and the brightness of the subject is low (the EV value is small). Since the shutter speed becomes slow, the ease of blur can be acquired so that the smaller the EV value, the greater the blur.

また、ズーム撮像の場合とズーム撮像ではない場合とにおいて、撮像者が撮像時に同じ程度の手ぶれをしても、ズーム撮像して得た画像の方にぶれの程度が大きい。すなわち、いわゆる撮像者の手ぶれのし易さではないが、画像中にぶれの生じ易さを画像のぶれやすさとし、ズーム撮像ではない画像より、ズーム撮像の画像のほうが大きいように取得することができる。   In addition, in the case of zoom imaging and in the case of non-zoom imaging, even if the photographer shakes the same degree at the time of imaging, the degree of blurring is larger in the image obtained by zoom imaging. In other words, it is not so easy for the photographer to shake, but it is assumed that the ease of blurring in the image is the blur of the image, and that the zoomed image is larger than the image that is not zoomed. it can.

また、携帯電話機付属のデジタルカメラ(以下携帯カメラという)により取得されたデジタル写真画像の場合、前記タグ情報が付属されていないか、タグ情報に含まれている情報が少ないので、前記ぶれやすさおよび/または前記ぶれやすい方向情報を取得する際に、前記デジタル写真画像を撮像した前記携帯電話機の機種情報に基づいて取得すればよい。   In addition, in the case of a digital photographic image acquired by a digital camera attached to a mobile phone (hereinafter referred to as a mobile camera), the tag information is not attached or there is little information included in the tag information, so And / or when acquiring the direction information that is likely to be shaken, it may be acquired based on the model information of the mobile phone that has captured the digital photographic image.

例えば、携帯電話機の機種と、該機種の携帯電話機付属のデジタルカメラのぶれやすさとの対応関係をデータベースに予め設定しておき、デジタル写真画像を取得した携帯電話機(正確には該携帯電話機付属のデジタルカメラ)の機種情報(機種を示す情報)を取得し、前記データベースを参照することによってこのデジタル写真画像のぶれやすさを取得するようにすればよい。   For example, a correspondence relationship between the model of a mobile phone and the blurring of a digital camera attached to the mobile phone of the model is set in advance in a database, and the mobile phone (to be exact, the mobile phone attached to the mobile phone) is acquired. Digital camera) model information (information indicating the model) may be acquired, and the ease of blurring of the digital photographic image may be acquired by referring to the database.

また、携帯電話機の機種情報は、操作者によって手動で入力するようにしてもいが、携帯カメラで撮像した写真画像は、その携帯電話機から直接送信されることがほとんどである。この場合、その携帯電話機の電話番号から機種情報を取得するようにしてもよい。   In addition, the model information of the mobile phone may be manually input by an operator, but the photographic image captured by the mobile camera is almost directly transmitted from the mobile phone. In this case, model information may be acquired from the telephone number of the mobile phone.

また、携帯電話機の機種情報からぶれやすさを取得する以外に、携帯電話機の機種情報に基づいて撮像時にぶれが起きやすい方向を示すぶれやすい方向情報を取得することもできる。例えば、携帯電話機の機種と、該機種の携帯電話機を用いて撮像する(正確には携帯電話機付属のデジタルカメラを用いて撮像する)際に携帯電話機を縦にして撮像(縦撮り)するか横にして撮像(横撮り)するかの情報との対応関係を予めデータベースに設定しておき、デジタル写真画像を撮像した携帯電話機の機種情報に基づいてデータベースを参照して前述の縦撮りか横撮りかの情報を取得すると共に、縦撮りの場合には上下方向のぶれがおきやすく、横撮りの場合には前記上下方向と横方向との間の斜め方向にぶれが起きやすいことを利用して前記ぶれやすい方向情報を取得すればよい。   In addition to acquiring the ease of shaking from the model information of the mobile phone, it is also possible to acquire the direction information that indicates the direction in which the camera is likely to shake during imaging based on the model information of the mobile phone. For example, when taking a picture with a mobile phone model and using the mobile phone of that model (to be precise, using a digital camera attached to the mobile phone), the mobile phone is taken vertically (taken vertically) or horizontally. The correspondence relationship with the information on whether to shoot (horizontal shooting) is set in the database in advance, and the above-described vertical shooting or horizontal shooting is performed by referring to the database based on the model information of the mobile phone that picked up the digital photo image In the case of vertical shooting, and in the case of horizontal shooting, it is easy to cause blurring between the vertical direction and the horizontal direction. What is necessary is just to acquire the direction information which is easy to shake.

また、強度の低いエッジは、ノイズである可能性が高く、また人間は強度の高いエッジの状態によりボケを認識するので、本発明の画像処理装置において、前記エッジ検出手段は、所定の閾値以上の強度を有するエッジのみを検出するものであることが好ましく、この場合、前記エッジ検出条件が前記所定の閾値を含むものであり、前記条件設定手段が、前記ぶれやすさが大きいほど前記所定の閾値を小さく設定するものとすることができる。   Further, an edge with low intensity is highly likely to be noise, and a human recognizes blur based on the state of the edge with high intensity. Preferably, the edge detection condition includes the predetermined threshold value. In this case, the condition setting means increases the degree of blurring and increases the predetermined value. The threshold value can be set small.

さらに、前記エッジ検出条件が前記エッジ検出手段においてエッジを検出する前記複数の異なる方向および前記各方向に夫々対応する所定のエッジの強度の閾値を含むものであり、前記エッジ検出手段は、各前記方向毎に該方向に対応する前記所定の閾値以上の強度を有するエッジのみを検出するものであり、前記条件設定手段は、前記ぶれやすい方向に近い前記方向ほど該方向に対応する前記閾値を小さく設定するものであるが好ましい。   Further, the edge detection condition includes a plurality of different directions for detecting an edge in the edge detection means, and a threshold value of a predetermined edge intensity corresponding to each of the directions. For each direction, only edges having an intensity equal to or higher than the predetermined threshold corresponding to the direction are detected, and the condition setting unit decreases the threshold corresponding to the direction as the direction is closer to the blurring direction. This is preferably set.

また、ボケ判別の取得に関連性が低いエッジや、ボケ情報の取得を困難にしたり、間違ったボケ判別をさせたりする可能性のあるエッジ(例えば、形状が複雑なエッジや、光源を含むエッジなど)を無効なエッジとして除去することが望ましく、本発明の画像処理装置において、前記エッジ検出条件が、前記エッジが無効なエッジか否かを判別するための無効エッジ判別受験を含むものであり、前記エッジ検出手段が、検出された前記エッジから、前記無効エッジ判別条件を満たすエッジを無効エッジとして除去する無効エッジ除去手段を備え、前記条件設定手段が、前記ぶれやすさが大きいほど、前記無効エッジ判別条件を厳しく設定するものであることが好ましい。   Also, edges that are not related to acquisition of blur detection, edges that may make it difficult to acquire blur information, or may cause incorrect blur detection (for example, edges with complex shapes or edges that include a light source) In the image processing apparatus according to the present invention, the edge detection condition includes an invalid edge determination test for determining whether the edge is an invalid edge or not. The edge detection means comprises invalid edge removal means for removing, as the invalid edge, an edge that satisfies the invalid edge determination condition from the detected edge, and the condition setting means It is preferable that the invalid edge determination condition is strictly set.

さらに、前記エッジ検出条件が、前記エッジ検出手段においてエッジを検出する前記複数の異なる方向および前記各方向に夫々対応する前記エッジが無効なエッジか否かを判別するための無効エッジ判別条件を含むものであり、前記エッジ検出手段が、各前記方向毎に検出された前記エッジから、該方向に対応する前記無効エッジ判別条件を満たすエッジを無効エッジとして除去するエッジ除去手段を備えたものであり、前記条件設定手段が、前記ぶれやすい方向に近い前記方向ほど該方向に対応する前記無効エッジ判別条件を厳しく設定するものであることが好ましい。   Further, the edge detection condition includes an invalid edge determination condition for determining whether the edge corresponding to each of the plurality of different directions and each direction in which the edge detection unit detects an edge is an invalid edge. And the edge detection means includes edge removal means for removing, as an invalid edge, an edge that satisfies the invalid edge determination condition corresponding to the direction from the edge detected in each direction. It is preferable that the condition setting means sets the invalid edge determination condition corresponding to the direction more strictly in the direction closer to the blurring direction.

また、前記条件設定手段は、前記ぶれやすさが大きいほど前記エッジを検出する前記複数の異なる方向の数を増やすものであることが好ましい。   Moreover, it is preferable that the said condition setting means increases the number of the said different directions which detect the said edge, so that the said ease of shaking is large.

また、前記条件設定手段は、前記複数の異なる方向を設定する際に、前記ぶれやすい方向に近いほど前記方向の数を増やすものであることが好ましい。   Moreover, it is preferable that the said condition setting means increases the number of the said direction, so that it is near the said direction which is easy to shake, when setting the said several different direction.

本発明の画像処理装置は、前記ボケ判別手段が、前記ボケが有方向性のぶれである程度を示すぶれ度も判別するものであり、
前記判別条件が、前記ぶれ度を判別するためのぶれ度判別条件を含むものであり、
前記条件設定手段が、前記ぶれやすさが大きいほど前記ぶれ度判別条件を緩和に設定するものであることが好ましい。
In the image processing apparatus of the present invention, the blur determination unit also determines a degree of blur indicating a certain degree of blur due to directional blur.
The determination condition includes a blur degree determination condition for determining the blur degree,
It is preferable that the condition setting means sets the blur degree determination condition to be relaxed as the degree of blur is large.

本発明の画像処理装置は、前記ボケ判別手段が、前記ボケの程度の大小を示すボケ度も判別するものであり、
前記判別条件が、前記ボケ度を判別するためのボケ度判別条件を含むものであり、
前記条件設定手段が、前記ぶれやすさが大きいほど前記ボケ度判別条件を緩和に設定するものであることが好ましい。
In the image processing apparatus of the present invention, the blur determination unit also determines a degree of blur indicating the magnitude of the blur.
The determination condition includes a blur degree determination condition for determining the blur degree,
It is preferable that the condition setting unit sets the blur degree determination condition to be relaxed as the blur easily increases.

本発明の画像処理装置は、前記パラメータ設定手段と前記補正手段が、前記ボケ度が所定の閾値以上の前記デジタル写真画像に対してのみ、前記パラメータの設定および前記補正を行うものであり、
前記条件設定手段が、前記ぶれやすさが大きいほど前記所定の閾値を小さく設定するものであることが好ましい。
In the image processing apparatus of the present invention, the parameter setting unit and the correction unit perform the setting of the parameter and the correction only for the digital photograph image in which the degree of blur is equal to or greater than a predetermined threshold.
It is preferable that the condition setting means sets the predetermined threshold value smaller as the degree of blur is greater.

本発明における前記撮像条件情報が、前記デジタル写真画像を撮像した撮像装置のレンズのF値を含むものとすることができ、この場合、前記エッジ検出条件が、前記デジタル写真画像においてエッジを検出する領域を示すエッジ検出領域情報を含むものであり、
前記エッジ検出手段が、前記領域においてのみ前記エッジの検出を行うものであり、
前記条件設定手段が、前記F値が所定の閾値以下である前記デジタル写真画像に対して、前記領域を該デジタル写真画像の中央部分に設定するものであることが好ましい。
The imaging condition information in the present invention may include an F value of a lens of an imaging apparatus that has captured the digital photographic image. In this case, the edge detection condition is a region for detecting an edge in the digital photographic image. Including edge detection area information to indicate,
The edge detection means detects the edge only in the region;
It is preferable that the condition setting means sets the region in a central portion of the digital photographic image with respect to the digital photographic image in which the F value is equal to or less than a predetermined threshold.

デジタル写真画像のうち、人物をアップにして撮像して得たものなど被写界深度の浅い画像があり、このような被写界深度の浅い画像において、主要被写体さえボケていなければよく、主要被写体以外の部分がほとんどボケているため、画像全体においてエッジを検出してボケの判別を行うと、主要被写体がボケていない画像もボケた画像として誤判別される。そのため、被写界深度の浅い画像の場合には、前記エッジを検出する領域として前記主要被写体の部分を用い、この部分の画像からエッジを検出してボケの判別することが好ましい。写真画像において、主要被写体が中央部分に位置することが多いため、被写界深度の浅い画像に対して、エッジを検出する領域を画像の中央部分に設定することができる。また、デジタル写真画像を撮像した撮像装置のF値が、該デジタル写真画像の被写界深度を示すものとすることができるため、ここでは、所定の閾値(例えば5.6)以下のF値のデジタル写真画像を被写界深度の浅い画像として判別すればよい。   There are images with shallow depth of field, such as those obtained by taking a person up, among the digital photographic images. In such images with shallow depth of field, even if the main subject is not blurred, Since the part other than the subject is almost blurred, when the edge is detected in the entire image and the blur is determined, an image in which the main subject is not blurred is also erroneously determined as a blurred image. Therefore, in the case of an image with a shallow depth of field, it is preferable to use the main subject portion as a region for detecting the edge, and detect the edge from the image of this portion to determine blur. In a photographic image, since the main subject is often located in the central portion, an edge detection region can be set in the central portion of the image for an image having a shallow depth of field. In addition, since the F value of the imaging device that captured the digital photographic image can indicate the depth of field of the digital photographic image, the F value below a predetermined threshold (for example, 5.6) is used here. The digital photographic image may be determined as an image having a shallow depth of field.

また、同じく被写体深度の視点から、ズーム撮像の画像の被写体深度はズーム撮像ではない画像の被写体深度より浅いため、ズーム撮像か否かを撮像条件として取得した場合には、ズーム撮像の画像に対して、エッジを検出する領域を画像の中央部分に設定するようにすることが好ましい。   Similarly, from the viewpoint of the subject depth, the subject depth of the zoomed image is shallower than the subject depth of the image that is not zoomed. Thus, it is preferable to set the edge detection region at the center of the image.

また、本発明において、「撮像」とは、シャッターが押下されてから、画像データが出力(内部メモリやメモリカードなどの記録媒体への記録または通信手段でネットワークを介しての送信など)されるまでの処理を意味し、出力する際の圧縮処理を含むものであり、「撮像条件」は、デジタル写真画像が出力される際の圧縮の強度(圧縮強度)を含むものである。例えば、デジタルカメラの場合、撮像する前の撮像条件の設定として、圧縮強度に関する設定として、「fine」、「normal」、「economy」が設定できる機種があり、これらの設定は夫々圧縮強度が「小」、「普通」、「大」に対応するものである。また、圧縮強度の設定ができない機種でも、その機種においては圧縮強度が一意に設定されている。本発明の画像処理装置は、このような圧縮強度もデジタル写真画像の撮像条件として取得し、前記ボケ判別手段が、前記ボケの程度の大小を示すボケ度も判別するものであり、
前記判別条件が、前記ボケ度を判別するためのボケ度判別条件を含むものであり、
前記条件設定手段が、前記圧縮強度が大きいほど前記ボケ度判別条件を厳しく設定するものであることが好ましい。
In the present invention, “imaging” means that image data is output (recorded on a recording medium such as an internal memory or a memory card, or transmitted via a network by a communication means) after the shutter is pressed. The “imaging condition” includes the compression strength (compression strength) when a digital photographic image is output. For example, in the case of a digital camera, there are models in which “fine”, “normal”, and “economy” can be set as settings relating to the compression strength as the setting of the imaging conditions before imaging, and these settings each have a compression strength of “ It corresponds to “small”, “normal”, and “large”. Further, even in a model in which the compression strength cannot be set, the compression strength is uniquely set in the model. The image processing apparatus of the present invention acquires such compression strength as an imaging condition for a digital photographic image, and the blur determination unit also determines a degree of blur indicating the degree of blur.
The determination condition includes a blur degree determination condition for determining the blur degree,
It is preferable that the condition setting unit sets the blur degree determination condition more severely as the compression strength increases.

本発明の画像処理装置は、前記ボケ判別手段による判別の結果に基づいて前記ボケを補正するためのパラメータを設定するパラメータ設定手段と、
該パラメータを用いて前記デジタル写真画像を補正する補正手段とを備え、
前記ボケ判別手段が、前記ボケの程度の大小を示すボケ度も判別するものであり、
前記パラメータ設定手段と前記補正手段が、前記ボケ度が所定の閾値以上の前記デジタル写真画像に対してのみ、前記パラメータの設定および前記補正を行うものであり、
前記条件設定手段が、該所定の閾値も設定するものであり、前記圧縮強度が大きいほど該所定の閾値を大きく設定するようにするものであってもよい。
The image processing apparatus according to the present invention includes a parameter setting unit that sets a parameter for correcting the blur based on a determination result by the blur determination unit;
Correction means for correcting the digital photographic image using the parameter,
The blur determining means also determines a degree of blur indicating the degree of the blur;
The parameter setting unit and the correction unit perform the setting of the parameter and the correction only for the digital photograph image in which the degree of blur is equal to or greater than a predetermined threshold,
The condition setting means may also set the predetermined threshold, and the predetermined threshold may be set larger as the compression strength increases.

また、本発明の画像処理方法を、コンピュータに実行させるプログラムとして提供するようにしてもよい。   The image processing method of the present invention may be provided as a program that causes a computer to execute the image processing method.

本発明の画像処理方法および装置によれば、デジタル写真画像から該デジタル写真画像におけるボケの状態の判別を行う際に、デジタル写真画像を撮像した際の撮像条件情報を取得し、該撮像条件情報がデジタル画像のぶれやすさや、ぶれやすい方向などを反映することを利用して撮像条件情報に基づいてボケを判別するためのエッジ検出の条件や、通常画像かボケ画像かを判別するための条件や、ぶれの判別を行うための条件などを調整するようにすることによって、判別の精度を高めることができる。   According to the image processing method and apparatus of the present invention, when determining the blur state in the digital photographic image from the digital photographic image, the imaging condition information when the digital photographic image is captured is acquired, and the imaging condition information For detecting blur based on imaging condition information by reflecting the ease of blurring and the direction of blurring of digital images, and conditions for discriminating between normal and blurred images In addition, the accuracy of the discrimination can be improved by adjusting the conditions for discriminating the blur.

また、撮像条件情報により反映される画像の被写界深度に基づいて、被写界深度の浅い画像に対して主要被写体領域である可能性の高い中央部分をエッジを検出する領域に限定することによって、被写界深度の浅い画像の場合においてもボケの判別の精度を高めることができる。   Also, based on the depth of field of the image reflected by the imaging condition information, the central portion that is likely to be the main subject region is limited to the region where the edge is detected with respect to the image having a shallow depth of field. Thus, even in the case of an image with a shallow depth of field, it is possible to increase the accuracy of blur determination.

携帯電話機付属のデジタルカメラにより取得された携帯電話機の機種情報を取得し、該機種情報に基づいて画像のぶれやすさや、画像におけるぶれの生じやすい方向を得ると共に、ぶれやすさが高い画像ほどエッジを検出する方向を増やしたり、ぶれやすい方向に近いほどエッジを検出する方向を増やしたりするなどしてエッジ検出条件を調整することによって、ボケの判別の精度を上げることができる。   Acquires the model information of the cellular phone acquired by the digital camera attached to the cellular phone, obtains the direction of image blurring and the direction in which blurring is likely to occur based on the model information, and the higher the blurring image, the more the edge By adjusting the edge detection condition by increasing the direction in which the image is detected, or increasing the direction in which the edge is detected as the direction is more likely to blur, the accuracy of blur determination can be increased.

そのため、判別の結果に基づいてボケを補正するためのパラメータを設定して補正する際に、ボケの判別の精度が良いので、良い補正効果を得ることができる。   Therefore, when setting and correcting a parameter for correcting blur based on the determination result, the accuracy of blur determination is good, and a good correction effect can be obtained.

以下、図面を参照して、本発明の実施形態について説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の画像処理方法および装置並びにそのためのプログラムの第1の実施形態となる画像処理システムAの構成を示すブロック図である。図1に示す画像処理システムAは、デジタルカメラにより取得した写真画像(以下略して単に画像という)を記録した記録媒体1から画像を読み出して画像処理を行うものであり、記録媒体1には多数の画像からなる画像群が記録されているが、ここでは、この画像群のうちの1つの画像Dを例にして説明を行う。   FIG. 1 is a block diagram showing a configuration of an image processing system A which is a first embodiment of an image processing method and apparatus and a program therefor according to the present invention. An image processing system A shown in FIG. 1 performs image processing by reading an image from a recording medium 1 on which a photographic image (hereinafter simply referred to as an image) acquired by a digital camera is recorded. An image group consisting of the images is recorded. Here, one image D of the image group will be described as an example.

図示のように、本実施形態の画像処理システムAは、記録媒体1から読み出された画像Dに対してエッジ検出条件と判別条件を設定して後述するエッジ検出手段12aと解析手段20aに夫々送信する条件設定手段100aと、画像Dに対して縮小処理を行って画像Dの縮小画像D0を得る縮小手段10aと、縮小画像D0および画像Dを用いて、条件設定手段100aにより設定されたエッジ検出条件に含まれる複数の異なる方向毎にエッジを検出するエッジ検出手段12aと、エッジ検出手段12aにより得られたエッジの特徴量Sを取得するエッジ特徴量取得手段16aと、エッジ特徴量Sを用いて、画像Dにおけるボケ方向および画像Dのボケ度Nを算出して画像Dがボケ画像か通常画像かを判別し、通常画像の場合には、後述する出力手段60aに画像Dが通常画像であることを示す情報Pを送信して処理を終了する一方、ボケ画像の場合には、さらに画像Dのぶれ度K、ボケ幅Lを算出して、ボケ度Nと共にボケ情報Qとして後述するパラメータ設定手段30aに送信する解析手段20aと、解析手段20aからのボケ情報Qに基づいてボケ画像となる画像Dを補正するためのパラメータEを複数(E0、E1、E2、・・・)設定するパラメータ設定手段30aと、パラメータE0、E1、E2、・・・を用いて画像Dに対して補正を行って、各パラメータに対応する補正済み画像D’0、D’1、D’2、・・・を得る補正手段40aと、各々の補正済み画像D’0、D’1、D’2、・・・から目的画像D’を決定して出力手段60aに出力する決定手段45aと、解析手段20aおよびパラメータ設定手段30aのための種々のデータベースを記憶した記憶手段50aと、解析手段20aから画像Dが通常画像であることを示す情報Pを受信した場合には画像Dを出力する一方、決定手段45aから目的画像D’を受信した場合には目的画像D’を出力する出力手段60aとを有してなる。なお、エッジ検出手段12aには、無効なエッジを除去するエッジ絞込手段14aが備えられている。   As shown in the figure, the image processing system A according to the present embodiment sets edge detection conditions and discrimination conditions for an image D read from the recording medium 1, and sets the edge detection means 12a and analysis means 20a to be described later. Condition setting means 100a for transmitting, reduction means 10a for performing reduction processing on image D to obtain reduced image D0 of image D, and edge set by condition setting means 100a using reduced image D0 and image D Edge detection means 12a for detecting an edge for each of a plurality of different directions included in the detection condition, edge feature quantity acquisition means 16a for obtaining the edge feature quantity S obtained by the edge detection means 12a, and edge feature quantity S The blur direction in the image D and the blur degree N of the image D are calculated to determine whether the image D is a blur image or a normal image. Information P indicating that the image D is a normal image is transmitted to the force unit 60a and the process is terminated. On the other hand, in the case of a blurred image, the blur degree K and the blurred width L of the image D are further calculated, An analysis unit 20a that transmits to the parameter setting unit 30a, which will be described later, as the blur information Q together with the degree N, and a plurality of parameters E (E0, E1, E2,...) The image D is corrected using the parameter setting means 30a to be set and the parameters E0, E1, E2,..., And the corrected image D′ 0 corresponding to each parameter is corrected. , D′ 1, D′ 2,..., And output means for determining the target image D ′ from the corrected images D′ 0, D′ 1, D′ 2,. Determination means 45a to output to 60a When the storage means 50a storing various databases for the analysis means 20a and the parameter setting means 30a and the information P indicating that the image D is a normal image are received from the analysis means 20a, the image D is output. On the other hand, when the target image D ′ is received from the determining unit 45a, an output unit 60a that outputs the target image D ′ is provided. The edge detection unit 12a includes an edge narrowing unit 14a that removes invalid edges.

図9は、図1に示す実施形態の画像処理システムAにおける条件設定手段100aの構成を示すブロック図である。図示のように、条件設定手段100aは、エッジ検出手段12a用のエッジ検出条件のデフォルト条件および解析手段用の判別条件のデフォルト条件を記憶したデフォルト条件データベースDB150aと、画像Dに付属されたタグ情報を読み取るタグ情報読取手段110aと、タグ情報読取手段110aにより得られたタグ情報中の撮像条件情報に基づいてDB150aに記憶されたデフォルト条件を調整することによってエッジ検出条件および判別条件を設定して夫々エッジ検出手段12aと解析手段20aに送信する条件設定手段120aとを有してなる。なお、画像Dにタグ情報がない、またはエッジ検出条件、判別条件を設定するための撮像条件情報が画像Dのタグ情報に含まれていない場合には、条件調整手段120aは、デフォルト条件を送信する。   FIG. 9 is a block diagram showing the configuration of the condition setting means 100a in the image processing system A of the embodiment shown in FIG. As illustrated, the condition setting unit 100a includes a default condition database DB 150a that stores a default condition of an edge detection condition for the edge detection unit 12a and a default condition of a determination condition for the analysis unit, and tag information attached to the image D. The edge detection condition and the discrimination condition are set by adjusting the default condition stored in the DB 150a based on the tag information reading means 110a that reads the image information and the imaging condition information in the tag information obtained by the tag information reading means 110a. Each has edge detection means 12a and condition setting means 120a for transmission to analysis means 20a. If there is no tag information in the image D, or imaging condition information for setting edge detection conditions and discrimination conditions is not included in the tag information of the image D, the condition adjustment unit 120a transmits a default condition. To do.

条件設定手段100aの各構成の詳細について後に説明することにし、ここでは、まず、デフォルト条件(デフォルトのエッジ検出条件およびデフォルトの判別条件)を例にして、画像処理システムAにおける条件設定手段100aを除いた他の構成の詳細について説明する。   Details of each component of the condition setting unit 100a will be described later. First, the condition setting unit 100a in the image processing system A will be described by taking default conditions (default edge detection conditions and default determination conditions) as an example. The details of the other configuration will be described.

本実施形態において、エッジ検出条件は、エッジを検出する領域、エッジを検出する方向、エッジ強度の閾値、および無効エッジ判別条件を含むものであり、デフォルトのエッジ検出条件としては、上記夫々に対応して、画像全体、図2における実線で示す8方向、閾値T1、複雑度の閾値(例えば4)となる。エッジ検出手段12aは、まず、縮小画像D0に対して、図2における実線で示すような8方向毎に、閾値T1以上の強度を有するエッジのみを検出し、これらのエッジの座標位置を得る。次にエッジ検出手段12aは、検出された各方向毎の各々のエッジの座標位置に基づいて、画像Dを用いてこれらのエッジに対して、図3に示すようなエッジプロファイルを作成する。   In this embodiment, the edge detection condition includes an edge detection area, an edge detection direction, an edge strength threshold value, and an invalid edge determination condition. The default edge detection condition corresponds to each of the above. Thus, the entire image, eight directions indicated by solid lines in FIG. 2, the threshold value T1, and the complexity threshold value (for example, 4) are obtained. The edge detection unit 12a first detects only edges having an intensity equal to or higher than the threshold T1 in each of the eight directions as indicated by the solid line in FIG. Next, the edge detection means 12a creates an edge profile as shown in FIG. 3 for these edges using the image D based on the detected coordinate position of each edge in each direction.

エッジ検出手段12aにおけるエッジ絞込手段14aは、上記において取得されたエッジのプロファイルに基づいて、複雑なプロファイル形状を有するエッジを除去して、残りのエッジのプロファイルをエッジ特徴量取得手段16aに出力する。具体的には、検出されたエッジのプロファイルにおいて、ピークを呈する位置の数を取得し(図4に示す例の場合においては、この数が黒丸が示す6つとなる)、エッジ数が1つである場合には複雑度が1、エッジ数が2つである場合には複雑度が2、・・・のようにこの数を複雑度として、複雑度が4以上のエッジを無効エッジとして除去する。   The edge narrowing means 14a in the edge detection means 12a removes edges having a complex profile shape based on the edge profile acquired above and outputs the remaining edge profile to the edge feature quantity acquisition means 16a. To do. Specifically, in the detected edge profile, the number of positions exhibiting peaks is acquired (in the case of the example shown in FIG. 4, this number is six indicated by black circles), and the number of edges is one. In some cases, the complexity is 1, and when the number of edges is 2, the complexity is 2, and so on, and this number is regarded as complexity, and edges with complexity of 4 or more are removed as invalid edges. .

エッジ特徴量取得手段16aは、エッジ絞込手段14aから出力されてきたエッジのプロファイルに基づいて、図3に示すようなエッジ幅を各エッジに対して求め、図6に示すようなエッジ幅のヒストグラムを図2に示された8つの方向毎に作成してエッジ幅と共にエッジ特徴量Sとして解析手段20aに出力する。   The edge feature quantity acquisition means 16a obtains the edge width as shown in FIG. 3 for each edge based on the edge profile output from the edge narrowing means 14a, and obtains the edge width as shown in FIG. A histogram is created for each of the eight directions shown in FIG. 2, and is output to the analyzing means 20a as an edge feature amount S together with the edge width.

解析手段20aは、主として下記の2つの処理を行う。     The analysis means 20a mainly performs the following two processes.

1. 画像Dにおけるボケ方向、画像Dのボケ度Nを求めて、画像Dがボケ画像か通常画像かを判別する。   1. The blur direction in the image D and the blur degree N of the image D are obtained to determine whether the image D is a blur image or a normal image.

2. 画像Dがボケ画像と判別された場合、ボケ幅L、ぶれ度Kを算出する。   2. When the image D is determined to be a blurred image, a blur width L and a blur degree K are calculated.

ここで、1つ目の処理から説明する。   Here, the first process will be described.

解析手段20aは、画像Dにおけるボケ方向を求めるために、まず、図2における実線で示す8つの方向のエッジ幅のヒストグラム(以下略してヒストグラムという)に対して、互いに直交する2つの方向を1方向組として各方向組(1−5、2−6、3−7、4−8)のヒストグラムの相関値を求める。なお、相関値は求め方によって様々な種類があり、相関値が大きければ相関が小さい種類と、相関値の大小と相関の大小とが一致する、すなわち相関値が小さければ相関が小さい種類との2種類に大きく分けることができる。本実施形態において、例として、相関値の大小と相関の大小とが一致する種類の相関値を用いる。図6に示すように、画像中にぶれがある場合には、ぶれ方向のヒストグラムと、ぶれ方向と直交する方向のヒストグラムとの相関が小さい(図6(a)参照)のに対して、ぶれと関係ない直交する方向組または画像中にぶれがない(ボケがないまたはピンボケ)場合の直交する方向組では、そのヒストグラムの相関が大きい(図6(b)参照)。本実施形態の画像処理システムAにおける解析手段20aは、このような傾向に着目し、4つの方向組に対して、各組のヒストグラムの相関値を求め、相関が最も小さい方向組の2つの方向を見付け出す。画像Dにぶれがあれば、この2つの方向のうちの1つは、図2における実線で示す8つの方向のうち、最もぶれ方向に近い方向として考えることができる。   In order to obtain the blur direction in the image D, the analysis unit 20a first sets two directions orthogonal to each other to a histogram of edge widths in eight directions indicated by solid lines in FIG. As the direction set, the correlation value of the histogram of each direction set (1-5, 2-6, 3-7, 4-8) is obtained. Note that there are various types of correlation values, depending on how they are obtained.If the correlation value is large, the correlation type is small, and if the correlation value is the same as the correlation level, that is, if the correlation value is small, the correlation type is small. It can be roughly divided into two types. In this embodiment, as an example, a correlation value of a type in which the magnitude of the correlation value matches the magnitude of the correlation is used. As shown in FIG. 6, when there is blur in the image, the correlation between the blur direction histogram and the histogram in the direction orthogonal to the blur direction is small (see FIG. 6A). The correlation of the histogram is large in the orthogonal direction set not related to or in the orthogonal direction set when there is no blur in the image (no blur or out of focus) (see FIG. 6B). The analysis unit 20a in the image processing system A of the present embodiment pays attention to such a tendency, obtains the correlation value of the histogram of each group for the four direction groups, and obtains the two directions of the direction group having the smallest correlation. Find out. If there is blurring in the image D, one of these two directions can be considered as the direction closest to the blurring direction among the eight directions indicated by the solid lines in FIG.

図6(c)は、ぶれ、ピンボケ、ボケ(ピンボケおよびぶれ)なしの撮像条件で同じ被写体を撮像して得た夫々の画像に対して求められた、このぶれの方向におけるエッジ幅のヒストグラムを示している。図6(c)からわかるように、ボケのない通常画像は、最も小さい平均エッジ幅を有し、すなわち、上記において見付け出された2つの方向のうち、平均エッジ幅が大きい方は、最もぶれに近い方向のはずである。   FIG. 6C shows a histogram of edge widths in the direction of the blur obtained for each image obtained by imaging the same subject under imaging conditions without blurring, blurring, and blurring (blurring and blurring). Show. As can be seen from FIG. 6 (c), the normal image without blur has the smallest average edge width, that is, of the two directions found above, the one with the largest average edge width is the most blurred. The direction should be close to.

解析手段20aは、こうして、相関が最も小さい方向組を見付け、この方向組の2つの方向のうち、平均エッジ幅の大きい方をボケ方向とする。   In this way, the analysis unit 20a finds the direction set having the smallest correlation, and sets the direction with the larger average edge width among the two directions of the direction set as the blur direction.

次に、解析手段20aは、画像Dのボケ度Nを求める。画像のボケ度は、画像中のボケの程度の大小を示すものであり、例えば、画像中に最もぼけている方向(ここでは上記において求められたボケ方向)の平均エッジ幅を用いてもよいが、ここでは、ボケ方向における各々のエッジのエッジ幅を用いて図7に基づいたデータベースを利用してより精度良く求める。図7は、学習用の通常画像データベースとボケ(ピンボケおよびぶれ)画像データベースを元に、画像中の最もぼけている方向(通常画像の場合には、この方向に対応する方向が望ましいが、任意の方向であってもよい)のエッジ幅分布のヒストグラムを作成し、ボケ画像における頻度と通常画像における頻度(図示縦軸)の比率を評価値(図示スコア)としてエッジ幅毎に求めて得たものである。図7に基づいて、エッジ幅とスコアとを対応付けてなるデータベース(以下スコアデータベースという)が作成され、記憶手段50aに記憶されている。   Next, the analysis unit 20a obtains the degree of blur N of the image D. The degree of blur of the image indicates the magnitude of the degree of blur in the image. For example, the average edge width in the direction most blurred in the image (here, the blur direction obtained above) may be used. However, here, the edge width of each edge in the blur direction is used to obtain more accurately using the database based on FIG. FIG. 7 is based on the normal image database for learning and the blurred (blurred and blurred) image database, and the direction in which the image is most blurred (in the case of a normal image, a direction corresponding to this direction is desirable, but arbitrary The edge width distribution histogram (which may be the direction of the image) is created, and the ratio between the frequency in the blurred image and the frequency in the normal image (the vertical axis in the drawing) is obtained for each edge width as an evaluation value (the score in the drawing). Is. Based on FIG. 7, a database (hereinafter referred to as score database) in which the edge width and the score are associated with each other is created and stored in the storage unit 50a.

解析手段20aは、図7に基づいて作成され、記憶手段50aに記憶されたスコアデータベースを参照し、画像Dのボケ方向の各エッジに対して、そのエッジ幅からスコアを取得し、ボケ方向の全てのエッジのスコアの平均値を画像Dのボケ度Nとして求める。求められた画像Dのボケ度Nが、条件設定手段100aのDB150aにデフォルトの判別条件の1つとなる閾値T2より小さければ、解析手段20aは、画像Dを通常画像として判別すると共に、画像Dが通常画像であることを示す情報Pを出力手段60aに出力することをもって、処理を終了する。   The analysis unit 20a refers to the score database created based on FIG. 7 and stored in the storage unit 50a, acquires a score from the edge width of each edge in the blur direction of the image D, and calculates the blur direction. The average value of the scores of all edges is obtained as the degree of blur N of the image D. If the obtained blur degree N of the image D is smaller than the threshold value T2 that is one of the default determination conditions in the DB 150a of the condition setting unit 100a, the analysis unit 20a determines the image D as a normal image and the image D When the information P indicating that the image is a normal image is output to the output means 60a, the processing is terminated.

一方、画像Dのボケ度Nが閾値T2以上であれば、解析手段20aは、画像Dがボケ画像であると判別すると共に、上記2つ目の処理に入る。   On the other hand, if the degree of blur N of the image D is greater than or equal to the threshold T2, the analysis unit 20a determines that the image D is a blurred image and enters the second process.

解析手段20aは、2つ目の処理として、まず、画像Dのぶれ度Kを求める。   As a second process, the analysis unit 20a first obtains the degree of blur K of the image D.

ボケ画像のボケにおけるぶれの程度の大小を示すぶれ度Kは、下記のような要素に基づいて求めることができる。   The degree of blur K indicating the degree of blur in the blur image can be obtained based on the following factors.

1.相関が最も小さい方向組(以下相関最小組)の相関値:この相関値が小さいほどぶれの程度が大きい
解析手段20aは、この点に着目して、図8(a)に示す曲線に基づいて、相関最小組の相関値に対応する第1のぶれ度K1を求める。なお、図8(a)における閾値T3a、T3bのデフォルト値も、デフォルトの判別条件として条件設定手段100aのDB150aに記憶されている。
1. Correlation value of the direction group with the smallest correlation (hereinafter referred to as the minimum correlation group): The smaller the correlation value, the greater the degree of blurring. The analysis means 20a pays attention to this point and based on the curve shown in FIG. The first blur degree K1 corresponding to the correlation value of the minimum correlation set is obtained. Note that the default values of the threshold values T3a and T3b in FIG. 8A are also stored in the DB 150a of the condition setting unit 100a as default determination conditions.

2.相関最小組の2つの方向のうち、平均エッジ幅が大きい方向の平均エッジ幅:この平均エッジ幅が大きいほどぶれの程度が大きい
解析手段20aは、この点に着目して、図8(b)に示す曲線に基づいて、相関最小組の平均エッジ幅が大きい方向の平均エッジ幅に対応する第2のぶれ度K2を求める。なお、図8(b)における閾値T4a、T4bのデフォルト値も、デフォルトの判別条件として条件設定手段100aのDB150aに記憶されている
3.相関最小組の2つの方向における夫々の平均エッジ幅の差:この差が大きいほどぶれの程度が大きい
解析手段20aは、この点に着目して、図8(c)に示す曲線に基づいて、相関最小組の2つの方向における夫々の平均エッジ幅の差に対応する第3のぶれ度K3を求める。なお、図8(c)における閾値T5a、T5bのデフォルト値も、デフォルトの判別条件として条件設定手段100aのDB150aに記憶されている。
2. Of the two directions of the minimum correlation set, the average edge width in the direction where the average edge width is large: The larger the average edge width, the greater the degree of blurring. The analysis means 20a pays attention to this point, and FIG. The second blurring degree K2 corresponding to the average edge width in the direction in which the average edge width of the smallest correlation set is large is obtained based on the curve shown in FIG. Note that the default values of the threshold values T4a and T4b in FIG. 8B are also stored in the DB 150a of the condition setting unit 100a as default determination conditions. The difference between the average edge widths in the two directions of the minimum correlation set: the greater this difference, the greater the degree of blurring. The analysis means 20a pays attention to this point, based on the curve shown in FIG. A third blur degree K3 corresponding to the difference between the average edge widths in the two directions of the minimum correlation set is obtained. Note that the default values of the threshold values T5a and T5b in FIG. 8C are also stored in the DB 150a of the condition setting unit 100a as default determination conditions.

解析手段20aは、このようにして第1のぶれ度K1、第2のぶれ度K2、第3のぶれ度K3を求めると共に、下記の式(1)に従って、K1、K2、K3を用いてボケ画像となるボケ画像Dのぶれ度Kを求める。   In this way, the analyzing means 20a obtains the first blur degree K1, the second blur degree K2, and the third blur degree K3, and blurs using K1, K2, and K3 according to the following equation (1). The blurring degree K of the blurred image D to be an image is obtained.


K=K1×K2×K3 (1)
但し、K:ぶれ度
K1:第1のぶれ度
K2:第2のぶれ度
K3:第3のぶれ度

次に、解析手段20aは、ボケ画像となる画像Dのボケ幅Lを求める。ここで、ぶれ度Kに関係なく、ボケ幅Lとしてボケ方向におけるエッジの平均幅を求めるようにしてもよいし、図2における実線で示す8つの方向のすべてにおけるエッジの平均エッジ幅を求めてボケ幅Lとする。

K = K1 × K2 × K3 (1)
Where K: degree of blurring K1: first degree of blurring K2: second degree of blurring K3: third degree of blurring

Next, the analysis unit 20a obtains the blur width L of the image D that becomes a blurred image. Here, regardless of the blurring degree K, the average width of the edges in the blur direction may be obtained as the blur width L, or the average edge width of the edges in all eight directions indicated by the solid lines in FIG. The blur width is L.

解析手段20aは、ボケ画像である画像Dに対して求められたぶれ度K、ボケ幅Lを、ボケ方向、ボケ度Nと共にボケ情報Qとしてパラメータ設定手段30aに出力する。   The analysis unit 20a outputs the blur degree K and the blur width L obtained for the image D, which is a blur image, to the parameter setting unit 30a as the blur information Q together with the blur direction and the blur degree N.

本実施形態の画像処理システムAは、アン・シャープネス・マスキング(USM)補正方法で画像Dに対する補正を施すものであり、パラメータ設定手段30aは、ボケ幅Lとボケ方向に応じて、ボケ幅Lが大きいほど補正マスクのサイズが大きくなるように、ボケ方向に作用する方向性補正用の1次元補正マスクM1を設定すると共に、ボケ幅Lに応じて、ボケ幅Lが大きいほど補正マスクのサイズが大きくなるように等方性補正用の2次元補正マスクM2を設定する。なお、各ボケ幅に対応する2次元補正マスク、および各ボケ幅とボケ方向に対応する1次元補正マスクはデータベース(マスクデータベースという)として記憶手段50aに記憶されており、パラメータ設定手段30aは、記憶手段50aに記憶されたマスクデータベースから、ボケ幅Lとボケ方向に基づいて1次元補正マスクM1を、ボケ幅Lに基づいて2次元補正マスクM2を取得し、下記の式(2)に従って、方向性補正用の1次元補正パラメータW1および等方性補正用の2次元補正パラメータW2を設定する。   The image processing system A according to the present embodiment performs correction on the image D by an unsharpness masking (USM) correction method, and the parameter setting unit 30a performs the blur width L according to the blur width L and the blur direction. A one-dimensional correction mask M1 for directivity correction that acts in the blur direction is set such that the larger the blur width L is, the larger the blur width L is. Is set so as to increase the isotropic correction mask M2. The two-dimensional correction mask corresponding to each blur width and the one-dimensional correction mask corresponding to each blur width and blur direction are stored in the storage unit 50a as a database (referred to as a mask database), and the parameter setting unit 30a includes: From the mask database stored in the storage means 50a, a one-dimensional correction mask M1 is obtained based on the blur width L and the blur direction, and a two-dimensional correction mask M2 is obtained based on the blur width L. According to the following equation (2), A one-dimensional correction parameter W1 for directionality correction and a two-dimensional correction parameter W2 for isotropic correction are set.


W1=N×K×M1
W2=N×(1−K)×M2 (2)
但し、W1:1次元補正パラメータ
W2:2次元補正パラメータ
N:ボケ度
K:ぶれ度
M1:1次元補正マスク
M2:2次元補正マスク
即ち、パラメータ設定手段30aは、ボケ度Nが大きいほど等方性補正の強度と方向性補正の強度が強く、ぶれ度Kが大きいほど方向性補正の重みが大きくなるように補正パラメータW1とW2(合わせてパラメータE0とする)を設定する。

W1 = N × K × M1
W2 = N * (1-K) * M2 (2)
However, W1: One-dimensional correction parameter
W2: Two-dimensional correction parameter
N: Defocus degree
K: Degree of blur
M1: One-dimensional correction mask
M2: Two-dimensional correction mask In other words, the parameter setting means 30a increases the isotropic correction strength and the directionality correction strength as the degree of blur N increases, and the directionality correction weight increases as the blur degree K increases. Are set correction parameters W1 and W2 (collectively, parameter E0).

ここで、パラメータ設定手段30aは、設定されたパラメータE0に対して、さらにボケ度N、ぶれ度Kおよび補正マスクM1、M2を夫々調整して、調整されたボケ度N、ぶれ度K、補正マスクM1、M2を用いて式(2)に従って補正パラメータE0と異なる複数の補正パラメータE1、E2、・・・を求める。   Here, the parameter setting unit 30a further adjusts the degree of blur N, the degree of blur K, and the correction masks M1 and M2 with respect to the set parameter E0, and adjusts the degree of blur N, the degree of blur K, and the correction. A plurality of correction parameters E1, E2,... Different from the correction parameter E0 are obtained according to the equation (2) using the masks M1, M2.

パラメータ設定手段30aは、こうして求められた補正パラメータE(E0、E1、E2、・・・)を補正手段40aに出力する。   The parameter setting means 30a outputs the correction parameter E (E0, E1, E2,...) Thus obtained to the correction means 40a.

補正手段40aは、パラメータE0、E1、E2、・・・を画像Dに夫々適用して補正を施し、各補正パラメータに夫々対応する補正済み画像D’0、D’1、D’2、・・・を得る。   The correction means 40a performs correction by applying the parameters E0, E1, E2,... To the image D, respectively, and corrected images D′ 0, D′ 1, D′ 2,.・ ・ Get.

決定手段45aは、補正手段40aにより得られた各々の補正済み画像を表示する図示しない表示手段と、表示された各々の補正済み画像からユーザ所望の補正済み画像を選択させるための図示しない入力手段とを備え、補正済み画像D’0、D’1、D’2、・・・からユーザにより選択された画像を目的画像D’として決定して出力手段60aに出力する。   The determining unit 45a includes a display unit (not shown) for displaying each corrected image obtained by the correction unit 40a, and an input unit (not shown) for selecting a corrected image desired by the user from each displayed corrected image. The image selected by the user from the corrected images D′ 0, D′ 1, D′ 2,... Is determined as the target image D ′ and output to the output unit 60a.

出力手段60aは、解析手段20aから画像Dが通常画像であることを示す情報Pを受信した場合には画像Dを出力する一方、決定手段45aから目的画像D’を受信した場合には目的画像D’を出力するものである。本実施形態において、出力手段60aによる「出力」は印刷であり、出力手段60aは、通常画像の画像Dおよびボケ画像の画像Dを補正して得た目的画像D’を印刷してプリントを得るものであるが、記録媒体に記憶したり、ネットワーク上における画像保管サーバや、画像の補正を依頼した依頼者により指定されたネットワーク上のアドレスなどに送信したりするなどのものであってもよい。   The output unit 60a outputs the image D when the information P indicating that the image D is a normal image is received from the analysis unit 20a, while the target image when the target image D ′ is received from the determination unit 45a. D 'is output. In the present embodiment, “output” by the output unit 60a is printing, and the output unit 60a prints the target image D ′ obtained by correcting the image D of the normal image and the image D of the blurred image to obtain a print. However, it may be stored in a recording medium, sent to an image storage server on the network, or an address on the network designated by the client who requested the image correction. .

ここで、図9に示す条件設定手段100aの説明に戻る。上述したように、本実施形態の画像処理システムAにおいて、エッジ検出手段12a(エッジ絞込手段14aを含む)用のエッジ検出条件は、エッジを検出する領域、エッジを検出する方向、エッジ強度の閾値T1、および無効エッジ判別条件となる複雑度の閾値であり、解析手段20a用の判別条件は、画像Dがボケ画像か通常画像かを判別するための画像Dのボケ度Nの閾値T2と、画像Dのぶれ度Kを算出するための、相関最小組の相関値の閾値T3a、T3b、相関最小組の平均エッジ幅が大きい方向の平均エッジ幅の閾値T4a、T4b、および相関最小組の2つの方向における夫々の平均エッジ幅の差の閾値T5a、T5bとを有する。これらのエッジ検出条件および判別条件のデフォルト値が条件設定手段100aのDB150aに記憶されており、条件調整手段120aは、画像Dにタグ情報がない、またはエッジ検出条件、判別条件を設定するための撮像条件情報が画像Dのタグ情報に含まれていない場合には、各々の条件のデフォルト値を設定するが、画像Dにタグ情報が付属され、このタグ情報にエッジ検出条件、判別条件を設定するための撮像条件情報が含まれている場合には、撮像条件情報に基づいて各々のエッジ検出条件、判別条件のデフォルト値を調整する。ここで、タグ情報として、レンズのF値、シャッタースピード、ストロボON/OFFを示す情報、ISO感度、EV値、ズーム撮像であるか否か、圧縮率を取得された場合を例にして、条件調整手段120aの動作を説明する。   Here, the description returns to the condition setting means 100a shown in FIG. As described above, in the image processing system A according to the present embodiment, the edge detection conditions for the edge detection unit 12a (including the edge narrowing unit 14a) include the edge detection region, the edge detection direction, and the edge strength. The threshold value T1 and the complexity threshold value that is an invalid edge determination condition. The determination condition for the analysis unit 20a is a threshold value T2 of the blur degree N of the image D for determining whether the image D is a blurred image or a normal image. , Threshold values T3a and T3b of the correlation value of the minimum correlation set, average edge width thresholds T4a and T4b in the direction in which the average edge width of the minimum correlation set is large, and Threshold values T5a and T5b of the difference between the average edge widths in the two directions are included. The default values of these edge detection conditions and determination conditions are stored in the DB 150a of the condition setting means 100a, and the condition adjustment means 120a has no tag information in the image D, or sets the edge detection conditions and determination conditions. When the imaging condition information is not included in the tag information of the image D, the default value of each condition is set, but the tag information is attached to the image D, and the edge detection condition and the discrimination condition are set in the tag information When the imaging condition information is included, the default values of the edge detection conditions and the discrimination conditions are adjusted based on the imaging condition information. Here, as tag information, an example is obtained in which the lens F value, shutter speed, information indicating strobe ON / OFF, ISO sensitivity, EV value, whether or not the image is a zoom image, and a compression rate are acquired. The operation of the adjusting unit 120a will be described.

条件設定手段120aは、レンズのF値が所定の閾値(例えば5.6)以下である場合と、ズーム撮像である場合とのいずれの場合(この場合、画像Dが被写界深度の浅い画像となる)においても、エッジを検出する領域を画像D全体から、画像Dの中心を中心とし、かつ画像Dの60%となる中央部分に調整する一方、他の場合(ズーム撮像ではなく、かつF値が5.6より大きい場合)においては、エッジを検出する領域をデフォルトの画像D全体にする。なお、エッジ検出手段12aは、条件設定手段120aにより設定された領域においてエッジの検出を行う。   The condition setting unit 120a uses either the case where the F-number of the lens is a predetermined threshold value (for example, 5.6) or less and the case where zoom imaging is performed (in this case, the image D has a shallow depth of field). The edge detection region is adjusted from the entire image D to the center portion of the image D and 60% of the image D, while in other cases (not zoom imaging and In the case where the F value is greater than 5.6), the edge detection region is the entire default image D. The edge detection unit 12a detects an edge in the region set by the condition setting unit 120a.

また、条件設定手段120aは、シャッタースピードが所定の閾値以下の場合、ストロボONの場合、ISO感度が所定の閾値以下の場合、EV値が所定の閾値以下の場合、ズーム撮像である場合において、画像を撮像する際に手ぶれ生じやすい(ズーム撮像の場合は画像中にぶれが現れ易い)ことに基づいて、これらの場合において画像Dのぶれやすさを大として、エッジ検出手段12aによりエッジを検出する方向を、図2における実線で示す8方向を元に点線により示す方向を増やして得た16方向をエッジ検出手段12aに出力する。エッジ検出手段12aは、条件設定手段120aからの方向毎にエッジの検出を行い、その後のエッジ特徴量を取得する処理や、解析手段20aにより処理も、この16方向のエッジに対して行う。   In addition, the condition setting unit 120a is configured such that when the shutter speed is equal to or less than a predetermined threshold value, when the strobe is ON, when the ISO sensitivity is equal to or smaller than the predetermined threshold value, when the EV value is equal to or smaller than the predetermined threshold value, or when zoom imaging is performed. Based on the fact that camera shake is likely to occur when an image is captured (in the case of zoom imaging, blur is likely to appear in the image), in these cases, the edge detection means 12a detects the edge by increasing the ease of blurring of the image D. 16 directions obtained by increasing the direction indicated by the dotted line based on the eight directions indicated by the solid line in FIG. 2 are output to the edge detecting means 12a. The edge detection unit 12a detects an edge for each direction from the condition setting unit 120a, and performs processing for acquiring subsequent edge feature amounts and processing by the analysis unit 20a for the edges in the 16 directions.

また、これらの場合において、無効エッジ判別条件を厳しくすべく、条件設定手段120aは、無効エッジ判別条件となる複雑度の閾値を、デフォルトの4から3に調整してエッジ検出手段12aに出力する。エッジ検出手段12aに備えられたエッジ絞込手段14aは、この無効エッジ判別条件に従って、複雑度3以上のエッジを無効なエッジとして除去する。   Further, in these cases, in order to tighten the invalid edge determination condition, the condition setting unit 120a adjusts the complexity threshold value, which becomes the invalid edge determination condition, from the default 4 to 3, and outputs it to the edge detection unit 12a. . The edge narrowing means 14a provided in the edge detection means 12a removes an edge having a complexity of 3 or more as an invalid edge according to the invalid edge determination condition.

解析手段20a用の判別条件の調整として、条件設定手段120aは、ぶれやすさが大であるとされた画像Dに対して、通常画像かボケ画像かを判別するためのボケ度Nの閾値T2をデフォルト値より小さくなるように設定すると共に、ぶれ度Kを求めるための各閾値T3a、T3b、T4a、T4b、T5a、T5bを夫々のデフォルト値より小さくなるように設定する。さらに、条件設定手段120aは、ぶれやすさに応じて設定されたボケ度Nの閾値を、画像Dの圧縮率により示される圧縮強度が大きいほど大きくなるように調整する。   As an adjustment of the determination condition for the analysis unit 20a, the condition setting unit 120a uses a threshold value T2 of the degree of blur N for determining whether the image D is determined to be largely blurred or not as a normal image or a blurred image. Is set to be smaller than the default value, and the threshold values T3a, T3b, T4a, T4b, T5a, and T5b for obtaining the blur degree K are set to be smaller than the respective default values. Furthermore, the condition setting unit 120a adjusts the threshold value of the blur degree N set according to the degree of blur so that the threshold value increases as the compression strength indicated by the compression rate of the image D increases.

このように設定されたエッジ検出条件と判別条件は夫々エッジ検出手段12aと解析手段20aに出力され、エッジ検出手段12aと解析手段20aは、出力されてきたエッジ検出条件と判別条件を用いて夫々の処理を行う。   The edge detection conditions and determination conditions set in this way are output to the edge detection means 12a and the analysis means 20a, respectively. The edge detection means 12a and the analysis means 20a use the output edge detection conditions and determination conditions, respectively. Perform the process.

図10は、本実施形態の画像処理システムAの動作を示すフローチャートである。図示のように、記録媒体1から読み出された画像Dに対して、まず、条件設定手段100aによりエッジ検出条件と判別条件が設定される(S10)と共に、縮小手段10aにより縮小処理が施されて縮小画像D0となる(S11)。エッジ検出手段12aは、まず、縮小画像D0に対して、ステップS10において設定されたエッジ検出条件に含まれる複数の異なる方向毎に、閾値T1以上の強度を有するエッジのみを検出し、これらのエッジの座標位置を得る。次にエッジ検出手段12aは、検出された各方向毎の各々のエッジの座標位置に基づいて、画像Dを用いてこれらのエッジに対して、図3に示すようなエッジプロファイルを作成する(S12)。エッジ検出手段12aに備えられたエッジ絞込手段14aは、ステップS10に設定されたエッジ検出条件に含まれる無効エッジ判別条件であるエッジの複雑度の閾値に基づいて、無効なエッジを除去して残りのエッジのプロファイルをエッジ特徴量取得手段に出力する(S14)。エッジ特徴量取得手段16aは、エッジ絞込手段14aから送信された各々のエッジのプロファイルに基づいて各エッジの幅を求めると共に、各方向毎にエッジ幅のヒストグラムを作成して、各エッジの幅および各方向のエッジ幅のヒストグラムを画像Dのエッジ特徴量Sとして解析手段20aに出力する(S16)。解析手段20aは、エッジ特徴量Sを用いて、まず画像Dのボケ方向およびボケ度Nを算出すると共に、ステップS10において設定された判別条件に含まれる通常画像かボケ画像かを判別するためのボケ度Nの閾値T2に基づいて画像Dがボケ画像であるか通常画像であるかを判別する(S20、S25)。画像Dが通常画像であれば(S25:Yes)、解析手段20aは、画像Dが通常画像であることを示す情報Pを出力手段60aに出力し(S30)、出力手段60aは、情報Pを受信すると、画像Dを印刷してプリントを得る(S35)。   FIG. 10 is a flowchart showing the operation of the image processing system A of the present embodiment. As shown in the figure, for the image D read from the recording medium 1, first, the edge detection condition and the discrimination condition are set by the condition setting unit 100a (S10), and the reduction process is performed by the reduction unit 10a. Thus, the reduced image D0 is obtained (S11). The edge detection unit 12a first detects only edges having an intensity equal to or higher than the threshold T1 for each of a plurality of different directions included in the edge detection condition set in step S10 for the reduced image D0. Get the coordinate position. Next, the edge detection means 12a creates an edge profile as shown in FIG. 3 for these edges using the image D based on the detected coordinate position of each edge in each direction (S12). ). The edge narrowing means 14a provided in the edge detecting means 12a removes invalid edges based on the threshold value of the edge complexity which is an invalid edge determination condition included in the edge detection condition set in step S10. The remaining edge profile is output to the edge feature quantity acquisition means (S14). The edge feature quantity acquisition unit 16a obtains the width of each edge based on the profile of each edge transmitted from the edge narrowing unit 14a, creates an edge width histogram for each direction, and creates the width of each edge. And the histogram of the edge width in each direction is output to the analyzing means 20a as the edge feature amount S of the image D (S16). The analysis unit 20a first calculates the blur direction and the blur degree N of the image D using the edge feature amount S, and discriminates whether the image is a normal image or a blur image included in the discrimination condition set in step S10. Based on the threshold value T2 of the blur degree N, it is determined whether the image D is a blurred image or a normal image (S20, S25). If the image D is a normal image (S25: Yes), the analysis unit 20a outputs information P indicating that the image D is a normal image to the output unit 60a (S30), and the output unit 60a outputs the information P. When received, the image D is printed to obtain a print (S35).

一方、ステップS25において、画像Dがボケ画像に判別されると(S25:No)、解析手段20aは、ステップS10において設定された判別条件に含まれる相関最小組の相関値の閾値T3a、T3b、相関最小組の平均エッジ幅が大きい方向の平均エッジ幅の閾値T4a、T4b、および相関最小組の2つの方向における夫々の平均エッジ幅の差の閾値T5a、T5bに基づいて画像Dのぶれ度K、ボケ幅Lをさらに算出し、ステップS20において求められたボケ度Nおよびボケ方向と共にボケ情報Qとしてパラメータ設定手段30aに出力する(S40、S45)。パラメータ設定手段30aは、解析手段20aからのボケ情報Qに基づいて、1次元補正パラメータW1と2次元補正パラメータW2を求める。求められた1対の補正パラメータW1、W2を補正パラメータE0とし、ボケ度N、ぶれ度K、補正マスクM1、M2のマスクサイズなどを調整してさらに複数の補正パラメータE1、E2、・・・を取得して、補正手段40aに出力する(S50)。   On the other hand, when the image D is determined to be a blurred image in step S25 (S25: No), the analysis unit 20a includes the threshold values T3a and T3b of the correlation values of the minimum correlation set included in the determination condition set in step S10. The blurring degree K of the image D based on the thresholds T4a and T4b of the average edge width in the direction in which the average edge width of the minimum correlation set is large and the thresholds T5a and T5b of the difference between the average edge widths in the two directions of the minimum correlation set. Then, the blur width L is further calculated and output to the parameter setting unit 30a as blur information Q together with the blur degree N and the blur direction obtained in step S20 (S40, S45). The parameter setting unit 30a obtains the one-dimensional correction parameter W1 and the two-dimensional correction parameter W2 based on the blur information Q from the analysis unit 20a. The obtained pair of correction parameters W1 and W2 is set as a correction parameter E0, and a plurality of correction parameters E1, E2,... Are further adjusted by adjusting the degree of blur N, the blurring degree K, the mask size of the correction masks M1, M2, etc. Is output to the correction means 40a (S50).

補正手段40aは、補正パラメータE0、E1、E2、・・・を画像Dに夫々適用して補正を施し、各補正パラメータに夫々対応する補正済み画像D’0、D’1、D’2、・・・を得る(S55)。   The correction means 40a performs correction by applying the correction parameters E0, E1, E2,... To the image D, respectively, and corrected images D′ 0, D′ 1, D′ 2, respectively corresponding to the correction parameters. Is obtained (S55).

決定手段45aは、補正手段40aにより得られた各々の補正済み画像を図示しない表示手段に表示させ、図示しない入力手段を介して、ユーザが選択された補正済み画像を目的画像D’として決定して出力手段60aに出力する(S60)。   The determination unit 45a displays each corrected image obtained by the correction unit 40a on a display unit (not shown), and determines the corrected image selected by the user as the target image D ′ via the input unit (not shown). To the output means 60a (S60).

出力手段60aは、決定手段45aからの目的画像D’を印刷してプリントを得る(S70)。   The output unit 60a obtains a print by printing the target image D 'from the determination unit 45a (S70).

このように、本実施形態の画像処理システムAによれば、デジタル写真画像のボケの補正を効率良く行うためにデジタル写真画像に対してボケを判別してボケ情報を取得し、取得したボケ情報に基づいて補正用のパラメータを設定して補正する際に、デジタル写真画像を撮像した際の撮像条件情報を取得し、該撮像条件情報により反映される画像Dのぶれやすさ(画像Dにおいてぶれがある確率の大きさ)に基づいてボケを判別するためのエッジ検出の条件や、通常画像かボケ画像かを判別するための条件や、ぶれの程度の大小を示すぶれ度を算出するための条件などを調整するようにすることによって、判別の精度を高めることができ、結果的には補正の効果を良くすることができる。   As described above, according to the image processing system A of the present embodiment, in order to efficiently correct the blur of the digital photographic image, the blur is determined for the digital photographic image, the blur information is acquired, and the acquired blur information is acquired. When the correction parameters are set and corrected based on the image capturing condition information when the digital photographic image is captured, the image D reflected by the image capturing condition information is likely to be shaken (the image D is blurred). The edge detection condition for determining blur based on a certain degree of probability), the condition for determining whether the image is a normal image or a blur image, and the degree of blur indicating the degree of blurring By adjusting the conditions and the like, it is possible to improve the accuracy of discrimination, and as a result, the effect of correction can be improved.

また、撮像条件情報により反映される画像の被写界深度に基づいて、被写界深度の浅い画像に対して主要被写体領域である可能性の高い中央部分をエッジを検出する領域に限定することによって、被写界深度の浅い画像の場合においてもボケの判別の精度を高めることができる。   Also, based on the depth of field of the image reflected by the imaging condition information, the central portion that is likely to be the main subject region is limited to the region where the edge is detected with respect to the image having a shallow depth of field. Thus, even in the case of an image with a shallow depth of field, it is possible to increase the accuracy of blur determination.

さらに、画像の圧縮率により示される圧縮強度が大きいほど、この画像が通常画像かボケ画像を判別するための閾値を大きくするようにすることによって、圧縮強度の大きい画像に対して補正を行った後にノイズが目立ってしまうことを防ぐことができる。   Further, the larger the compression strength indicated by the compression rate of the image, the larger the threshold value for discriminating whether this image is a normal image or a blurred image, thereby correcting the image having a high compression strength. It is possible to prevent the noise from becoming conspicuous later.

図11は、本発明の第2の実施形態となる画像処理システムBの構成を示すブロック図である。なお、本実施形態の画像処理システムBにおいて、画像Dは、携帯電話機付属のデジタルカメラにより撮像して得たものである。図示のように、本実施形態の画像処理システムBは、記録媒体1から読み出された画像Dに対してエッジ検出条件を設定して後述するエッジ検出手段12bに送信する条件設定手段100bと、画像Dに対して縮小処理を行って画像Dの縮小画像D0を得る縮小手段10bと、縮小画像D0および画像Dを用いて、条件設定手段100bにより設定されたエッジ検出条件に含まれる複数の異なる方向毎にエッジを検出するエッジ検出手段12bと、エッジ検出手段12bにより得られたエッジの特徴量Sを取得するエッジ特徴量取得手段16bと、エッジ特徴量Sを用いて、画像Dにおけるボケ方向および画像Dのボケ度Nを算出して画像Dがボケ画像か通常画像かを判別し、通常画像の場合には、後述する出力手段60bに画像Dが通常画像であることを示す情報Pを送信して処理を終了する一方、ボケ画像の場合には、さらに画像Dのぶれ度K、ボケ幅Lを算出して、ボケ方向、ボケ度Nと共にボケ情報Qとして後述するパラメータ設定手段30bに送信する解析手段20bと、解析手段20bからのボケ情報Qに基づいてボケ画像となる画像Dを補正するためのパラメータEを複数(E0、E1、E2、・・・)設定するパラメータ設定手段30bと、パラメータE0、E1、E2、・・・を用いて画像Dに対して補正を行って、各パラメータに対応する補正済み画像D’0、D’1、D’2、・・・を得る補正手段40bと、各々の補正済み画像D’0、D’1、D’2、・・・から目的画像D’を決定して出力手段60bに出力する決定手段45bと、解析手段20bおよびパラメータ設定手段30bのための種々のデータベースを記憶した記憶手段50bと、解析手段20bから画像Dが通常画像であることを示す情報Pを受信した場合には画像Dを出力する一方、決定手段45bから目的画像D’を受信した場合には目的画像D’を出力する出力手段60bとを有してなる。なお、エッジ検出手段12bには、無効なエッジを除去するエッジ絞込手段14bが備えられている。   FIG. 11 is a block diagram showing a configuration of an image processing system B according to the second embodiment of the present invention. In the image processing system B of the present embodiment, the image D is obtained by taking an image with a digital camera attached to the mobile phone. As shown in the figure, the image processing system B of the present embodiment sets condition detection means 100b for setting an edge detection condition for an image D read from the recording medium 1, and transmits the condition to the edge detection means 12b described later; A reduction unit 10b that performs reduction processing on the image D to obtain a reduced image D0 of the image D, and a plurality of different edge detection conditions set by the condition setting unit 100b using the reduced image D0 and the image D An edge detection unit 12b that detects an edge for each direction, an edge feature amount acquisition unit 16b that acquires an edge feature amount S obtained by the edge detection unit 12b, and a blur direction in the image D using the edge feature amount S And the blur degree N of the image D is calculated to determine whether the image D is a blurred image or a normal image. If the image D is a normal image, the image D is output to the output means 60b described later. In the case of a blurred image, the blur degree K and the blur width L of the image D are further calculated, and the blur information Q along with the blur direction and the blur degree N are transmitted. And a plurality of parameters E (E0, E1, E2,...) For correcting the image D that becomes a blurred image based on the blur information Q from the analyzing unit 20b. ..) The image D is corrected using the parameter setting means 30b to be set and the parameters E0, E1, E2,..., And corrected images D′ 0, D′ 1, D corresponding to the respective parameters are corrected. .., And a determination unit that determines the target image D ′ from the corrected images D′ 0, D′ 1, D′ 2,... And outputs the target image D ′ to the output unit 60b. 45b and analysis means 20b When the storage means 50b storing various databases for the parameter setting means 30b and the information P indicating that the image D is a normal image are received from the analysis means 20b, the image D is output while the determination means When the target image D ′ is received from 45b, output means 60b for outputting the target image D ′ is provided. The edge detection means 12b is provided with edge narrowing means 14b for removing invalid edges.

図12は、図11に示す実施形態の画像処理システムBにおける条件設定手段100bの構成を示すブロック図である。図示のように、条件設定手段100bは、各々の携帯電話機の機種とそのぶれやすさとの対応関係を示す情報を記憶した機種DB160bと、エッジ検出手段12b用のエッジ検出条件のデフォルト条件を記憶したデフォルト条件データベースDB150bと、画像Dを撮像した携帯電話機の機種を示す情報を取得する機種情報取得手段110bと、画像Dの機種情報に基づいて機種DBを参照して画像Dを撮像した携帯電話機のぶれやすい方向をぶれやすい方向情報として取得すると共に、このぶれやすい方向情報に基づいてDB150bに記憶されたデフォルト条件を調整することによってエッジ検出条件を設定してエッジ検出手段12bに送信する条件設定手段120bとを有してなる。なお、画像Dを撮像した携帯電話機の機種情報を取得できない場合には、条件調整手段120bは、デフォルトのエッジ検出条件を設定する。   FIG. 12 is a block diagram showing a configuration of the condition setting unit 100b in the image processing system B of the embodiment shown in FIG. As shown in the figure, the condition setting unit 100b stores a model DB 160b that stores information indicating the correspondence relationship between the model of each mobile phone and the likelihood of shaking, and default conditions for edge detection conditions for the edge detection unit 12b. The default condition database DB 150b, the model information acquisition unit 110b that acquires information indicating the model of the mobile phone that captured the image D, and the mobile phone that captured the image D with reference to the model DB based on the model information of the image D Condition setting means for acquiring a direction that is likely to shake as direction information that is likely to be shaken, and setting an edge detection condition by adjusting a default condition stored in the DB 150b based on the direction information that is likely to be shaken and transmitting the condition to the edge detection means 12b 120b. When the model information of the mobile phone that has captured the image D cannot be acquired, the condition adjustment unit 120b sets a default edge detection condition.

条件設定手段100bの各構成の詳細について後に説明することにし、ここでは、まず、デフォルトのエッジ検出条件を例にして、画像処理システムBにおける条件設定手段100bを除いた他の構成の詳細について説明する。   Details of each configuration of the condition setting unit 100b will be described later. Here, first, details of other configurations excluding the condition setting unit 100b in the image processing system B are described by taking a default edge detection condition as an example. To do.

本実施形態において、エッジ検出条件は、エッジを検出する方向、各方向に対応するエッジ強度の閾値、および各方向に対応する無効エッジ判別条件を含むものであり、デフォルトのエッジ検出条件としては、上記夫々に対応して、図13における実線で示す8方向、8方向に対して同様な閾値t1、8方向に対して同様な複雑度の閾値(例えば4)となる。エッジ検出手段12bは、まず、縮小画像D0に対して、図13における実線で示すような8方向毎に、閾値t1以上の強度を有するエッジのみを検出し、これらのエッジの座標位置を得る。次にエッジ検出手段12bは、検出された各方向毎の各々のエッジの座標位置に基づいて、画像Dを用いてこれらのエッジに対して、図3に示すようなエッジプロファイルを作成する。   In the present embodiment, the edge detection condition includes a direction in which an edge is detected, an edge strength threshold value corresponding to each direction, and an invalid edge determination condition corresponding to each direction. As a default edge detection condition, Corresponding to each of the above, the threshold value t1 is the same for the eight directions and the eight directions indicated by the solid lines in FIG. 13, and the threshold value is the same for the eight directions (for example, 4). The edge detection means 12b first detects only edges having an intensity equal to or higher than the threshold value t1 for each of the eight directions as indicated by the solid line in FIG. Next, the edge detection means 12b creates an edge profile as shown in FIG. 3 for these edges using the image D based on the detected coordinate position of each edge in each direction.

エッジ検出手段12bにおけるエッジ絞込手段14bは、上記において取得されたエッジのプロファイルに基づいて、複雑なプロファイル形状を有するエッジを除去して、残りのエッジのプロファイルをエッジ特徴量取得手段16bに出力する。具体的には、検出されたエッジのプロファイルにおいて、ピークを呈する位置の数を取得し(図4に示す例の場合においては、この数が黒丸が示す7つとなる)、エッジ数が1つである場合には複雑度が1、エッジ数が2つである場合には複雑度が2、・・・のようにこの数を複雑度として、複雑度が4以上のエッジを無効エッジとして除去する。   The edge narrowing means 14b in the edge detection means 12b removes edges having a complex profile shape based on the edge profile acquired above and outputs the remaining edge profile to the edge feature quantity acquisition means 16b. To do. Specifically, in the detected edge profile, the number of positions exhibiting peaks is acquired (in the case of the example shown in FIG. 4, this number is seven indicated by black circles), and the number of edges is one. In some cases, the complexity is 1, and when the number of edges is 2, the complexity is 2, and so on, and this number is regarded as complexity, and edges with complexity of 4 or more are removed as invalid edges. .

エッジ特徴量取得手段16bは、エッジ絞込手段14bから出力されてきたエッジのプロファイルに基づいて、図3に示すようなエッジ幅を各エッジに対して求め、図6に示すようなエッジ幅のヒストグラムを図13に示された実線の8つの方向毎に作成してエッジ幅と共にエッジ特徴量Sとして解析手段20bに出力する。   The edge feature quantity acquisition means 16b obtains the edge width as shown in FIG. 3 for each edge based on the edge profile output from the edge narrowing means 14b, and obtains the edge width as shown in FIG. A histogram is created for each of the eight directions of the solid line shown in FIG. 13, and is output to the analyzing means 20b as an edge feature amount S together with the edge width.

解析手段20bの基本動作は、図1に示す画像処理システムにおける解析手段20aと同様であるが、通常画像かボケ画像かを判別するためのボケ度Nの閾値T2や、ぶれ度Kを求めるための各々の閾値(図8に示す閾値T3a、T3b、T4a、T4b、T5a、T5b)は条件設定手段100bにより設定されることがなく、記憶部50bに記憶された固定値を用いる。   The basic operation of the analyzing means 20b is the same as that of the analyzing means 20a in the image processing system shown in FIG. 1, but in order to obtain the threshold value T2 of the blur degree N for determining whether the image is a normal image or a blurred image, and the blurring degree K. The threshold values (threshold values T3a, T3b, T4a, T4b, T5a, and T5b shown in FIG. 8) are not set by the condition setting unit 100b, but use fixed values stored in the storage unit 50b.

パラメータ設定手段30b、補正手段40b、決定手段45b、出力手段60bは、図1に示す実施形態の画像処理システムAの相対応する構成と同様な作用を有するので、ここでの詳細な説明を省略する。   The parameter setting unit 30b, the correction unit 40b, the determination unit 45b, and the output unit 60b have the same operation as the corresponding configuration of the image processing system A according to the embodiment illustrated in FIG. 1, and thus detailed description thereof is omitted here. To do.

図12に示す条件設定手段100bの説明に戻る。上述したように、本実施形態の画像処理システムBにおいて、エッジ検出手段12b(エッジ絞込手段14bを含む)用のエッジ検出条件は、エッジを検出する方向、各方向に対応するエッジ強度の閾値t1、および無効エッジ判別条件となる複雑度の閾値であり、これらのエッジ検出条件のデフォルト値が条件設定手段100bのDB150bに記憶されており、条件調整手段120bは、画像Dを撮像した携帯電話機の機種情報が取得できない場合には、各々の条件のデフォルト値を設定するが、機種情報が取得できた場合には、機種情報に基づいて機種DB160bから画像Dのぶれやすい方向を示すぶれやすい方向情報を取得し、このぶれやすい方向情報に基づいて各々のエッジ検出条件のデフォルト値を調整する。   Returning to the description of the condition setting means 100b shown in FIG. As described above, in the image processing system B of the present embodiment, the edge detection condition for the edge detection unit 12b (including the edge narrowing unit 14b) includes the edge detection direction and the edge strength threshold corresponding to each direction. t1 and a threshold value of complexity as an invalid edge determination condition, default values of these edge detection conditions are stored in the DB 150b of the condition setting unit 100b, and the condition adjustment unit 120b If the model information cannot be acquired, the default values of the respective conditions are set. However, if the model information can be acquired, the blurring direction indicating the blurring direction of the image D from the model DB 160b based on the model information. Information is acquired, and the default value of each edge detection condition is adjusted based on the direction information that tends to fluctuate.

本実施形態において、機種DB160bには、ぶれやすい方向情報として、縦撮りの機種の場合は上下方向(図13に示す方向1)、横撮りの機種の場合は斜め方向(図13に示す方向7)は、携帯電話機の機種と対応して記憶されている。   In the present embodiment, in the model DB 160b, as direction information that is likely to shake, the vertical direction model (direction 1 shown in FIG. 13) is used for vertical shooting models, and the diagonal direction (direction 7 shown in FIG. 13) is used for horizontal shooting models. ) Is stored corresponding to the model of the mobile phone.

機種情報取得手段110bは、画像Dの付属情報などから画像Dを撮像した携帯電話機の機種情報を取得するものであってもよいし、ユーザに手動入力させるための入力手段であってもよい。   The model information acquisition unit 110b may acquire the model information of the mobile phone that has captured the image D from the attached information of the image D or the like, or may be an input unit that allows the user to input manually.

条件設定手段120bは、機種情報取得手段110により取得された画像Dを撮像した携帯電話機の機種に基づいて、画像Dにおいて、ぶれが生じやすい方向が前述の上下方向か斜め方向かのぶれやすい方向情報を取得し、ぶれやすい方向に近いほど、エッジを検出する方向を増やすようにエッジを検出する方向を設定する。具体的には、例えば、画像Dにおいてぶれが生じやすい方向は斜めの方向7である場合には、エッジを検出する方向として、図13における実線で示す8方向以外に、方向7を挟む2つの夫々の方向(方向6、方向8)との間に夫々1つの方向(点線により示される方向7a、7b)を増やす。また。後のボケの判別のために、増やした方向と直交する方向(方向7aに対して方向3a、方向7bに対して方向3b)も追加する。   The condition setting unit 120b is based on the model of the mobile phone that has captured the image D acquired by the model information acquisition unit 110. In the image D, the direction in which the blur is likely to occur is the above-described vertical direction or the diagonal direction. Information is acquired, and the edge detection direction is set so as to increase the edge detection direction as it is closer to the blurring direction. Specifically, for example, in the case where the direction in which the blur is likely to occur in the image D is the oblique direction 7, two directions sandwiching the direction 7 other than the eight directions indicated by the solid lines in FIG. One direction (directions 7a and 7b indicated by dotted lines) is increased between each direction (direction 6 and direction 8). Also. In order to determine the subsequent blur, a direction orthogonal to the increased direction (direction 3a with respect to direction 7a and direction 3b with respect to direction 7b) is also added.

また、エッジを検出する方向以外に、エッジ検出条件として、各方向に対応するエッジ強度の閾値t1、無効エッジ判別条件となる複雑度の閾値も調整する。具体的には、ぶれやすい方向に近い方向(ぶれやすい方向が方向7である場合には、図13に示す方向6、7a、7b、8)に対してエッジ強度の閾値t1を下げると共に、これらの方向の複雑度の閾値も下げるようにする。   In addition to the edge detection direction, as edge detection conditions, an edge strength threshold t1 corresponding to each direction and a complexity threshold serving as an invalid edge determination condition are also adjusted. Specifically, the edge strength threshold t1 is lowered with respect to the direction close to the direction in which the image is likely to shake (when the direction in which the image is likely to shake is the direction 7, the directions 6, 7a, 7b, and 8 shown in FIG. 13) The threshold of complexity in the direction is also lowered.

このように設定されたエッジ検出条件はエッジ検出手段12bに出力され、エッジ検出手段12bは、出力されてきたエッジ検出条件用いてエッジの検出を行う。   The edge detection conditions set in this way are output to the edge detection means 12b, and the edge detection means 12b performs edge detection using the output edge detection conditions.

図14は、本実施形態の画像処理システムBの動作を示すフローチャートである。図示のように、携帯電話機付属のデジタルカメラにより取得された画像Dに対して、まず、条件設定手段100bによりエッジ検出条件が設定される(S110)と共に、縮小手段10bにより縮小処理が施されて縮小画像D0となる(S111)。エッジ検出手段12bは、まず、縮小画像D0に対して、ステップS110において設定されたエッジ検出条件に含まれる複数の異なる方向毎に閾値t1以上の強度以上のエッジを検出する。次にエッジ検出手段12bは、検出された各方向毎の各々のエッジの座標位置に基づいて、画像Dを用いてこれらのエッジに対して、図3に示すようなエッジプロファイルを作成する(S112)。エッジ検出手段12bに備えられたエッジエッジ絞込手段14bは、ステップS110に設定されたエッジ検出条件に含まれる無効エッジ判別条件であるエッジの複雑度の閾値に基づいて、無効なエッジを除去して残りのエッジのプロファイルをエッジ特徴量取得手段に出力する(S114)。エッジ特徴量取得手段16bは、エッジ絞込手段14bから送信された各々のエッジのプロファイルに基づいて各エッジの幅を求めると共に、各方向毎にエッジ幅のヒストグラムを作成して、各エッジの幅および各方向のエッジ幅のヒストグラムを画像Dのエッジ特徴量Sとして解析手段20bに出力する(S116)。解析手段20bは、エッジ特徴量Sを用いて、まず画像Dのボケ方向およびボケ度Nを算出すると共に、画像Dがボケ画像であるか通常画像であるかを判別する(S120、S125)。画像Dが通常画像であれば(S125:Yes)、解析手段20bは、画像Dが通常画像であることを示す情報Pを出力手段60bに出力し(S130)、出力手段60bは、情報Pを受信すると、画像Dを印刷してプリントを得る(S135)。   FIG. 14 is a flowchart showing the operation of the image processing system B of the present embodiment. As shown in the figure, for the image D acquired by the digital camera attached to the cellular phone, first, the edge detection condition is set by the condition setting means 100b (S110), and the reduction process is performed by the reduction means 10b. The reduced image D0 is obtained (S111). First, the edge detection unit 12b detects an edge having an intensity equal to or higher than the threshold t1 for each of a plurality of different directions included in the edge detection condition set in step S110 for the reduced image D0. Next, the edge detection means 12b creates an edge profile as shown in FIG. 3 for these edges using the image D based on the detected coordinate position of each edge in each direction (S112). ). The edge edge narrowing means 14b provided in the edge detecting means 12b removes invalid edges based on the edge complexity threshold value which is an invalid edge determination condition included in the edge detection condition set in step S110. The remaining edge profile is output to the edge feature quantity acquisition means (S114). The edge feature quantity acquisition unit 16b obtains the width of each edge based on the profile of each edge transmitted from the edge narrowing unit 14b, and creates a histogram of the edge width for each direction to obtain the width of each edge. And the histogram of the edge width in each direction is output to the analyzing means 20b as the edge feature amount S of the image D (S116). The analysis unit 20b first calculates the blur direction and blur degree N of the image D using the edge feature quantity S, and determines whether the image D is a blur image or a normal image (S120, S125). If the image D is a normal image (S125: Yes), the analysis unit 20b outputs information P indicating that the image D is a normal image to the output unit 60b (S130), and the output unit 60b When received, the image D is printed to obtain a print (S135).

一方、ステップS125において、画像Dがボケ画像に判別されると(S125:No)、解析手段20bは、画像Dのぶれ度K、ボケ幅Lをさらに算出し、ステップS120において求められたボケ度Nおよびボケ方向と共にボケ情報Qとしてパラメータ設定手段30bに出力する(S140、S145)。パラメータ設定手段30bは、解析手段20bからのボケ情報Qに基づいて、1次元補正パラメータW1と2次元補正パラメータW2を求める。求められた1対の補正パラメータW1、W2を補正パラメータE0とし、ボケ度N、ぶれ度K、補正マスクM、M2のマスクサイズなどを調整してさらに複数の補正パラメータE1、E2、・・・を取得して、補正手段40bに出力する(S150)。   On the other hand, when the image D is determined to be a blurred image in step S125 (S125: No), the analysis unit 20b further calculates the blur degree K and the blur width L of the image D, and the degree of blur obtained in step S120. N and the blur direction are output to the parameter setting unit 30b as blur information Q (S140, S145). The parameter setting unit 30b obtains the one-dimensional correction parameter W1 and the two-dimensional correction parameter W2 based on the blur information Q from the analysis unit 20b. The obtained pair of correction parameters W1, W2 is set as a correction parameter E0, and a plurality of correction parameters E1, E2,... Are further adjusted by adjusting the degree of blur N, the degree of blur K, the mask size of the correction masks M, M2, etc. Is output to the correction means 40b (S150).

補正手段40bは、補正パラメータE0、E1、E2、・・・を画像Dに夫々適用して補正を施し、各補正パラメータに夫々対応する補正済み画像D’0、D’1、D’2、・・・を得る(S155)。   The correction unit 40b performs correction by applying the correction parameters E0, E1, E2,... To the image D, respectively, and corrected images D′ 0, D′ 1, D′ 2, respectively corresponding to the correction parameters. Are obtained (S155).

決定手段45bは、補正手段40bにより得られた各々の補正済み画像を図示しない表示手段に表示させ、図示しない入力手段を介して、ユーザが選択された補正済み画像を目的画像D’として決定して出力手段60bに出力する(S160)。   The determination unit 45b displays each corrected image obtained by the correction unit 40b on a display unit (not shown), and determines the corrected image selected by the user as the target image D ′ via the input unit (not shown). To the output means 60b (S160).

出力手段60bは、決定手段45bからの目的画像D’を印刷してプリントを得る(S170)。   The output unit 60b obtains a print by printing the target image D 'from the determination unit 45b (S170).

このように、本実施形態の画像処理システムBによれば、携帯電話機付属のデジタルカメラにより取得されたデジタル写真画像のボケの補正を効率良く行うためにデジタル写真画像に対してボケを判別してボケ情報を取得し、取得したボケ情報に基づいて補正用のパラメータを設定して補正する際に、デジタル写真画像を撮像した携帯電話機の機種情報を取得し、該機種情報に基づいて画像におけるぶれの生じやすい方向を得ると共に、このぶれやすい方向に近いほどエッジを検出する方向を増やすなどしてエッジ検出条件を調整することによって、ぼけの判別の精度を上げ、補正の効果を高めることができる。   As described above, according to the image processing system B of the present embodiment, in order to efficiently correct the blur of the digital photo image acquired by the digital camera attached to the mobile phone, the blur is discriminated from the digital photo image. When acquiring blur information and setting and correcting a correction parameter based on the acquired blur information, model information of the mobile phone that has captured the digital photo image is acquired, and blurring in the image is performed based on the model information. By adjusting the edge detection condition by increasing the direction of edge detection as it is closer to the blurring direction, the blur detection accuracy can be increased and the correction effect can be enhanced. .

以上、本発明の望ましい実施形態について説明したが、本発明の画像処理方法および装置並びにそのためのプログラムは、上述した実施形態に限られることがなく、本発明の主旨を逸脱しない限り、様々な増減、変化を加えることができる。   The preferred embodiment of the present invention has been described above, but the image processing method and apparatus of the present invention and the program therefor are not limited to the above-described embodiment, and various increases and decreases may be made without departing from the gist of the present invention. , Can make changes.

例えば、上述した実施形態の画像処理システムにおいて、デジタル写真画像に対して複数の異なる方向毎にエッジを検出して各方向におけるエッジの特徴量を取得し、このエッジの特徴量に基づいて画像中のボケ方向を含むボケの状態を判別するようにしているが、本発明の画像処理方法は、必ずしも複数の異なる方向毎にエッジを検出してボケ方向を判別する必要がない。例えば、デジタル写真画像に対して所定の閾値以上の強度を有するエッジを方向に関係なく検出し、検出されたエッジのエッジ幅の平均値をエッジ特徴量とし、このエッジ特徴量に基づいて画像中のボケの程度を判別するようにしてデジタル写真画像のボケの状態(ボケ情報)を判別するようにしてもよい。この場合、検出するエッジの強度の閾値などのエッジ検出条件や、ボケの状態を判別するための条件などを撮影条件情報に基づいて設定するようにすることによって、より正確にデジタル写真画像中のボケ情報を取得することができる。後にボケを補正する際に、ボケの程度に応じた補正用フィルタのサイズなどの補正パラメータを設定するようにすれば、良い補正効果を得ることができる。   For example, in the image processing system of the above-described embodiment, an edge is detected for each of a plurality of different directions with respect to a digital photographic image, and edge feature amounts in each direction are acquired. However, the image processing method of the present invention does not necessarily need to detect the edge for each of a plurality of different directions to determine the blur direction. For example, an edge having a strength equal to or greater than a predetermined threshold is detected for a digital photograph image regardless of the direction, and an average value of edge widths of detected edges is used as an edge feature amount. The blur state (blur information) of the digital photographic image may be determined by determining the degree of blur. In this case, an edge detection condition such as a threshold value of the edge intensity to be detected, a condition for determining the state of blur, and the like are set based on the shooting condition information, so that the digital photo image can be accurately detected. The blur information can be acquired. If correction parameters such as the size of a correction filter corresponding to the degree of blur are set later when blurring is corrected, a good correction effect can be obtained.

また、例えば、図2に示す画像処理システムBにおいて、条件設定手段100bは、エッジ検出条件のみを調整するようにしているが、画像を撮像した携帯電話機の機種情報に基づいてぶれやすさも取得し、該ぶれやすさに基づいてエッジ検出条件のみならず、解析手段20b用の判別条件も調整するようにしてもよい。   Also, for example, in the image processing system B shown in FIG. 2, the condition setting unit 100b adjusts only the edge detection condition, but also acquires the likelihood of blurring based on the model information of the mobile phone that captured the image. Based on the ease of shaking, not only the edge detection conditions but also the determination conditions for the analysis means 20b may be adjusted.

また、上述した実施形態の画像処理システムにおいて、パラメータ設定手段は複数の補正パラメータを設定し、補正手段は、これらの複数の補正パラメータを用いて補正を施して複数の補正済み画像を得、決定手段は、ユーザが複数の補正済み画像から選択した補正済み画像を目的画像として決定するようにしているが、補正制御手段と確認手段とを設け、パラメータ設定手段においてまず1つのみの補正パラメータを設定し、補正手段も一度には1つの補正済み画像のみを得、確信手段は、補正済み画像をユーザに確認させ、補正制御手段は、ユーザによる確認の結果が該補正済み画像を目的画像とすることになるまでパラメータ設定手段による補正パラメータを設定し直す処理と、補正手段による、設定し直された補正パラメータを用いて補正を行って補正済み画像を得る処理、確認手段による確認を繰り返させるようにして目的画像を決定するようにしてもよい。さらに、補正済み画像をユーザに確認させ、ユーザが気に入らなければ補正をキャンセルする、すなわち補正しないようにすることができるようにしてもよい。   In the image processing system according to the above-described embodiment, the parameter setting unit sets a plurality of correction parameters, and the correction unit performs correction using the plurality of correction parameters to obtain a plurality of corrected images, and determines The means determines a corrected image selected from a plurality of corrected images by the user as a target image, but includes a correction control means and a confirmation means, and the parameter setting means first sets only one correction parameter. The correction means also obtains only one corrected image at a time, the belief means allows the user to confirm the corrected image, and the correction control means determines that the result of confirmation by the user is the corrected image as the target image. The process of resetting the correction parameter by the parameter setting unit until it is necessary to use the correction parameter reset by the correction unit Processing to obtain a corrected image by performing the correction may be determined object image so as to repeat the confirmation by confirming means. Further, the corrected image may be confirmed by the user, and if the user does not like the correction, the correction may be canceled, that is, not corrected.

また、上述の実施形態の画像処理システムは、相関最小組の2つの方向のうち、平均エッジ幅が大きい方向をボケ方向としているが、例えば、相関最小組(相関値が1番目に小さい方向組)と、相関値が2番目に小さい方向組について、夫々ぶれ度を算出し、方向組の2つの方向のうち、平均エッジ幅が大きい方向をボケ方向とするようにして2つの方向組からボケ候補方向を夫々取得し、取得された2つのボケ候補方向を、算出された2つのぶれ度に応じて、ぶれ度が大きい方向組ほど、該方向組に含まれるボケ候補方向の重みが大きくなるように重み付けしてボケ方向を得るようにしてもよい。この場合、ボケ幅も、2つのボケ候補方向における夫々の平均エッジ幅を、ぶれ度が大きい方向組ほど、該方向組に含まれるボケ候補方向の平均エッジ幅の重みが大きくなるように重み付けしてボケ幅を得ることができる。   In the image processing system of the above-described embodiment, the direction with the larger average edge width is set as the blur direction among the two directions of the minimum correlation set. For example, the minimum correlation set (the direction set with the smallest correlation value) is used. ) And the direction set with the second smallest correlation value, the degree of blurring is calculated for each direction set, and the direction with the larger average edge width of the two directions in the direction set is set as the blurred direction. Candidate directions are acquired, and the obtained blur candidate directions are weighted according to the two calculated blur degrees, the greater the blur group, the greater the weight of the blur candidate directions included in the direction group. The blur direction may be obtained by weighting as described above. In this case, the blur width is also weighted so that the average edge width in each of the two blur candidate directions has a greater weight for the blur candidate direction included in the direction set in a direction set with a higher degree of blurring. The bokeh width can be obtained.

また、上述の実施形態の画像処理システムは、画像中のボケの有無に関わらず相関最小組の2つの方向のうち、平均エッジ幅が大きい方向をボケ方向にし、該ボケ方向に基づいてさらにボケ度を算出して、ボケ度に基づいて通常画像とボケ画像の判別を行い、ボケ画像として判別された画像に対してさらにぶれ度を求めるようにして補正パラメータの設定を行うようにしているが、例えば、相関最小組の相関値が所定の閾値Ta以上であれば、該画像におけるボケが「無方向」とし(即ち、画像が通常画像かピンボケ画像である)、ボケ方向が「無方向」である画像に対して、ボケ度を求め、ボケ度が所定の閾値Tbより小さい画像を通常画像として判別して補正しないようにする一方、ボケ度が閾値Tb以上の画像をピンボケ画像として判別して等方性補正用のパラメータのみを求めて補正を行うと共に、相関最小組の相関値がTaより小さい画像をぶれ画像として、相関最小組の平均エッジ幅の大きい方向をぶれ幅とするようにしてもよい。また、ぶれ画像に対して補正パラメータを設定する際に、ぶれ方向に作用する方向性補正パラメータのみを補正パラメータとして設定するようにしてもよいし、ぶれ度をさらに求め、ぶれ度に応じて等方性補正パラメータと方向性補正パラメータとを重み付け合算するようにして補正パラメータを設定するようにしてもよい。   In the image processing system of the above-described embodiment, the direction with the largest average edge width is set as the blur direction among the two directions of the minimum correlation set regardless of the presence / absence of blur in the image, and further blur is performed based on the blur direction. While calculating the degree, the normal image and the blurred image are discriminated based on the degree of blur, and the correction parameter is set so as to further obtain the degree of blur for the image discriminated as the blur image. For example, if the correlation value of the minimum correlation set is equal to or greater than a predetermined threshold value Ta, the blur in the image is “no direction” (that is, the image is a normal image or a defocused image), and the blur direction is “no direction”. An image with a degree of blur smaller than a predetermined threshold value Tb is determined as a normal image and is not corrected. On the other hand, an image with a degree of blur equal to or greater than the threshold value Tb is determined as a defocused image. Thus, only the parameters for isotropic correction are obtained and corrected, and an image having a correlation value of the smallest correlation set smaller than Ta is set as a blurred image, and a direction in which the average edge width of the smallest correlation set is large is set as the blur width. It may be. In addition, when setting the correction parameter for the blurred image, only the directionality correction parameter acting in the blur direction may be set as the correction parameter, or the degree of blur is further obtained, according to the degree of blur, etc. The correction parameter may be set by weighting and adding the directionality correction parameter and the directionality correction parameter.

また、上述の本実施形態の画像処理システムは、処理の効率を良くするために、デジタル写真画像が通常画像かボケ画像かを判別し、ボケ画像として判別された画像に対してのみぶれ度、ぶれ幅を算出してパラメータの設定や、補正を行うようにしているが、通常画像とボケ画像の判別をせず、全ての処理対象の画像に対して、ボケ度、ボケ幅、ぶれ度をボケ情報として算出し、ボケ情報に基づいてパラメータを設定して補正を行うようにしてもよい。通常画像のボケ度が小さいため、ボケ度に応じて設定された通常画像の補正パラメータは微小な補正を行う補正パラメータまたは補正しないパラメータとなり、ピンボケ画像のぶれ度が小さいため、ぶれ度に応じて等方性補正パラメータと方向性パラメータとを重み付け合算して補正パラメータを得る際に、方向性補正パラメータの重みが小さい乃至ゼロとなる。   In addition, the image processing system of the present embodiment described above determines whether a digital photo image is a normal image or a blurred image in order to improve processing efficiency, and the degree of blurring only with respect to an image determined as a blurred image, The blur width is calculated and the parameters are set and corrected, but the normal image and the blurred image are not distinguished, and the blur degree, blur width, and blur degree are set for all the processing target images. The correction may be performed by calculating as blur information and setting a parameter based on the blur information. Since the normal image has a low degree of blurring, the normal image correction parameters set according to the degree of blurring are correction parameters that perform fine correction or parameters that are not corrected, and the blurring degree of the out-of-focus image is small. When the isotropic correction parameter and the directionality parameter are weighted and summed to obtain a correction parameter, the weight of the directionality correction parameter is small or zero.

また、上述した実施形態において、解析手段は、図8に基づいて、前述した3つの要素に基づいてぶれ度を求めるようにしているが、ぶれ度を求める要素については増減があってもよい。例えば、前述した3つの要素のうちの2つのみを用いてもよく、要素を増やして、例えば相関最小組と、相関最小組と最も大きくずれた(図2における実線で示す方向組の場合、45度ずれた)方向組との相関値の差も視野に入れてぶれ度を求めるようにしてもよい。   In the above-described embodiment, the analysis unit obtains the degree of shake based on the above-described three elements based on FIG. 8, but the element for obtaining the degree of shake may be increased or decreased. For example, only two of the three elements described above may be used, and the number of elements is increased, for example, the largest correlation between the minimum correlation group and the minimum correlation group (in the case of the direction group indicated by the solid line in FIG. The degree of blur may be obtained by taking into account the difference in correlation value with the direction set (shifted by 45 degrees).

さらに、条件設定手段としては、図8に示す各閾値を調整するのではなく、例えば、ぶれやすさが大きい画像ほど、そのぶれ度を求める要素を少なくする(すなわちぶれ度を求める要素の数を調整する)ようにしてもよい。図8を例にすれば、例えば、ぶれやすさが大きい画像に対して、そのぶれ度を求める際に、図8(a)、図8(b)のみを用いてぶれ度を求めるようにしてもよい。   Furthermore, the condition setting means does not adjust the threshold values shown in FIG. 8. For example, an image having a higher degree of blurring reduces the number of elements for obtaining the degree of blurring (that is, the number of elements for obtaining the degree of blurring is reduced). Adjustment). Taking FIG. 8 as an example, for example, when determining the degree of blurring of an image with a high degree of blurring, the degree of blurring may be calculated using only FIGS. 8A and 8B. Also good.

また、無効なエッジを除去する際において、光源を含むエッジを無効なエッジとするようにしてもよい。光源を含むエッジは、例えば明度が所定の閾値以上のエッジとすることができる。この場合、エッジ検出条件を設定する際に、ぶれやすさが大きい画像ほど、エッジを検出する強度の閾値を下げ検出するエッジの数を増やすと共に、この明度の閾値を下げるようにして無効エッジ判別条件を厳しく設定するようにすればよい。   Further, when removing invalid edges, the edges including the light source may be invalid edges. The edge including the light source can be, for example, an edge whose brightness is a predetermined threshold value or more. In this case, when setting the edge detection condition, for images with a greater degree of blurring, the threshold for detecting the edge is lowered to increase the number of edges to be detected, and the brightness threshold is lowered to determine the invalid edge. The conditions should be set strictly.

また、上述の実施形態の画像処理システムにおいて、解析手段20は、ボケ画像となる画像Dに対して、そのボケがピンボケかぶれかの区別をせず、ボケ画像として判別された画像であれば、ぶれ度を求めてぶれ度に応じた重み付け係数(本実施形態の画像処理システムにおいては、ぶれ度そのものを重み付け係数にしている)で等方性補正パラメータと方向性補正パラメータを重み付け合算して補正パラメータを得て補正するようにしているが、例えば、ぶれ度が所定の閾値より小さいボケ画像をピンボケ画像とし、ピンボケ画像に対しては等方性補正パラメータのみを設定して補正を行うようにしてもよい。   In the image processing system of the above-described embodiment, the analysis unit 20 does not distinguish whether the blur is out of focus with respect to the image D that is a blur image, and is an image determined as a blur image. The degree of blur is determined and a weighting coefficient corresponding to the degree of blur (in the image processing system of this embodiment, the blur degree itself is used as a weighting coefficient) is corrected by weighted addition of the isotropic correction parameter and the directionality correction parameter. For example, a blur image whose blurring degree is smaller than a predetermined threshold is set as a blur image, and only the isotropic correction parameter is set for the blur image to perform correction. May be.

また、上述の実施形態の画像処理システムは、処理対象となるデジタル写真画像がボケ画像か通常画像かが知られていないことを前提にして、全てのデジタル写真画像に対して通常画像かボケ画像かの判別を行うようにしているが、ボケ画像のみを対象とする処理系、例えば顧客または操作者によりボケ画像に指定された画像を補正するような処理系などにおいては、通常画像とボケ画像の判別を行うことが必ずしも必要ではない。   In addition, the image processing system of the above-described embodiment assumes that it is not known whether the digital photographic image to be processed is a blurred image or a normal image. However, in a processing system that targets only a blurred image, for example, a processing system that corrects an image designated as a blurred image by a customer or an operator, a normal image and a blurred image are used. It is not always necessary to make this determination.

また、上述の実施形態の画像処理システムは、画像の縮小から目的画像を出力するまでの処理を1つの装置において行っているが、本発明は、このような態様に限られることがなく、例えば、画像処理システムを解析装置と処理装置とに分け、解析装置は、補正パラメータを設定するまでの処理を行うと共に、設定された補正パラメータを画像の付属情報として画像に付属させて記録媒体に記録し、処理装置は、記録媒体から画像を読み出して、画像の付属情報となる補正パラメータを用いて補正を行うようにしてもよい。   In the image processing system of the above-described embodiment, processing from image reduction to output of a target image is performed in one apparatus. However, the present invention is not limited to such an aspect. The image processing system is divided into an analysis device and a processing device, and the analysis device performs processing up to the setting of the correction parameter and records the set correction parameter on the recording medium as an attached information of the image. Then, the processing apparatus may read out the image from the recording medium and perform correction using the correction parameter that is the information attached to the image.

さらに、このような態様において、解析装置は、ボケ情報を求めるまでの処理のみをし、このボケ情報を画像の付属情報として画像に付属させて記録媒体に記録し、処理装置は、記録媒体から画像を読み出して、画像の付属情報となるボケ情報に基づいて補正パラメータを設定して補正を行うようにしてもよい。   Further, in such an aspect, the analysis apparatus performs only the processing until obtaining the blur information, attaches the blur information to the image as the auxiliary information of the image, and records the blur information on the recording medium. The image may be read out, and correction may be performed by setting a correction parameter based on blur information that is attached information of the image.

さらに、補正実行指示手段を設け、ボケ情報の取得までまたは補正パラメータの設定までの処理を行うが、補正実行指示手段から補正を実行するように指示されるまで補正を実行せず、補正を実行するように指示されてから補正を実行するようにしてもよい。   Furthermore, a correction execution instruction unit is provided to perform processing up to acquisition of blur information or correction parameter setting, but without performing correction until the correction execution instruction unit instructs to execute correction, the correction is executed. Correction may be executed after an instruction to do so.

また、上述の実施形態の画像処理システムは、記録媒体から読み出した画像に対して補正を行っているが、本発明は、ネットワークを介して送信するなどいかなる形態で画像を入力するシステムにも適用することができる。   The image processing system of the above-described embodiment corrects an image read from a recording medium. However, the present invention can be applied to a system that inputs an image in any form such as transmission via a network. can do.

本発明の第1の実施形態となる画像処理システムAの構成を示すブロック図1 is a block diagram showing a configuration of an image processing system A according to a first embodiment of the present invention. エッジを検出する際に用いられる方向を示す図Diagram showing the direction used when detecting edges エッジプロファイルを示す図Diagram showing edge profile 無効なエッジの例を示す図Diagram showing examples of invalid edges エッジ幅のヒストグラムを示す図Diagram showing edge width histogram 解析手段20aの動作を説明するための図The figure for demonstrating operation | movement of the analysis means 20a ボケ度の算出を説明するための図Diagram for explaining the calculation of the degree of blur ぶれ度の算出を説明するための図Diagram for explaining the calculation of blurring degree 画像処理システムAにおける条件設定手段100aの構成を示すブロック図The block diagram which shows the structure of the condition setting means 100a in the image processing system A 図1に示す実施形態の画像処理システムAの動作を示すフローチャートThe flowchart which shows operation | movement of the image processing system A of embodiment shown in FIG. 本発明の第2の実施形態となる画像処理システムBの構成を示すブロック図The block diagram which shows the structure of the image processing system B used as the 2nd Embodiment of this invention. エッジを検出方向を説明するための図Illustration for explaining the direction of edge detection 画像処理システムBにおける条件設定手段100bの構成を示すブロック図The block diagram which shows the structure of the condition setting means 100b in the image processing system B 画像処理システムBの動作を示すフローチャートFlow chart showing operation of image processing system B

符号の説明Explanation of symbols

1 記録媒体
10a,10b 縮小手段
12a,12b エッジ検出手段
14a,14b エッジ絞込手段
16a,16b エッジ特徴量取得手段
20a,20b 解析手段
30a,30b パラメータ設定手段
40a、40b 補正手段
45a,45b 決定手段
50a,50b 記憶手段
60a,60b 出力手段
100a,100b 条件設定手段
110a タグ情報読取手段
110b 機種情報取得手段
120a,120b 条件調整手段
150a,150b デフォルト条件データベース
160b 機種データベース
D デジタル写真画像
D0 縮小画像
D’ 目的画像
E 補正パラメータ
K ぶれ度
L ボケ幅
M1 1次元補正マスク
M2 2次元補正マスク
N ボケ度
Q ボケ情報
S エッジ特徴量
DESCRIPTION OF SYMBOLS 1 Recording medium 10a, 10b Reduction means 12a, 12b Edge detection means 14a, 14b Edge narrowing means 16a, 16b Edge feature-value acquisition means 20a, 20b Analysis means 30a, 30b Parameter setting means 40a, 40b Correction means 45a, 45b Determination means 50a, 50b Storage means 60a, 60b Output means 100a, 100b Condition setting means 110a Tag information reading means 110b Model information acquisition means 120a, 120b Condition adjustment means 150a, 150b Default condition database 160b Model database D Digital photograph image D0 Reduced image D ' Target image E Correction parameter K Blur degree L Blur width M1 One-dimensional correction mask M2 Two-dimensional correction mask N Blur degree Q Blur information S Edge feature

Claims (26)

デジタル写真画像に対して、所定のエッジ検出条件でエッジを検出し、
検出された前記エッジの特徴量を取得し、
該エッジ特徴量を用いて前記デジタル写真画像におけるボケの状態を所定の判別条件に基づいて判別する画像処理方法において、
前記デジタル写真画像の撮像条件を示す撮像条件情報を取得し、
該撮像条件情報に基づいて前記エッジ検出条件および/または前記判別条件を設定することを特徴とする画像処理方法。
For digital photographic images, detect edges with predetermined edge detection conditions,
Obtain the feature amount of the detected edge,
In the image processing method for determining a blur state in the digital photographic image based on a predetermined determination condition using the edge feature amount,
Obtaining imaging condition information indicating imaging conditions of the digital photographic image;
An image processing method, wherein the edge detection condition and / or the discrimination condition is set based on the imaging condition information.
前記検出が、複数の異なる方向毎に行われるものであり、
前記エッジの特徴量が、各前記方向に対して取得されるものであり、
前記ボケの状態が、少なくともボケ方向を含むものであることを特徴とする請求項1記載の画像処理方法。
The detection is performed in a plurality of different directions;
The feature quantity of the edge is acquired for each of the directions;
The image processing method according to claim 1, wherein the blur state includes at least a blur direction.
前記判別の結果に基づいて前記ボケを補正するためのパラメータを設定し、
該パラメータを用いて前記デジタル写真画像を補正することを特徴とする請求項1または2記載の画像処理方法。
Set a parameter for correcting the blur based on the determination result,
3. The image processing method according to claim 1, wherein the digital photographic image is corrected using the parameter.
デジタル写真画像に対して、所定のエッジ検出条件でエッジを検出するエッジ検出手段と、
検出された前記エッジの特徴量を取得するエッジ特徴量取得手段と、
該エッジ特徴量を用いて前記デジタル写真画像におけるボケの状態を所定の判別条件に基づいて判別するボケ判別手段とを有する画像処理装置において、
前記デジタル写真画像の撮像条件を示す撮像条件情報を取得する撮像条件情報取得手段と、
該撮像条件情報に基づいて前記エッジ検出条件および/または前記判別条件を設定する条件設定手段とを備えたことを特徴とする画像処理装置。
Edge detection means for detecting an edge under a predetermined edge detection condition for a digital photographic image;
Edge feature quantity acquisition means for acquiring a feature quantity of the detected edge;
An image processing apparatus having a blur determination unit that determines a blur state in the digital photographic image based on a predetermined determination condition using the edge feature amount.
Imaging condition information acquisition means for acquiring imaging condition information indicating an imaging condition of the digital photographic image;
An image processing apparatus comprising: condition setting means for setting the edge detection condition and / or the determination condition based on the imaging condition information.
前記検出手段が、複数の異なる方向毎に前記検出を行うものであり、
前記エッジ特徴量取得手段が、各前記方向に対して前記エッジ特徴量を取得するものであり、
前記ボケの状態が、少なくともボケ方向を含むものであることを特徴とする請求項4記載の画像処理装置。
The detection means performs the detection for each of a plurality of different directions;
The edge feature quantity acquisition means acquires the edge feature quantity for each of the directions;
The image processing apparatus according to claim 4, wherein the blur state includes at least a blur direction.
前記エッジ特徴量が、前記エッジの鮮鋭度、および前記エッジの鮮鋭度の分布を含むものであることを特徴とする請求項4また5記載の画像処理装置。   6. The image processing apparatus according to claim 4, wherein the edge feature amount includes a sharpness of the edge and a distribution of the sharpness of the edge. 前記撮像条件情報が、前記デジタル写真画像を撮像した際に該デジタル写真画像に有方向性のボケとなるぶれをもたらす確率の大きさを示すぶれやすさおよび/または前記ぶれが起きやすい方向を示すぶれやすい方向情報を含むものであり、
前記条件設定手段が、該ぶれやすさおよび/または前記ぶれやすい方向情報に基づいて前記エッジ検出条件および/または前記判別条件を設定するものであることを特徴とする請求項4から5のいずれか1項記載の画像処理装置。
The imaging condition information indicates the ease of blurring and / or the direction in which the blurring is likely to occur, indicating the magnitude of the probability of causing blurring that causes directional blur to the digital photographic image when the digital photographic image is captured. It contains direction information that tends to shake,
The said condition setting means sets the said edge detection condition and / or the said discrimination | determination condition based on the said ease of shaking and / or the direction information which is easy to shake, The any one of Claim 4 to 5 characterized by the above-mentioned. The image processing apparatus according to claim 1.
前記撮像条件情報取得手段が、前記デジタル写真画像に付属されたタグ情報に基づいて前記ぶれやすさおよび/または前記ぶれやすい方向情報を取得するものであることを特徴とする請求項7記載の画像処理装置。   8. The image according to claim 7, wherein the imaging condition information acquisition means acquires the ease of blurring and / or the direction information of the blur easily based on tag information attached to the digital photographic image. Processing equipment. 前記デジタル写真画像が、携帯電話機付属のデジタルカメラにより取得されたものであり、
前記撮像条件取得手段が、前記デジタル写真画像を撮像した前記携帯電話機の機種情報に基づいて前記ぶれやすさおよび/または前記ぶれやすい方向情報を取得するものであることを特徴とする請求項7または8記載の画像処理装置。
The digital photograph image is obtained by a digital camera attached to a mobile phone,
8. The image capturing condition acquisition unit is configured to acquire the ease of blurring and / or the direction information that is likely to blur based on model information of the mobile phone that has captured the digital photographic image. 8. The image processing apparatus according to 8.
前記エッジ検出条件が、所定のエッジ強度の閾値を含むものであり、
前記エッジ検出手段が、前記所定の閾値以上の強度を有するエッジのみを検出するものであり、
前記条件設定手段が、前記ぶれやすさが大きいほど前記所定の閾値を小さく設定するものであることを特徴とする請求項7から9のいずれか1項記載の画像処理装置。
The edge detection condition includes a threshold of a predetermined edge strength;
The edge detection means detects only edges having an intensity equal to or greater than the predetermined threshold;
10. The image processing apparatus according to claim 7, wherein the condition setting unit sets the predetermined threshold value smaller as the degree of blurring increases.
前記エッジ検出条件が、前記エッジ検出手段においてエッジを検出する前記複数の異なる方向および前記各方向に夫々対応する所定のエッジの強度の閾値を含むものであり、
前記エッジ検出手段が、各前記方向毎に該方向に対応する前記所定の閾値以上の強度を有するエッジのみを検出するものであり、
前記条件設定手段が、前記ぶれやすい方向に近い前記方向ほど該方向に対応する前記閾値を小さく設定するものであることを特徴とする請求項7から10のいずれか1項記載の画像処理装置。
The edge detection condition includes a plurality of different directions for detecting an edge in the edge detection means and a threshold value of a predetermined edge corresponding to each of the directions,
The edge detection means detects only edges having an intensity equal to or higher than the predetermined threshold corresponding to the direction for each direction;
11. The image processing apparatus according to claim 7, wherein the condition setting unit sets the threshold corresponding to the direction to be smaller as the direction is closer to the direction in which the blur easily occurs.
前記エッジ検出条件が、前記エッジが無効なエッジか否かを判別するための無効エッジ判別条件を含むものであり、
前記エッジ検出手段が、検出された前記エッジから、前記無効エッジ判別条件を満たすエッジを無効エッジとして除去する無効エッジ除去手段を備えたものであり、
前記条件設定手段が、前記ぶれやすさが大きいほど、前記無効エッジ判別条件を厳しく設定するものであることを特徴とする請求項10または11記載の画像処理装置。
The edge detection condition includes an invalid edge determination condition for determining whether or not the edge is an invalid edge;
The edge detection means includes invalid edge removal means for removing, as an invalid edge, an edge that satisfies the invalid edge determination condition from the detected edge,
12. The image processing apparatus according to claim 10, wherein the condition setting means sets the invalid edge determination condition more severely as the degree of blur is greater.
前記エッジ検出条件が、前記エッジ検出手段においてエッジを検出する前記複数の異なる方向および前記各方向に夫々対応する前記エッジが無効なエッジか否かを判別するための無効エッジ判別条件を含むものであり、
前記エッジ検出手段が、各前記方向毎に検出された前記エッジから、該方向に対応する前記無効エッジ判別条件を満たすエッジを無効エッジとして除去するエッジ除去手段を備えたものであり、
前記条件設定手段が、前記ぶれやすい方向に近い前記方向ほど該方向に対応する前記無効エッジ判別条件を厳しく設定するものであることを特徴とする請求項10から12のいずれか1項記載の画像処理装置。
The edge detection condition includes an invalid edge determination condition for determining whether the edge corresponding to each of the plurality of different directions and the respective directions in which the edge detection means detects an edge is an invalid edge. Yes,
The edge detection means comprises edge removal means for removing, as an invalid edge, an edge that satisfies the invalid edge determination condition corresponding to the direction from the edge detected for each of the directions,
The image according to any one of claims 10 to 12, wherein the condition setting means sets the invalid edge determination condition corresponding to the direction more strictly in the direction closer to the blurring direction. Processing equipment.
前記エッジ検出条件が、前記エッジ検出手段においてエッジを検出する前記複数の異なる方向を含むものであり、
前記条件設定手段が、前記ぶれやすさが大きいほど前記方向の数を増やすものであることを特徴とする請求項7から13のいずれか1項記載の画像処理装置。
The edge detection condition includes the plurality of different directions for detecting an edge in the edge detection means,
The image processing apparatus according to claim 7, wherein the condition setting unit increases the number of the directions as the blur easily increases.
前記エッジ検出条件が、前記エッジ検出手段においてエッジを検出する前記複数の異なる方向を含むものであり、
前記条件設定手段が、前記ぶれやすい方向に近いほど前記方向の数を増やすものであることを特徴とする請求項7から14のいずれか1項記載の画像処理装置。
The edge detection condition includes the plurality of different directions for detecting an edge in the edge detection means,
The image processing apparatus according to claim 7, wherein the condition setting unit increases the number of directions as the direction is more likely to be shaken.
前記ボケ判別手段が、前記ボケが有方向性のぶれである程度を示すぶれ度も判別するものであり、
前記判別条件が、前記ぶれ度を判別するためのぶれ度判別条件を含むものであり、
前記条件設定手段が、前記ぶれやすさが大きいほど前記ぶれ度判別条件を緩和に設定するものであることを特徴とする請求項7から15のいずれか1項記載の画像処理装置。
The blur determination means also determines a degree of blur that indicates a certain degree of blur due to directional blur;
The determination condition includes a blur degree determination condition for determining the blur degree,
The image processing apparatus according to claim 7, wherein the condition setting unit sets the blur degree determination condition to be relaxed as the blur easily increases.
前記ボケ判別手段が、前記ボケの程度の大小を示すボケ度も判別するものであり、
前記判別条件が、前記ボケ度を判別するためのボケ度判別条件を含むものであり、
前記条件設定手段が、前記ぶれやすさが大きいほど前記ボケ度判別条件を緩和に設定するものであることを特徴とする請求項8から16のいずれか1項記載の画像処理装置。
The blur determining means also determines a degree of blur indicating the degree of the blur;
The determination condition includes a blur degree determination condition for determining the blur degree,
17. The image processing apparatus according to claim 8, wherein the condition setting unit sets the blur degree determination condition to be relaxed as the blur easily increases.
前記ボケ判別手段による判別の結果に基づいて前記ボケを補正するためのパラメータを設定するパラメータ設定手段と、
該パラメータを用いて前記デジタル写真画像を補正する補正手段とを備えたことを特徴とする請求項4から17のいずれか1項記載の画像処理装置。
Parameter setting means for setting parameters for correcting the blur based on the result of determination by the blur determination means;
18. The image processing apparatus according to claim 4, further comprising a correcting unit that corrects the digital photographic image using the parameter.
前記ボケ判別手段が、前記ボケの程度の大小を示すボケ度も判別するものであり
前記パラメータ設定手段と前記補正手段が、前記ボケ度が所定の閾値以上の前記デジタル写真画像に対してのみ、前記パラメータの設定および前記補正を行うものであり、
前記条件設定手段が、該所定の閾値も設定するものであり、前記ぶれやすさが大きいほど前記所定の閾値を小さく設定することを特徴とする請求項18記載の画像処理装置。
The blur determining means also determines a degree of blur indicating the degree of the blur, and the parameter setting means and the correction means are only for the digital photographic image with the blur degree equal to or greater than a predetermined threshold. The setting of the parameter and the correction are performed,
The image processing apparatus according to claim 18, wherein the condition setting unit also sets the predetermined threshold value, and sets the predetermined threshold value smaller as the degree of blurring increases.
前記撮像条件情報が、前記デジタル写真画像を撮像した撮像装置のレンズのF値を含むものであり、
前記エッジ検出条件が、前記デジタル写真画像においてエッジを検出する領域を示すエッジ検出領域情報を含むものであり、
前記エッジ検出手段が、前記領域においてのみ前記エッジの検出を行うものであり、
前記条件設定手段が、前記F値が所定の閾値以下である前記デジタル写真画像に対して、前記領域を該デジタル写真画像の中央部分に設定するものであることを特徴とする請求項8から19のいずれか1項記載の画像処理装置。
The imaging condition information includes an F value of a lens of an imaging device that has captured the digital photographic image,
The edge detection condition includes edge detection area information indicating an area for detecting an edge in the digital photo image;
The edge detection means detects the edge only in the region;
20. The condition setting means is for setting the region in a central portion of the digital photographic image with respect to the digital photographic image having the F value equal to or less than a predetermined threshold. The image processing apparatus according to claim 1.
前記撮像条件情報が、前記デジタル写真画像がズーム撮像により得られたものか否かを示す情報を含むものであり、
前記エッジ検出条件が、前記デジタル写真画像においてエッジを検出する領域を示すエッジ検出領域情報を含むものであり、
前記エッジ検出手段が、前記領域においてのみ前記エッジの検出を行うものであり、
前記条件設定手段が、ズーム撮像により得られた前記デジタル写真画像に対して、前記領域を該デジタル写真画像の中央部分に設定するものであることを特徴とする請求項8から19のいずれか1項記載の画像処理装置。
The imaging condition information includes information indicating whether the digital photographic image is obtained by zoom imaging;
The edge detection condition includes edge detection area information indicating an area for detecting an edge in the digital photo image;
The edge detection means detects the edge only in the region;
20. The method according to claim 8, wherein the condition setting unit is configured to set the region in a central portion of the digital photographic image with respect to the digital photographic image obtained by zoom imaging. The image processing apparatus according to item.
前記撮像条件情報が、前記デジタル写真画像の圧縮強度を示す情報を含むものであり、
前記ボケ判別手段が、前記ボケの程度の大小を示すボケ度も判別するものであり、
前記判別条件が、前記ボケ度を判別するためのボケ度判別条件を含むものであり、
前記条件設定手段が、前記圧縮強度が大きいほど前記ボケ度判別条件を厳しく設定するものであることを特徴とする請求項8から21のいずれか1項記載の画像処理装置。
The imaging condition information includes information indicating the compression strength of the digital photographic image,
The blur determining means also determines a degree of blur indicating the degree of the blur;
The determination condition includes a blur degree determination condition for determining the blur degree,
The image processing apparatus according to any one of claims 8 to 21, wherein the condition setting unit sets the blur degree determination condition more severely as the compression strength increases.
前記ボケ判別手段による判別の結果に基づいて前記ボケを補正するためのパラメータを設定するパラメータ設定手段と、
該パラメータを用いて前記デジタル写真画像を補正する補正手段とを備え、
前記ボケ判別手段が、前記ボケの程度の大小を示すボケ度も判別するものであり、
前記パラメータ設定手段と前記補正手段が、前記ボケ度が所定の閾値以上の前記デジタル写真画像に対してのみ、前記パラメータの設定および前記補正を行うものであり、
前記条件設定手段が、該所定の閾値も設定するものであり、前記圧縮強度が大きいほど該所定の閾値を大きく設定することを特徴とする請求項8から21のいずれか1項記載の画像処理装置。
Parameter setting means for setting parameters for correcting the blur based on the result of determination by the blur determination means;
Correction means for correcting the digital photographic image using the parameter,
The blur determining means also determines a degree of blur indicating the degree of the blur;
The parameter setting unit and the correction unit perform the setting of the parameter and the correction only for the digital photograph image in which the degree of blur is equal to or greater than a predetermined threshold,
The image processing according to any one of claims 8 to 21, wherein the condition setting means also sets the predetermined threshold value, and sets the predetermined threshold value larger as the compression strength increases. apparatus.
デジタル写真画像に対して、所定のエッジ検出条件でエッジを検出する処理と、
検出された前記エッジの特徴量を取得する処理と、
該エッジ特徴量を用いて前記デジタル写真画像におけるボケの状態を所定の判別条件に基づいて判別する処理とを有する画像処理をコンピュータに実行させるプログラムであって、
前記画像処理が、前記デジタル写真画像の撮像条件を示す撮像条件情報を取得する処理と、
該撮像条件情報に基づいて前記エッジ検出条件および/または前記判別条件を設定する処理とを更に有することを特徴とするプログラム。
A process for detecting an edge under a predetermined edge detection condition for a digital photo image;
Processing for acquiring the feature amount of the detected edge;
A program for causing a computer to execute image processing including processing for determining a blurring state in the digital photographic image based on a predetermined determination condition using the edge feature amount,
The image processing is processing for acquiring imaging condition information indicating imaging conditions of the digital photographic image;
The program further comprising: processing for setting the edge detection condition and / or the determination condition based on the imaging condition information.
前記検出が、複数の異なる方向毎に行われるものであり、
前記エッジの特徴量が、各前記方向に対して取得されるものであり、
前記ボケの状態が、少なくてもボケ方向を含むものであることを特徴とする請求項24記載のプログラム。
The detection is performed in a plurality of different directions;
The feature quantity of the edge is acquired for each of the directions;
25. The program according to claim 24, wherein the blur state includes at least a blur direction.
前記画像処理が、前記判別の結果に基づいて前記ボケを補正するためのパラメータを設定する処理と、
該パラメータを用いて前記デジタル写真画像を補正する処理とを有することを特徴とする請求項24または25記載のプログラム。
A process of setting a parameter for correcting the blur based on the result of the determination;
26. The program according to claim 24, further comprising a process of correcting the digital photographic image using the parameter.
JP2004169699A 2003-09-25 2004-06-08 Image processing method, apparatus, and program Expired - Fee Related JP4493416B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2004169699A JP4493416B2 (en) 2003-11-26 2004-06-08 Image processing method, apparatus, and program
US10/949,745 US7720302B2 (en) 2003-09-25 2004-09-27 Method, apparatus and program for image processing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003395533 2003-11-26
JP2004169699A JP4493416B2 (en) 2003-11-26 2004-06-08 Image processing method, apparatus, and program

Publications (2)

Publication Number Publication Date
JP2005182745A true JP2005182745A (en) 2005-07-07
JP4493416B2 JP4493416B2 (en) 2010-06-30

Family

ID=34797215

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004169699A Expired - Fee Related JP4493416B2 (en) 2003-09-25 2004-06-08 Image processing method, apparatus, and program

Country Status (1)

Country Link
JP (1) JP4493416B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008187313A (en) * 2007-01-29 2008-08-14 Fuji Xerox Co Ltd Image information management system, device, and program, and image forming apparatus and program
JP2009169943A (en) * 2007-12-18 2009-07-30 Sony Corp Image processing apparatus, method, and program
JP2009294781A (en) * 2008-06-03 2009-12-17 Toyota Central R&D Labs Inc Device for deciding object presence
JP2010217954A (en) * 2009-03-13 2010-09-30 Sony Corp Image processing apparatus and method, learning apparatus and method, and program
JP2011217130A (en) * 2010-03-31 2011-10-27 Fujifilm Corp Apparatus, process, and program for image encoding
JP2012073703A (en) * 2010-09-28 2012-04-12 Nippon Hoso Kyokai <Nhk> Image blur amount calculation device and program for the same
CN102842110A (en) * 2011-06-20 2012-12-26 富士胶片株式会社 Image processing device and image processing method
JP2013005346A (en) * 2011-06-20 2013-01-07 Fujifilm Corp Image processing device, image processing method and image processing program
JP2013012906A (en) * 2011-06-29 2013-01-17 Fujifilm Corp Image processing apparatus, image processing method, and image processing program
JP2014067044A (en) * 2007-10-22 2014-04-17 Tai Hyuk Nam Method for generating focus signal in autofocus image system
JP2014513809A (en) * 2010-12-07 2014-06-05 ナム タイ,ヒョク Autofocus image system
JP2014123805A (en) * 2012-12-20 2014-07-03 Canon Inc Image processing apparatus, imaging apparatus, image processing program, and image processing method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008187313A (en) * 2007-01-29 2008-08-14 Fuji Xerox Co Ltd Image information management system, device, and program, and image forming apparatus and program
JP2014067044A (en) * 2007-10-22 2014-04-17 Tai Hyuk Nam Method for generating focus signal in autofocus image system
JP2009169943A (en) * 2007-12-18 2009-07-30 Sony Corp Image processing apparatus, method, and program
JP2009294781A (en) * 2008-06-03 2009-12-17 Toyota Central R&D Labs Inc Device for deciding object presence
JP2010217954A (en) * 2009-03-13 2010-09-30 Sony Corp Image processing apparatus and method, learning apparatus and method, and program
JP2011217130A (en) * 2010-03-31 2011-10-27 Fujifilm Corp Apparatus, process, and program for image encoding
JP2012073703A (en) * 2010-09-28 2012-04-12 Nippon Hoso Kyokai <Nhk> Image blur amount calculation device and program for the same
JP2014513809A (en) * 2010-12-07 2014-06-05 ナム タイ,ヒョク Autofocus image system
CN102842110A (en) * 2011-06-20 2012-12-26 富士胶片株式会社 Image processing device and image processing method
JP2013005346A (en) * 2011-06-20 2013-01-07 Fujifilm Corp Image processing device, image processing method and image processing program
CN102842110B (en) * 2011-06-20 2015-05-06 富士胶片株式会社 Image processing device and image processing method
US9036936B2 (en) 2011-06-20 2015-05-19 Fujifilm Corporation Image processing device, image processing method, and image processing program
JP2013012906A (en) * 2011-06-29 2013-01-17 Fujifilm Corp Image processing apparatus, image processing method, and image processing program
JP2014123805A (en) * 2012-12-20 2014-07-03 Canon Inc Image processing apparatus, imaging apparatus, image processing program, and image processing method
US9148552B2 (en) 2012-12-20 2015-09-29 Canon Kabushiki Kaisha Image processing apparatus, image pickup apparatus, non-transitory storage medium storing image processing program and image processing method

Also Published As

Publication number Publication date
JP4493416B2 (en) 2010-06-30

Similar Documents

Publication Publication Date Title
US7720302B2 (en) Method, apparatus and program for image processing
US7586520B2 (en) Image correction apparatus, image correction program storage medium, image correction method, and image correction system
KR101060488B1 (en) Optimal Image Selection Method and Device
KR101297524B1 (en) Response to detection of blur in an image
US7599568B2 (en) Image processing method, apparatus, and program
JP2005309559A (en) Image processing method, device and program
JP4415188B2 (en) Image shooting device
JP4624947B2 (en) Image trimming method, apparatus and program
US20050249429A1 (en) Method, apparatus, and program for image processing
JP4515208B2 (en) Image processing method, apparatus, and program
US20050244077A1 (en) Method, apparatus and program for image processing
WO2006125858A1 (en) Image processing for pattern detection
JP4493416B2 (en) Image processing method, apparatus, and program
JP5800187B2 (en) Imaging apparatus and distance information acquisition method
JP2005332381A (en) Image processing method, device and program
JP3992720B2 (en) Image correction apparatus, image correction method, program, and recording medium
JP2010279054A (en) Image pickup device, image processing device, image pickup method, and image processing method
JP2006049949A (en) Image processing apparatus, image processing method and program thereof
JP2005122688A (en) Image processing method, device, and program
JP5720488B2 (en) Imaging apparatus and distance information acquisition method
JP2005332382A (en) Image processing method, device and program
JP4043499B2 (en) Image correction apparatus and image correction method
JP4685965B2 (en) Image processing method, apparatus, and program
JP4527439B2 (en) Image processing method, apparatus, and program
JP5029647B2 (en) Subject tracking device and camera

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061207

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070308

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100304

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100406

R150 Certificate of patent or registration of utility model

Ref document number: 4493416

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140416

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees