JP5405531B2 - Image processing apparatus, image processing method, and image processing program - Google Patents

Image processing apparatus, image processing method, and image processing program Download PDF

Info

Publication number
JP5405531B2
JP5405531B2 JP2011144306A JP2011144306A JP5405531B2 JP 5405531 B2 JP5405531 B2 JP 5405531B2 JP 2011144306 A JP2011144306 A JP 2011144306A JP 2011144306 A JP2011144306 A JP 2011144306A JP 5405531 B2 JP5405531 B2 JP 5405531B2
Authority
JP
Japan
Prior art keywords
image
evaluation
blur
depth
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2011144306A
Other languages
Japanese (ja)
Other versions
JP2013012906A (en
Inventor
一真 塚越
啓 山路
徹也 松本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2011144306A priority Critical patent/JP5405531B2/en
Priority to US13/478,501 priority patent/US9036936B2/en
Priority to CN201210177069.2A priority patent/CN102842110B/en
Publication of JP2013012906A publication Critical patent/JP2013012906A/en
Application granted granted Critical
Publication of JP5405531B2 publication Critical patent/JP5405531B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Adjustment Of Camera Lenses (AREA)
  • Studio Devices (AREA)

Description

本発明は、ボケもしくはブレ(以下、ボケブレという)を含む画像が、ユーザ(撮影者)により意図的にボケブレが表現された成功画像なのか、そうではない失敗画像なのかを評価する画像処理装置、画像処理方法および画像処理プログラムに関するものである。   The present invention relates to an image processing apparatus that evaluates whether an image including blur or blur (hereinafter referred to as blur) is a success image in which the blur is intentionally expressed by a user (photographer) or a failure image that is not. The present invention relates to an image processing method and an image processing program.

ユーザが、デジタルカメラ等の撮影装置で撮影された膨大な枚数の画像の中から、ボケブレのない成功画像を優先的に抽出する作業を行う場合がある。しかし、ボケブレを含む画像であっても、ユーザにより意図的にボケブレが表現された画像もあるため、そのような意図的にボケブレが表現された成功画像なのか、そうではない失敗画像(ボケブレ画像)なのかを判定することが難しいという問題があった。   In some cases, the user preferentially extracts a successful image without blurring from a vast number of images shot by a shooting device such as a digital camera. However, even an image including blurring may be an image in which blurring is intentionally expressed by the user, so that it is a success image in which blurring is intentionally expressed, or a failure image (blurring image that is not so) There was a problem that it was difficult to determine whether or not.

これに対し、特許文献1には、被写体を撮影して画像データを生成し、撮影時の撮影条件に基づき、画像データが、撮影時にぶれたおそれがあるぶれ画像データであるか否かを判断し、その判断結果情報を画像データと関連付けて格納する画像生成方法が記載されている。また、同文献には、ぶれ情報に基づき、画像データが、ぶれ画像データである場合に、ぶれ画像データのぶれを補正することが記載されている。   On the other hand, in Patent Document 1, a subject is photographed to generate image data, and based on the photographing conditions at the time of photographing, it is determined whether the image data is blurred image data that may be blurred at the time of photographing. An image generation method for storing the determination result information in association with image data is described. Further, this document describes that, based on blur information, when the image data is blur image data, the blur of the blur image data is corrected.

また、特許文献2には、絞り情報から取得した絞り値がユーザによるマニュアル設定で、かつ所定の値以上である場合に、標準撮影条件で絞り値が設定される場合よりも強いシャープネス調整を実行する画像処理装置であって、動作モード情報に基づいて、画像データのシャープネスを調整する画質調整を実行するか否かの判定を行い、画質調整を実行すると判定したときに、シャープネス調整の度合いを絞り情報とレンズ焦点距離情報とに基づいて決定する画像処理装置が記載されている。   Further, in Patent Document 2, when the aperture value obtained from aperture information is manually set by the user and is equal to or larger than a predetermined value, sharpness adjustment stronger than when the aperture value is set under standard shooting conditions is executed. And determining whether or not to execute image quality adjustment for adjusting the sharpness of the image data based on the operation mode information. When it is determined to perform the image quality adjustment, the degree of sharpness adjustment is determined. An image processing apparatus that is determined based on aperture information and lens focal length information is described.

特開2006−217472号公報JP 2006-217472 A 特許第3797346号公報Japanese Patent No. 3797346

特許文献1では、撮影された画像の画像データが、ぶれたおそれがあるぶれ画像データであるか否かを撮影後に判断するために、画像の撮影時にあらかじめぶれの有無を判断して、その判断結果情報を画像データに関連付けて格納しておく必要がある。また、同文献では、画像が、ユーザにより意図的にボケブレが表現された成功画像なのか、そうではない失敗画像なのかを評価することができない。   In Patent Document 1, in order to determine whether or not the image data of a captured image is blurred image data that may be blurred, the presence or absence of blurring is determined in advance when the image is captured. The result information needs to be stored in association with the image data. Further, in this document, it cannot be evaluated whether the image is a success image in which blurring is intentionally expressed by the user or a failure image that is not.

また、特許文献2では、画像データのシャープネスを調整する画質調整を実行するか否かの判定に動作モード情報が必要である。また、同文献は、画像のボケブレの判定ではなく、シャープネスの調整を行うものであって、特許文献1の場合と同様に、画像が、ユーザにより意図的にボケブレが表現された成功画像なのか、そうではない失敗画像なのかを評価することができない。   In Patent Document 2, operation mode information is required for determining whether or not to execute image quality adjustment for adjusting the sharpness of image data. In addition, this document is not for determining blurring of an image but for adjusting sharpness. As in Patent Document 1, is the image a successful image in which blurring is intentionally expressed by the user? It is not possible to evaluate whether this is a failed image.

被写体にのみピントが合って前景や背景がボケた画像を魅力的と感じる人、場合は多く、また、レンズによっては全域をボカさずに撮影することがそもそも困難である。このような画像に対し、画像のピクセル情報のみから、画像のボケブレを検出して評価すると、ユーザにより意図的に表現されたボケブレや不可避のボケブレまで悪評価されて、ユーザの期待する評価結果を得ることができないという問題があった。   There are many people who find it attractive to focus on only the subject and the foreground and background are blurred, and depending on the lens, it is difficult to shoot without blurring the entire area. For such an image, if the blurring of the image is detected and evaluated only from the pixel information of the image, the blurring intentionally expressed by the user and the inevitable blurring are badly evaluated, and the evaluation result expected by the user is obtained. There was a problem that could not be obtained.

本発明の目的は、ユーザにより意図的にボケブレが表現された成功画像なのか、そうではない失敗画像なのかを正しく評価することができる画像処理装置、画像処理方法および画像処理プログラムを提供することにある。   An object of the present invention is to provide an image processing apparatus, an image processing method, and an image processing program that can correctly evaluate whether a successful image in which blurring is intentionally expressed by a user or a failed image that is not. It is in.

上記目的を達成するために、本発明は、画像を取得する画像取得部と、
前記画像取得部で取得された画像の付帯情報に基づいて、該画像の被写界深度を表す概算値を算出する被写界深度算出部と、
前記画像を複数の評価領域に分割する画像分割部と、
前記画像分割部により分割された各々の評価領域について、ボケもしくはブレを検出し、該ボケもしくはブレの程度を評価するための評価値を算出するボケブレ評価を実施し、前記被写界深度の概算値に基づいて、前記被写界深度が浅くなるほど、前記画像の評価値が大きくなるように、前記評価領域の評価値から前記画像の評価値を算出するボケブレ評価部とを備えることを特徴とする画像処理装置を提供するものである。
In order to achieve the above object, the present invention provides an image acquisition unit that acquires an image;
A depth-of-field calculating unit that calculates an approximate value representing the depth of field of the image based on the incidental information of the image acquired by the image acquiring unit;
An image dividing unit for dividing the image into a plurality of evaluation regions;
For each evaluation region divided by the image dividing unit, blur or blur is detected, blur evaluation is performed to calculate an evaluation value for evaluating the degree of blur or blur, and the depth of field is estimated A blurring evaluation unit that calculates the evaluation value of the image from the evaluation value of the evaluation region so that the evaluation value of the image increases as the depth of field becomes shallower based on the value. An image processing apparatus is provided.

ここで、前記ボケブレ評価部は、
前記被写界深度の概算値に基づいて、前記被写界深度が浅くなるほど、前記画像がボケブレ画像ではないと判定するために許容される、ボケブレ領域であると判定される前記評価領域の上限の個数を表すボケブレ許容領域数が多くなるようにし、
前記画像分割部により分割された各々の評価領域について前記ボケブレ評価を実施して、各々の該評価領域の評価値を算出し、
各々の前記評価領域の評価値が高い方から、(前記評価領域の総数−前記ボケブレ許容領域数)の個数の評価領域の評価値を加算平均することにより、前記画像の評価値を算出するものであることが好ましい。
Here, the blur blur evaluation unit
On the basis of the estimate of depth of field, the higher the depth of field becomes shallow, the image is allowed to determine not the Bokebure image, the upper limit of the evaluation region is determined to be Bokebure region as Bokebure allowed number of regions is increased indicating the number of,
Performing the blur evaluation for each evaluation region divided by the image dividing unit, calculating an evaluation value of each evaluation region,
The evaluation value of the image is calculated by averaging the evaluation values of the evaluation regions of (the total number of evaluation regions−the number of blur-allowable regions) from the higher evaluation value of each of the evaluation regions. It is preferable that

また、前記ボケブレ評価部は、さらに、各々の前記評価領域の評価値に基づいて、各々の該評価領域が前記ボケブレ領域であるのか否かを判定し、
前記ボケブレ領域であると判定された評価領域の個数が前記ボケブレ許容領域数を超える場合に、前記画像が前記ボケブレ画像であると判定するものであることが好ましい。
Further, the blur blur evaluation unit further determines whether each of the evaluation regions is the blur region based on the evaluation value of each of the evaluation regions,
It is preferable that the image is determined to be the blurred image when the number of evaluation regions determined to be the blurred region exceeds the number of allowable blur regions.

また、前記画像分割部は、前記画像を、前記評価領域として、被写体領域とそれ以外の1以上の領域とに分割するものであり、
前記ボケブレ評価部は、前記画像分割部により分割された被写体領域とそれ以外の1以上の領域の各々について、前記ボケブレ評価を実施して評価値を算出し、
前記被写界深度の概算値に基づいて、前記被写界深度が浅くなるほど、前記被写体領域の重み付けがそれ以外の1以上の領域の重み付けよりも大きくなるようにし、前記被写体領域とそれ以外の1以上の領域の評価値を重み付けして合算することにより、前記画像の評価値を算出するものであることが好ましい。
Further, the image dividing unit divides the image into a subject area and one or more other areas as the evaluation area,
The blur blur evaluation unit calculates the evaluation value by performing the blur blur evaluation on each of the subject region divided by the image dividing unit and one or more other regions,
Based on the approximate value of the depth of field, as the depth of field becomes shallower, the weight of the subject area is larger than the weight of one or more other areas, and the subject area and the other areas It is preferable that the evaluation value of the image is calculated by weighting and adding the evaluation values of one or more regions.

また、前記ボケブレ評価部は、前記画像が、前記被写体領域とそれ以外の2以上の領域とに分割された場合に、該被写体領域からの距離に応じて、該被写体領域以外の2以上の領域の重み付けを小さくするものであることが好ましい。   Further, the blur blur evaluation unit, when the image is divided into the subject region and two or more other regions, according to the distance from the subject region, two or more regions other than the subject region It is preferable to reduce the weighting.

また、前記画像分割部は、顔検出、人物検出、ペット検出、フォーカスエリア検出のいずれかにより、前記画像から前記被写体領域を抽出するものであることが好ましい。   The image dividing unit preferably extracts the subject region from the image by any one of face detection, person detection, pet detection, and focus area detection.

また、前記画像分割部は、オートフォーカス時に、ピントを合わせた測距点に対応する領域を前記被写体領域とするものであることが好ましい。   In addition, it is preferable that the image dividing unit sets an area corresponding to a focused distance measuring point as the subject area during autofocus.

また、前記被写界深度算出部は、前記付帯情報として、前記画像の撮影時に取得される絞り値を、前記被写界深度の概算値として使用するものであることが好ましい。   Moreover, it is preferable that the said depth of field calculation part uses the aperture value acquired at the time of imaging | photography of the said image as said auxiliary information as an approximate value of the said depth of field.

また、前記被写界深度算出部は、前記付帯情報として、前記画像の撮影時に取得されるレンズの焦点距離および絞り値を用いて、前記レンズ焦点距離/前記絞り値により前記被写界深度の概算値を算出するものであることが好ましい。 Further, the depth of field calculation unit uses the focal length and the aperture value of the lens acquired at the time of capturing the image as the incidental information, and uses the focal length of the lens / the aperture value to calculate the depth of field. It is preferable to calculate an approximate value.

また、前記被写界深度算出部は、前記付帯情報として、さらに、前記画像の撮影時に取得される、カメラと被写体との間の距離を用いて、該距離が近くなるほど、前記被写界深度の概算値が大きくなるように調整するものであることが好ましい。   Further, the depth of field calculation unit further uses the distance between the camera and the subject acquired as the incidental information as the auxiliary information, and the closer the distance, the deeper the depth of field. It is preferable to adjust so that the approximate value of becomes large.

また、前記ボケブレ評価部は、前記画像の評価値を算出する場合、前記付帯情報に含まれる前記画像の撮影時の絞り値に応じて、該絞り値が小さくなるほど前記画像の評価値が大きくなるように調整するものであることが好ましい。   Further, when calculating the evaluation value of the image, the blurring evaluation unit increases the evaluation value of the image as the aperture value decreases according to the aperture value at the time of shooting of the image included in the auxiliary information. It is preferable to make adjustments as described above.

さらに、複数の前記画像の評価値に基づいて、複数の該画像を並び替える画像処理部を備えることが好ましい。   Furthermore, it is preferable to include an image processing unit that rearranges the plurality of images based on the evaluation values of the plurality of images.

さらに、前記ボケブレ評価部により前記画像が前記ボケブレ画像であると判定された場合に、前記評価値に基づいて、前記画像のボケもしくはブレを軽減するための補正処理を施す画像処理部を備えることが好ましい。   And an image processing unit that performs a correction process to reduce blur or blur of the image based on the evaluation value when the image is determined to be the blurred image by the blur blur evaluation unit. Is preferred.

また、本発明は、画像を取得する画像取得ステップと、
前記画像取得ステップで取得された画像の付帯情報に基づいて、該画像の被写界深度を表す概算値を算出する被写界深度算出ステップと、
前記画像を複数の評価領域に分割する画像分割ステップと、
前記画像分割ステップにより分割された各々の評価領域について、ボケもしくはブレを検出し、該ボケもしくはブレの程度を評価するための評価値を算出するボケブレ評価を実施し、前記被写界深度の概算値に基づいて、前記被写界深度が浅くなるほど、前記画像の評価値が大きくなるように、前記評価領域の評価値から前記画像の評価値を算出するボケブレ評価ステップと、を備えることを特徴とする画像処理方法を提供する。
The present invention also provides an image acquisition step for acquiring an image;
Depth of field calculation step of calculating an approximate value representing the depth of field of the image based on the incidental information of the image acquired in the image acquisition step;
An image dividing step of dividing the image into a plurality of evaluation regions;
For each evaluation region divided by the image division step, blur or blur is detected, blur evaluation is performed to calculate an evaluation value for evaluating the degree of blur or blur, and the depth of field is estimated And a blur blur evaluation step of calculating the evaluation value of the image from the evaluation value of the evaluation area so that the evaluation value of the image increases as the depth of field becomes shallower based on the value. An image processing method is provided.

また、本発明は、上記に記載の各々のステップをコンピュータに実行させる画像処理プログラムを提供する。   The present invention also provides an image processing program that causes a computer to execute each of the steps described above.

また、本発明は、上記に記載の各々のステップをコンピュータに実行させる画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体を提供する。   The present invention also provides a computer-readable recording medium on which an image processing program for causing a computer to execute each of the steps described above is recorded.

本発明によれば、画像の付帯情報を利用して、ユーザの意図を推定することにより、ボケブレを含む画像が、ユーザにより意図的にボケブレが表現された成功画像なのか、そうではない失敗画像なのかを正しく評価することができる。また、本発明によれば、画像を複数の評価領域に分割し、それぞれの評価領域の評価値を、被写界深度の概算値に基づいて、画像毎に異なる基準で評価することにより、ユーザの意図、画像毎の状態、画像内の重要ポイント(被写体領域等)を考慮した評価が可能となる。   According to the present invention, the user's intention is estimated by using the incidental information of the image, so that the image including the blur is a successful image in which the blur is intentionally expressed by the user, or a failure image that is not the case. Can be evaluated correctly. In addition, according to the present invention, an image is divided into a plurality of evaluation areas, and the evaluation value of each evaluation area is evaluated according to different criteria for each image based on the approximate value of the depth of field. Can be evaluated in consideration of the intention, state of each image, and important points (subject area, etc.) in the image.

本発明の画像処理装置の構成を表すブロック概念図である。It is a block conceptual diagram showing the structure of the image processing apparatus of this invention. 図1に示す画像処理装置の動作を表す第1の実施形態のフローチャートである。3 is a flowchart of the first embodiment showing the operation of the image processing apparatus shown in FIG. 1. 画像を16個の評価領域に分割した場合の例である。This is an example in which an image is divided into 16 evaluation areas. 被写界深度とボケブレ画像との関係を表す一例のグラフである。It is an example of a graph showing the relationship between a depth of field and a blurred image. (A)および(B)は、それぞれ、成功画像および失敗画像の一例を表すものである。(A) and (B) represent an example of a success image and a failure image, respectively. 図1に示す画像処理装置の動作を表す第2の実施形態のフローチャートである。6 is a flowchart of a second embodiment illustrating an operation of the image processing apparatus illustrated in FIG. 1. (A)は被写体を含む画像の一例を表すものであり、(B)は(A)に示す画像から抽出された被写体領域、(C)は(A)に示す画像から抽出された背景領域を表すものである。(A) shows an example of an image including a subject, (B) shows a subject region extracted from the image shown in (A), (C) shows a background region extracted from the image shown in (A). It represents. 被写界深度と重み付け係数との関係を表す一例のグラフである。It is a graph of an example showing the relationship between a depth of field and a weighting coefficient. (A)および(B)は、それぞれ、測距点の領域においてボケブレのない画像、および、ブレのある画像である。(A) and (B) are an image having no blur and an image having a blur in the area of the distance measuring point, respectively.

以下に、添付の図面に示す好適実施形態に基づいて、本発明の画像処理装置、画像処理方法および画像処理プログラムを詳細に説明する。   Hereinafter, an image processing apparatus, an image processing method, and an image processing program of the present invention will be described in detail based on preferred embodiments shown in the accompanying drawings.

図1は、本発明の画像処理装置の構成を表すブロック概念図である。同図に示す画像処理装置10は、ボケブレを含む画像が、ユーザにより意図的にボケブレが表現された成功画像なのか、そうではない失敗画像なのかを評価するものであって、画像取得部12と、被写界深度算出部14と、画像分割部18と、ボケブレ評価部20と、画像処理部22と、記憶部26と、表示部28とによって構成されている。   FIG. 1 is a conceptual block diagram illustrating the configuration of an image processing apparatus according to the present invention. The image processing apparatus 10 shown in the figure evaluates whether an image including blurring is a success image in which blurring is intentionally expressed by the user or a failure image that is not so, and includes an image acquisition unit 12. A depth-of-field calculating unit 14, an image dividing unit 18, a blurring evaluation unit 20, an image processing unit 22, a storage unit 26, and a display unit 28.

画像取得部12は、ボケブレの評価対象となる画像(画像データ)を取得する。画像取得部12は、画像を取得するものであれば何ら限定されないが、例えば、USB(Universal Serial Bus)メモリ、メモリカード、光学ディスク、有線/無線のネットワーク等を介して画像を取得するものが利用可能である。画像取得部12により取得された画像は、記憶部26に記憶される。   The image acquisition unit 12 acquires an image (image data) to be evaluated for blurring. The image acquisition unit 12 is not limited as long as it acquires an image. For example, an image acquisition unit 12 acquires an image via a USB (Universal Serial Bus) memory, a memory card, an optical disk, a wired / wireless network, or the like. Is available. The image acquired by the image acquisition unit 12 is stored in the storage unit 26.

被写界深度算出部14は、画像取得部12で取得された画像の付帯情報に基づいて、画像の被写界深度を表す概算値DVを算出する。   The depth of field calculation unit 14 calculates an approximate value DV representing the depth of field of the image based on the supplementary information of the image acquired by the image acquisition unit 12.

ここで、画像の付帯情報とは、画像の撮影時に撮影装置等によって取得される、レンズの焦点距離、絞り値(F値)、カメラと被写体との間の距離(撮影距離)、シャッタースピード等を含む、各種の情報である。付帯情報は、対応する画像と関連付けられていれば画像とは別ファイルでもよいが、例えば、デジタルカメラ等で撮影された画像が、Exif(Exchangeable Image File Format)等の画像ファイルフォーマットで記録される場合、そのヘッダ情報(Exif情報)として、これらの各種の情報が、撮影された画像データに付帯されて記録される。   Here, the supplementary information of the image is the focal length of the lens, the aperture value (F value), the distance between the camera and the subject (shooting distance), the shutter speed, etc. acquired by the shooting device or the like when shooting the image. Various types of information including The incidental information may be a separate file from the image as long as it is associated with the corresponding image. For example, an image captured by a digital camera or the like is recorded in an image file format such as Exif (Exchangeable Image File Format). In this case, as the header information (Exif information), these various types of information are appended to the captured image data and recorded.

被写界深度算出部14は、例えば、画像の付帯情報として、レンズの焦点距離および絞り値(F値)を用いて、下記式(1)により画像の被写界深度の概算値DVを算出する。被写界深度の概算値DVは、小さいほど被写界深度が深く、大きいほど被写界深度が浅いことを表す。
被写界深度の概算値DV=レンズ焦点距離/絞り値 … (1)
The depth-of-field calculating unit 14 calculates an approximate value DV of the depth of field of the image by the following equation (1) using, for example, the focal length of the lens and the aperture value (F value) as the incidental information of the image. To do. The approximate depth of field DV indicates that the smaller the depth, the deeper the depth of field, and the larger the depth, the shallower the depth of field.
Approximate value of depth of field DV = lens focal length / aperture value (1)

被写界深度が深い場合、ほとんどのシーンで全域にピントが合い、背景のボケ量も小さいため、画像に生じた滲みは被写体ブレや手ブレ、またはピンボケによるものである可能性が高い。一方、被写界深度が浅い場合、ピントが合う範囲が狭くなるため、検出される画像の滲みは、背景をぼかす撮影モードなどを利用して、ユーザにより意図的にボケブレが表現されたものである可能性が高い。   When the depth of field is deep, the entire area is in focus in most scenes, and the amount of blur in the background is small, so there is a high possibility that the blurring generated in the image is due to subject blurring, camera shake, or blurring. On the other hand, when the depth of field is shallow, the focus range becomes narrow, so the blur of the detected image is intentionally expressed by the user using a shooting mode that blurs the background. There is a high possibility.

なお、被写界深度の概算値DVは、上記式(1)により算出することに限定されず、例えば、絞り値そのものを被写界深度の概算値DVとして使用することもできる。絞り値が小さくなるほど被写界深度は浅くなる。また、被写界深度の概算値DVの調整に撮影距離を利用してもよい。撮影距離が近くなるほど、被写界深度は浅くなる。これを考慮し、撮影距離が近くなるほど、被写界深度の概算値DVが大きくなるように調整してもよい。   Note that the approximate depth of field DV is not limited to the calculation by the above formula (1), and for example, the aperture value itself may be used as the approximate depth of field DV. The smaller the aperture value, the shallower the depth of field. Further, the shooting distance may be used to adjust the approximate depth of field DV. The closer the shooting distance, the shallower the depth of field. In consideration of this, the approximate value DV of the depth of field may be adjusted to increase as the shooting distance becomes shorter.

ただし、被写界深度の概算値DVは、絞り値そのものを使用するよりも、レンズ焦点距離および絞り値を用いて式(1)により算出する方が、より正確な値を算出できる。さらに、被写界深度の概算値DVとして絞り値をそのまま使用する場合も、カメラ焦点距離および絞り値を用いて式(1)により算出する場合も、さらに、撮影距離を利用して被写界深度の概算値DVを調整する方が、より正確な値を算出できる。   However, the approximate value DV of the depth of field can be calculated more accurately by using the lens focal length and the aperture value according to the expression (1) than using the aperture value itself. Furthermore, when the aperture value is used as it is as the approximate value DV of the depth of field, or when it is calculated by the equation (1) using the camera focal length and the aperture value, the field of view is further obtained using the shooting distance. A more accurate value can be calculated by adjusting the approximate depth value DV.

続いて、画像分割部18は、画像取得部12で取得された画像を複数の評価領域に分割する。画像分割部18は、後述する第1の実施形態において、画像を、被写体領域とそれ以外の1以上の領域とに分割する。また、画像分割部18は、後述する第2の実施形態において、画像を、4分割、9分割、16分割、…などの複数の領域に分割する。   Subsequently, the image dividing unit 18 divides the image acquired by the image acquiring unit 12 into a plurality of evaluation areas. In the first embodiment to be described later, the image dividing unit 18 divides an image into a subject area and one or more other areas. The image dividing unit 18 divides the image into a plurality of regions such as 4 divisions, 9 divisions, 16 divisions,... In a second embodiment described later.

なお、画像から被写体領域を抽出する場合、被写体は、人物でもよいし、あるいは、例えば、動物、植物、自動車、建物、等のような人物以外の各種のオブジェクトであってもよい。   When extracting a subject area from an image, the subject may be a person or various objects other than a person such as animals, plants, cars, buildings, and the like.

ボケブレ評価部20は、画像分割部18により分割された各々の評価領域について、ボケブレを検出し、そのボケブレの程度を評価するための評価値を算出するボケブレ評価を実施し、被写界深度の概算値DVに基づいて、画像毎に異なる基準(第1の実施形態では、ボケブレ許容領域数RV、第2の実施形態では、重み付け係数)で、複数の評価領域の評価値から画像の評価値を算出する。   The blurring evaluation unit 20 detects blurring for each evaluation region divided by the image dividing unit 18, performs blurring evaluation for calculating an evaluation value for evaluating the degree of blurring, and determines the depth of field. Based on the approximate value DV, the evaluation value of the image from the evaluation values of the plurality of evaluation regions with different criteria for each image (in the first embodiment, the number of allowable blurring areas RV, in the second embodiment, the weighting coefficient). Is calculated.

ボケブレ評価部20は、第1の実施形態において、被写界深度の概算値DVに基づいて、画像がボケブレ画像(失敗画像)ではないと判定するために許容される、ボケブレ領域(失敗領域)であると判定される評価領域の上限の個数を表すボケブレ許容領域数RVを決定し、各々の評価領域について、ボケブレ評価を実施して評価値を算出し、各々の評価領域の評価値が高い方から、(評価領域の総数−ボケブレ許容領域数RV)の個数の評価領域の評価値を加算平均することにより、画像の評価値を算出する。   In the first embodiment, the blur blur evaluation unit 20 is allowed to determine that the image is not a blur blur image (failure image) based on the approximate depth of field DV, and a blur blur region (failure region). The blur blur permissible area number RV representing the upper limit number of evaluation areas determined to be is determined, and blur evaluation is performed for each evaluation area to calculate an evaluation value, and the evaluation value of each evaluation area is high From the above, the evaluation value of the image is calculated by averaging the evaluation values of the evaluation regions of the total number of evaluation regions−the number of allowable blurring regions RV.

また、ボケブレ評価部は、第2の実施形態において、画像分割部により分割された被写体領域とそれ以外の1以上の領域の各々について、ボケブレ評価を実施して評価値を算出し、被写界深度の概算値DVに基づいて、被写体領域とそれ以外の1以上の領域の評価値を重み付けして合算することにより、画像の評価値を算出する。   Further, in the second embodiment, the blur blur evaluation unit performs blur blur evaluation on each of the subject region divided by the image division unit and one or more other regions to calculate an evaluation value, and calculates an object field. Based on the approximate depth value DV, the evaluation value of the image is calculated by weighting and adding the evaluation values of the subject region and one or more other regions.

評価値は、画像(領域)のボケブレの程度に応じて決定される。本実施形態の場合、評価値は、0〜1の値であり、ボケブレの程度が比較的大きい場合に0に近い値となり、ボケブレの程度が比較的小さい場合に1に近い値となる。   The evaluation value is determined according to the degree of blurring of the image (region). In the case of the present embodiment, the evaluation value is a value of 0 to 1, and is close to 0 when the degree of blurring is relatively large, and is close to 1 when the degree of blurring is relatively small.

ここで、絞り値が小さくなるほど、被写界深度は浅くなる。しかし、絞り値が小さくなるとピントが合う範囲が狭くなるため、ボケブレ評価部20により与えられる評価値は小さくなる。従って、絞り値が小さくなるほど、評価値が大きくなるように調整することが望ましい。   Here, the smaller the aperture value, the shallower the depth of field. However, the smaller the aperture value, the narrower the focus range, so the evaluation value given by the blurring evaluation unit 20 becomes smaller. Therefore, it is desirable to adjust so that the evaluation value increases as the aperture value decreases.

また、ボケブレ評価部20は、評価値に基づいて、画像(領域)がボケブレ画像(ボケブレ領域)であるか否かを判定する。ボケブレ評価部20は、評価値が所定の基準値、例えば、0.3よりも小さい場合に、その画像がボケブレ画像であると判定する。   Further, the blur blur evaluation unit 20 determines whether the image (region) is a blur blur image (blur blur region) based on the evaluation value. The blur blur evaluation unit 20 determines that the image is a blur blur image when the evaluation value is smaller than a predetermined reference value, for example, 0.3.

なお、ボケブレ評価は、画像のボケブレの程度を評価することができればよく、画像のボケブレを検出する方法や、画像のボケブレの程度を評価するための評価値を算出する方法は何ら限定されない。例えば、画像のボケブレを検出するのではなく、画像の鮮鋭度(シャープネス)を検出し、画像の鮮鋭度の程度を評価することによって、ボケブレ評価を行うことなども可能である。   The blur evaluation is not limited as long as the degree of blur of the image can be evaluated, and the method for detecting the blur of the image and the method for calculating the evaluation value for evaluating the degree of blur of the image are not limited. For example, instead of detecting blurring of an image, it is possible to perform blurring evaluation by detecting the sharpness of an image and evaluating the degree of sharpness of the image.

続いて、画像処理部22は、評価値に基づいて、その昇順または降順に複数の画像を並べ替える。これにより、ユーザが画像のボケブレを評価する支援を行うことができ、ボケブレのない、もしくは少ない良好な画像を優先的に抽出しやすくすることができる。   Subsequently, the image processing unit 22 rearranges a plurality of images in ascending or descending order based on the evaluation value. Thereby, it is possible to assist the user in evaluating blurring of an image, and it is possible to preferentially extract a good image with little or no blurring.

また、画像処理部22は、ボケブレ評価部20により画像がボケブレ画像であると判定された場合に、画像のボケブレを軽減するための補正処理を施す。画像のボケブレの補正方法は何ら限定されず、画像のシャープネス処理等の公知の方法がいずれも利用できる。例えば、画像を高中低の周波数成分に分解し、中周波成分を抑え、高周波成分を強調することにより、画像のボケブレを軽減する補正方法を例示することができる。   Also, the image processing unit 22 performs a correction process for reducing the blurring of the image when the blurring evaluation unit 20 determines that the image is a blurred image. The method for correcting image blur is not limited at all, and any known method such as image sharpness processing can be used. For example, it is possible to exemplify a correction method that reduces blurring of an image by decomposing the image into high, medium, and low frequency components, suppressing the medium frequency component, and enhancing the high frequency component.

記憶部26は、ハードディスク等の記憶装置であって、画像取得部12で取得された画像を記憶する。画像取得部12で取得された画像は、一旦、記憶部26に記憶され、記憶部26から、画像分割部18,画像処理部22等へ供給される。また、記憶部26は、画像処理部22でボケブレ軽減の補正処理が施された画像も記憶する。記憶部26に記憶された画像は、表示部28に表示される。   The storage unit 26 is a storage device such as a hard disk, and stores the image acquired by the image acquisition unit 12. The image acquired by the image acquisition unit 12 is temporarily stored in the storage unit 26, and is supplied from the storage unit 26 to the image dividing unit 18, the image processing unit 22, and the like. The storage unit 26 also stores an image that has been subjected to blurring reduction correction processing by the image processing unit 22. The image stored in the storage unit 26 is displayed on the display unit 28.

表示部28は、液晶ディスプレー等の表示装置であって、記憶部に記憶された画像、つまり、画像取得部12で取得された画像や画像処理部22でボケブレ軽減の補正処理が施された画像等を表示する。   The display unit 28 is a display device such as a liquid crystal display, and is an image stored in the storage unit, that is, an image acquired by the image acquisition unit 12 or an image subjected to blurring reduction correction processing by the image processing unit 22. Etc. are displayed.

次に、図2に示すフローチャートを参照して、本発明の画像処理方法に従って画像を評価する場合の第1の実施形態の画像処理装置10の動作を説明する。   Next, the operation of the image processing apparatus 10 according to the first embodiment when an image is evaluated according to the image processing method of the present invention will be described with reference to the flowchart shown in FIG.

画像処理装置10では、まず、画像取得部12により、ボケブレの評価対象となる画像が取得される。例えば、Exifの画像ファイルフォーマットの画像が取得された場合には、そのヘッダ情報(Exif情報)から、画像の付帯情報として、レンズ焦点距離および絞り値が取得される(ステップST1)。画像取得部12で取得された画像は、記憶部26に記憶され、その付帯情報は、被写界深度算出部14へ供給される。   In the image processing apparatus 10, first, the image acquisition unit 12 acquires an image to be evaluated for blurring. For example, when an image in the Exif image file format is acquired, the lens focal length and aperture value are acquired from the header information (Exif information) as supplementary information of the image (step ST1). The image acquired by the image acquisition unit 12 is stored in the storage unit 26, and the accompanying information is supplied to the depth of field calculation unit 14.

続いて、被写界深度算出部14により、画像取得部12で取得された画像の付帯情報であるレンズ焦点距離および絞り値を用いて、前述の式(1)により、画像の被写界深度を表す概算値DVが算出される(ステップST2)。   Subsequently, the depth of field of the image is calculated by the above-described equation (1) using the lens focal length and the aperture value which are supplementary information of the image acquired by the image acquiring unit 12 by the depth of field calculating unit 14. Is calculated (step ST2).

続いて、ボケブレ評価部20により、被写界深度の概算値DVに基づいて、ボケブレ許容領域数RVが決定される(ステップST3)。   Subsequently, the blur blur evaluation unit 20 determines the blur blur allowable region number RV based on the approximate depth of field DV (step ST3).

例えば、被写界深度とボケブレ許容領域数RVとの関係を表すLUT(ルックアップテーブル)を用いて、被写界深度の概算値DVに対応するボケブレ許容領域数RVを求めることができる。このLUTは、被写界深度に応じて変化するピントの合う深さと、画像上でのピントの合う範囲との関係を統計的に求め、評価領域の総数に対して、被写界深度に応じて許容できるボケブレ領域の割合(または、個数)をあらかじめ定義したものである。   For example, by using a look-up table (LUT) that represents the relationship between the depth of field and the allowable blurring area number RV, the allowable blurring area number RV corresponding to the approximate depth of field DV can be obtained. This LUT statistically obtains the relationship between the in-focus depth that changes according to the depth of field and the in-focus range on the image, and the total number of evaluation areas depends on the depth of field. The ratio (or number) of blur blur areas that can be tolerated in advance is defined in advance.

図4は、被写界深度とボケブレ画像との関係を表す一例のグラフである。同図の横軸は被写界深度、縦軸はボケブレ領域の個数BNを表す。このグラフに示す例の場合、被写界深度が浅くなるほど、ボケブレ許容領域数RV、つまり、画像がボケブレ画像ではないと判定するために許容される、ボケブレ領域であると判定される評価領域の上限の個数が多くなり、逆に、被写界深度が深くなるほど、ボケブレ許容領域数RVが少なくなる。   FIG. 4 is a graph illustrating an example of the relationship between the depth of field and the blurred image. In the figure, the horizontal axis represents the depth of field, and the vertical axis represents the number BN of the blurred regions. In the case of the example shown in this graph, as the depth of field becomes shallower, the number of allowable blurring areas RV, that is, the evaluation area that is determined to be a blurring area that is allowed to determine that the image is not a blurred image. On the contrary, as the upper limit number increases and the depth of field increases, the blurring allowable area number RV decreases.

このグラフに示すように、被写界深度とボケブレ許容領域数RVとの関係がLUTに定義されているとすると、被写界深度の概算値DVに基づいて、例えば、16個の評価領域のうち、12個以上の評価領域がボケブレ領域である場合、その画像はボケブレ画像であると判定され、ボケブレ領域の個数BNが11個以下であれば、ボケブレ画像ではないと判定される。この場合、ボケブレ許容領域数RVは11となる。   As shown in this graph, assuming that the relationship between the depth of field and the number of allowable blurring areas RV is defined in the LUT, for example, based on the approximate value DV of the depth of field, Of these, when 12 or more evaluation areas are blur areas, the image is determined to be a blur image, and if the number BN of blur areas is 11 or less, it is determined that the image is not a blur image. In this case, the blur allowable area number RV is 11.

続いて、画像分割部18により、画像が、例えば、4分割、9分割、16分割、…のように、複数の評価領域に分割され(ステップST4)、ボケブレ評価部20により、各々の領域についてボケブレ評価が行われて、その評価値が算出される(ステップST5)。ここでは、図3に示すように、画像が、縦方向にA〜Dの4分割、横方向に1〜4の4分割され、合計で16分割され、16個の評価領域のそれぞれについて、ボケブレ評価が行われるものとする。   Subsequently, the image dividing unit 18 divides the image into a plurality of evaluation areas such as 4 divisions, 9 divisions, 16 divisions,... (Step ST4). Defocus evaluation is performed, and the evaluation value is calculated (step ST5). Here, as shown in FIG. 3, the image is divided into four parts of A to D in the vertical direction and four parts of 1 to 4 in the horizontal direction, for a total of 16 parts. Evaluation shall be performed.

続いて、各々の評価領域の評価値に基づいて、各々の評価領域がボケブレ領域であるのか否かが判定され、ボケブレ領域の個数BNが取得される(ステップST5)。例えば、領域の評価値が0.3よりも小さい場合に、その領域はボケブレ領域であると判定される。   Subsequently, based on the evaluation value of each evaluation region, it is determined whether or not each evaluation region is a blurred region, and the number BN of blurred regions is acquired (step ST5). For example, when the evaluation value of the area is smaller than 0.3, it is determined that the area is a blurred area.

続いて、ボケブレ領域の個数BNとボケブレ許容領域数RVとが比較される(ステップST6)。ボケブレ領域の個数BNがボケブレ許容領域数RVを下回っている場合、例えば、図5(A)に示すように、ボケブレ領域の個数BNが11個の場合(同図中、ボケブレと記載された評価領域はボケブレ領域であり、○が記載された評価領域は成功領域である)、その画像はボケブレがない成功画像であると判定され、超える場合、例えば、同図(B)に示すように、16個全ての評価領域がボケブレ領域である場合に、ボケブレ画像であると判定される(ステップST6)。   Subsequently, the number BN of the blurring regions and the blurring allowable region number RV are compared (step ST6). When the number BN of blurring areas is less than the allowable blurring area number RV, for example, as shown in FIG. 5A, when the number of blurring areas BN is 11, the evaluation described as “blurring” in FIG. The area is a blur area, and the evaluation area where the circle is written is a success area), and the image is determined to be a successful image without blur, and if it exceeds, for example, as shown in FIG. If all the 16 evaluation areas are blur areas, it is determined that the image is a blur image (step ST6).

また、画像のボケブレ判定とは別に、各評価領域の評価値の大きい(良い)方から、(評価領域の総数−ボケブレ許容領域数RV)の個数の評価領域、上記図3〜5の例の場合、16−11=5個の評価領域の評価値を加算平均することにより、画像の評価値が算出される(ステップST7)。   Further, apart from the blur determination of the image, the evaluation areas of the number (evaluation area−total blur allowable area number RV) from the larger (good) evaluation value of each evaluation area, in the example of FIGS. In this case, the evaluation value of the image is calculated by averaging the evaluation values of 16-11 = 5 evaluation regions (step ST7).

そして、画像処理部22により、ボケブレ画像であると判定された画像について、ボケブレ軽減の補正処理が行われる。処理後の画像は記憶部26に記憶され、以後同様に、複数の画像について同様の処理が繰り返される。そして、所定数の画像について処理が終わると、画像処理部22により、例えば、評価値の降順に画像の並べ替えが行われ、表示部28に表示される。   Then, the image processing unit 22 performs a blurring reduction correction process on the image determined to be a blurred image. The processed image is stored in the storage unit 26, and thereafter the same processing is repeated for a plurality of images. When the processing is completed for a predetermined number of images, the image processing unit 22 rearranges the images, for example, in descending order of evaluation values, and displays the images on the display unit 28.

または、画像処理部22により、閾値BLtに基づいて、各画像がボケブレ画像であるか否かを表示するようにしてもよい。本実施形態の場合、閾値BLtは、0.5よりも小さい値とする。例えば、評価値が0.3よりも小さい場合、その画像はボケブレ画像であると表示する。   Alternatively, the image processing unit 22 may display whether each image is a blurred image based on the threshold value BLt. In the present embodiment, the threshold value BLt is a value smaller than 0.5. For example, when the evaluation value is smaller than 0.3, the image is displayed as a blurred image.

複数の画像に対して、画像のピクセル情報からボケブレを検出して評価すると、手ブレや被写体ブレ、ピンボケ等の失敗画像と、ユーザにより意図的に表現された背景のぼかし等の成功画像との区別がつかない。そのため、意図的かそうでないかに関わらず、ボケの面積が広い背景ボケの方が低い(悪い)評価になる。しかし、ユーザにとって背景のボケは好ましいものである場合が多い。   When a plurality of images are evaluated by detecting blurring from pixel information of the image, a failure image such as camera shake, subject blurring, or out of focus, and a successful image such as a background blur intentionally expressed by the user are obtained. Indistinguishable. Therefore, regardless of whether it is intentional or not, the background blur having a large blur area has a lower (bad) evaluation. However, the background blur is often preferable for the user.

これに対して、本発明では、画像の撮影時の付帯情報から、背景などのぼかしを含む画像が、ユーザにより意図的に表現された成功画像か、そうではない失敗画像なのかを推定し、評価の方法を切り替える。これにより、ユーザにより意図的に表現された背景のぼかし等の成功画像に悪評価を与えることなく、適切な評価を与えることができるため、ユーザが、膨大な枚数の画像の中から、ボケブレ画像ではない成功画像を優先的に抽出する支援を適切に行うことができる。   On the other hand, in the present invention, from the incidental information at the time of shooting the image, it is estimated whether the image including the blur such as the background is a success image intentionally expressed by the user or a failure image that is not so, Switch the evaluation method. Accordingly, since the user can give an appropriate evaluation without giving bad evaluation to a successful image such as a background blur intentionally expressed by the user, the user can select a blurred image from a huge number of images. It is possible to appropriately support support for extracting success images that are not.

また、本発明では、領域分割を行って、それぞれの領域を評価することによってボケブレ画像なのか否かを検出することができる。また、それぞれの画像の被写界深度に応じた評価値を与えることができる。さらに、それぞれの評価領域の評価値を、被写界深度の概算値DVに基づいて、画像毎に異なる基準(ボケブレ許容領域数RV)で評価することにより、ユーザの意図、画像毎の状態を考慮した評価が可能となる。   In the present invention, it is possible to detect whether or not the image is a blurred image by performing region division and evaluating each region. In addition, an evaluation value corresponding to the depth of field of each image can be given. Further, by evaluating the evaluation value of each evaluation area based on the approximate value DV of the depth of field with a different reference (number of allowable blurring areas RV) for each image, the user's intention and the state for each image can be determined. Evaluation in consideration is possible.

次に、図6に示すフローチャートを参照して、第2の実施形態の画像処理装置10の動作を説明する。   Next, the operation of the image processing apparatus 10 of the second embodiment will be described with reference to the flowchart shown in FIG.

画像の被写界深度を表す概算値DVが算出されるまでの動作(ステップST1〜ST2)は、第1の実施形態の場合と同じである。   The operation (steps ST1 to ST2) until the approximate value DV representing the depth of field of the image is calculated is the same as in the first embodiment.

続いて、画像分割部18により、画像が、被写体領域とそれ以外の1以上の領域とに分割され(ステップST8)、それぞれの領域毎に、ボケブレ評価が行われて評価値が算出される(ステップST9)。   Subsequently, the image dividing unit 18 divides the image into a subject area and one or more other areas (step ST8), and blur evaluation is performed for each area to calculate an evaluation value ( Step ST9).

図7に示すように、例えば、同図(A)に示す、被写体を含む画像から被写体領域が抽出され、同図(B)に示す被写体領域と、同図(C)に示す、それ以外の背景領域とに分割され(ステップST8)、それぞれの領域についてボケブレ評価が行われる(ステップST9)。ここでは、被写体領域の評価値が0.9であり、背景領域の評価値が0.6であるとする。   As shown in FIG. 7, for example, a subject region is extracted from an image including a subject shown in FIG. 7A, and the subject region shown in FIG. 7B and the other regions shown in FIG. The image is divided into background areas (step ST8), and blurring evaluation is performed for each area (step ST9). Here, it is assumed that the evaluation value of the subject area is 0.9 and the evaluation value of the background area is 0.6.

続いて、被写界深度の概算値DVに基づいて、被写体領域の評価値と背景領域の評価値とが重み付けされて合算されることにより、画像の評価値が算出され(ステップST10)、評価値に基づいて、画像がボケブレ画像なのか否かの判定が行われる。例えば、図8のグラフに示すように、あらかじめ被写界深度に応じて定義された、被写体領域および背景領域のそれぞれの重み付け係数を求め、被写体領域の評価値および背景領域の評価値をそれぞれ重み付けして合算する。   Subsequently, the evaluation value of the subject area and the evaluation value of the background area are weighted and added based on the approximate value DV of the depth of field, thereby calculating the evaluation value of the image (step ST10). Based on the value, it is determined whether or not the image is a blurred image. For example, as shown in the graph of FIG. 8, the weighting coefficients of the subject area and the background area, which are defined in advance according to the depth of field, are obtained, and the evaluation value of the subject area and the evaluation value of the background area are respectively weighted. And add up.

図8は、被写界深度と重み付け係数との関係を表す一例のグラフである。このグラフの横軸は被写界深度、縦軸は重み付け係数を表す。このグラフにおいて、被写界深度が、ある程度よりも深くなると、被写体領域および背景領域の重み付け係数は等しくなり、逆に、ある程度よりも浅くなると、被写界深度が浅くなるほど、被写体領域の重み付け係数が大きく、かつ、背景領域の重み付け係数が小さくなる。   FIG. 8 is an exemplary graph showing the relationship between the depth of field and the weighting coefficient. The horizontal axis of this graph represents the depth of field, and the vertical axis represents the weighting coefficient. In this graph, when the depth of field becomes deeper than a certain level, the weighting coefficients of the subject area and the background area become equal. Conversely, when the depth of field becomes shallower than a certain degree, the weighting coefficient of the subject area decreases as the depth of field decreases. Is large and the weighting coefficient of the background region is small.

被写界深度が深いと判定された場合でも、被写界深度が比較的浅い場合には、被写体領域よりも背景領域の方がボケが多いと考えられる。そのため、背景領域よりも被写体領域の方の重み(重要度)を大きくして両者を合算する。同図の例の場合には、被写体領域の評価値である0.9に重み付け係数0.7を乗算し、背景領域の評価値である0.6に重み付け係数0.3を乗算し、両者を合算する。   Even when it is determined that the depth of field is deep, if the depth of field is relatively shallow, it is considered that the background region is more blurred than the subject region. Therefore, the weight (importance) of the subject area is made larger than that of the background area, and both are added together. In the case of the example in the figure, the evaluation value 0.9 of the subject area is multiplied by a weighting coefficient 0.7, and the evaluation value 0.6 of the background area is multiplied by a weighting coefficient 0.3. Add together.

一方、被写界深度が、ある程度よりも深くなると、被写体領域および背景領域の両方ともボケが少なくなると考えられる。つまり、被写体領域と背景領域の重要度はほぼ等しいと考えられるため、両者を均等に重み付けして合算する。同図の例の場合、被写体領域の評価値である0.9および背景領域の評価値である0.6のそれぞれに重み付け係数0.5を乗算し、両者を合算する。   On the other hand, when the depth of field becomes deeper than a certain level, it is considered that both the subject area and the background area are less blurred. In other words, since the importance of the subject area and the background area is considered to be substantially equal, both are weighted equally and added together. In the case of the example in the figure, each of the subject region evaluation value 0.9 and the background region evaluation value 0.6 is multiplied by a weighting coefficient 0.5, and both are added together.

なお、図8のグラフは、被写体領域とそれ以外の背景領域との2つの領域における、被写界深度と重み付け係数との関係を表したものであるが、本発明はこれに限定されず、画像が3つ以上の領域に分割された場合にも適用可能である。例えば、画像が、人物(主要被写体領域)とビル等の建物の領域と空の3つの領域に分割された場合には、主要被写体領域からの距離に応じて、建物および空の重み付け係数を小さくしたものを用いる。   Note that the graph of FIG. 8 represents the relationship between the depth of field and the weighting coefficient in the two regions of the subject region and the other background region, but the present invention is not limited to this, The present invention is also applicable when an image is divided into three or more regions. For example, when an image is divided into a person (main subject region), a building region such as a building, and three sky regions, the building and sky weighting factors are reduced according to the distance from the main subject region. Use what you did.

なお、画像分割部18が、画像から被写体領域を検出する方法は何ら限定されず、公知の方法がいずれも利用可能である。例えば、顔検出、人物検出、ペット検出、フォーカスエリア検出等の画像処理を利用して被写体領域を決定したり、AF(オートフォーカス)時の測距点の情報を利用して、ピントを合わせた測距点に対応する領域を被写体領域とすることができる。また、ユーザ自身に被写体領域を選択させてもよい。   Note that the method by which the image dividing unit 18 detects the subject region from the image is not limited at all, and any known method can be used. For example, the subject area is determined using image processing such as face detection, person detection, pet detection, focus area detection, or the like, and focusing is performed using information on distance measurement points during AF (autofocus). An area corresponding to the distance measuring point can be set as a subject area. Also, the user himself / herself may select the subject area.

図9(A)に示すように、例えば、画像の撮影時に、AFで所定の領域(+の部分)にピントを合わせた場合に、ピントを合わせた領域がボケブレなしであれば、この画像はボケブレのない画像であると判定し、ピントを合わせた領域を被写体領域とする。一方、同図(B)に示すように、ピントを合わせた領域にブレがあれば、この画像はブレのある画像であると判定し、ピントを合わせた領域を被写体領域としない。   As shown in FIG. 9A, for example, when an image is captured, if the focus is focused on a predetermined area (the + part) and the focused area is not blurred, It is determined that the image is not blurred, and the focused area is set as a subject area. On the other hand, as shown in FIG. 5B, if there is a blur in the focused area, this image is determined to be a blurred image, and the focused area is not set as the subject area.

明確な被写体が存在し、背景との距離が離れている場合には、被写界深度を深くしても背景のボケが避けられない場合がある。   When there is a clear subject and the distance from the background is large, the background blur may be unavoidable even if the depth of field is increased.

これに対し、上記のように、被写体領域と背景領域とを別々に評価することにより、このような場合の画像を、ユーザにとって違和感なく評価することが可能となる。また、被写体領域および背景領域のそれぞれの評価値を、被写界深度の概算値DVに基づいて、画像毎に異なる基準(重み付け係数)で評価することにより、ユーザの意図、画像毎の状態、画像内の重要ポイント(被写体領域等)を考慮した評価が可能となる。   On the other hand, as described above, by separately evaluating the subject area and the background area, it is possible to evaluate the image in such a case without any discomfort for the user. Further, by evaluating the evaluation values of the subject area and the background area with different criteria (weighting coefficients) for each image based on the approximate depth of field DV, the user's intention, the state for each image, Evaluation can be performed in consideration of important points (subject area, etc.) in the image.

さらに、被写界深度が浅い場合には、被写体領域のみを評価することによって、ぼかしたくない部分が、ボケブレなしに撮影できているかどうかを適切に評価することができる。   Further, when the depth of field is shallow, by evaluating only the subject area, it is possible to appropriately evaluate whether or not a portion that is not desired to be blurred can be photographed without blurring.

なお、本発明は、ユーザにより撮影された画像(撮影後の画像)について、ボケブレの評価を行う場合だけでなく、ユーザが画像を撮影する時(撮影前)に、ボケブレの評価を行う場合にも同様に適用可能である。   Note that the present invention is not only for evaluating blur on an image captured by a user (an image after shooting), but also for evaluating blur when the user captures an image (before shooting). Is equally applicable.

また、本発明の画像処理方法は、その各ステップをコンピュータに実行させるための画像処理プログラムとして実現することができる。また、この画像処理プログラムが記録されたコンピュータ読取可能な記録媒体としてもよい。   The image processing method of the present invention can be realized as an image processing program for causing a computer to execute each step. Further, a computer-readable recording medium on which the image processing program is recorded may be used.

本発明は、基本的に以上のようなものである。
以上、本発明について詳細に説明したが、本発明は上記実施形態に限定されず、本発明の主旨を逸脱しない範囲において、種々の改良や変更をしてもよいのはもちろんである。
The present invention is basically as described above.
Although the present invention has been described in detail above, the present invention is not limited to the above-described embodiment, and it is needless to say that various improvements and modifications may be made without departing from the gist of the present invention.

10 画像処理装置
12 画像取得部
14 被写界深度算出部
18 画像分割部
20 ボケブレ評価部
22 画像処理部
26 記憶部
28 表示部
DESCRIPTION OF SYMBOLS 10 Image processing apparatus 12 Image acquisition part 14 Depth of field calculation part 18 Image division part 20 Blurring blur evaluation part 22 Image processing part 26 Memory | storage part 28 Display part

Claims (16)

画像を取得する画像取得部と、
前記画像取得部で取得された画像の付帯情報に基づいて、該画像の被写界深度を表す概算値を算出する被写界深度算出部と、
前記画像を複数の評価領域に分割する画像分割部と、
前記画像分割部により分割された各々の評価領域について、ボケもしくはブレを検出し、該ボケもしくはブレの程度を評価するための評価値を算出するボケブレ評価を実施し、前記被写界深度の概算値に基づいて、前記被写界深度が浅くなるほど、前記画像の評価値が大きくなるように、前記評価領域の評価値から前記画像の評価値を算出するボケブレ評価部とを備えることを特徴とする画像処理装置。
An image acquisition unit for acquiring images;
A depth-of-field calculating unit that calculates an approximate value representing the depth of field of the image based on the incidental information of the image acquired by the image acquiring unit;
An image dividing unit for dividing the image into a plurality of evaluation regions;
For each evaluation region divided by the image dividing unit, blur or blur is detected, blur evaluation is performed to calculate an evaluation value for evaluating the degree of blur or blur, and the depth of field is estimated A blurring evaluation unit that calculates the evaluation value of the image from the evaluation value of the evaluation region so that the evaluation value of the image increases as the depth of field becomes shallower based on the value. An image processing apparatus.
前記ボケブレ評価部は、
前記被写界深度の概算値に基づいて、前記被写界深度が浅くなるほど、前記画像がボケブレ画像ではないと判定するために許容される、ボケブレ領域であると判定される前記評価領域の上限の個数を表すボケブレ許容領域数が多くなるようにし、
前記画像分割部により分割された各々の評価領域について前記ボケブレ評価を実施して、各々の該評価領域の評価値を算出し、
各々の前記評価領域の評価値が高い方から、(前記評価領域の総数−前記ボケブレ許容領域数)の個数の評価領域の評価値を加算平均することにより、前記画像の評価値を算出するものである請求項1に記載の画像処理装置。
The blur blur evaluation unit
On the basis of the estimate of depth of field, the higher the depth of field becomes shallow, the image is allowed to determine not the Bokebure image, the upper limit of the evaluation region is determined to be Bokebure region as Bokebure allowed number of regions is increased indicating the number of,
Performing the blur evaluation for each evaluation region divided by the image dividing unit, calculating an evaluation value of each evaluation region,
The evaluation value of the image is calculated by averaging the evaluation values of the evaluation regions of (the total number of evaluation regions−the number of blur-allowable regions) from the higher evaluation value of each of the evaluation regions. The image processing apparatus according to claim 1.
前記ボケブレ評価部は、さらに、各々の前記評価領域の評価値に基づいて、各々の該評価領域が前記ボケブレ領域であるのか否かを判定し、
前記ボケブレ領域であると判定された評価領域の個数が前記ボケブレ許容領域数を超える場合に、前記画像が前記ボケブレ画像であると判定するものである請求項2に記載の画像処理装置。
The blur blur evaluation unit further determines whether or not each of the evaluation regions is the blur region based on the evaluation value of each of the evaluation regions,
The image processing apparatus according to claim 2, wherein the image is determined to be the blurred image when the number of evaluation regions determined to be the blurred region exceeds the number of allowable blur regions.
前記画像分割部は、前記画像を、前記評価領域として、被写体領域とそれ以外の1以上の領域とに分割するものであり、
前記ボケブレ評価部は、前記画像分割部により分割された被写体領域とそれ以外の1以上の領域の各々について、前記ボケブレ評価を実施して評価値を算出し、
前記被写界深度の概算値に基づいて、前記被写界深度が浅くなるほど、前記被写体領域の重み付けがそれ以外の1以上の領域の重み付けよりも大きくなるようにし、前記被写体領域とそれ以外の1以上の領域の評価値を重み付けして合算することにより、前記画像の評価値を算出するものである請求項1に記載の画像処理装置。
The image dividing unit divides the image into a subject area and one or more other areas as the evaluation area,
The blur blur evaluation unit calculates the evaluation value by performing the blur blur evaluation on each of the subject region divided by the image dividing unit and one or more other regions,
Based on the approximate value of the depth of field, as the depth of field becomes shallower, the weight of the subject area is larger than the weight of one or more other areas, and the subject area and the other areas The image processing apparatus according to claim 1, wherein the evaluation value of the image is calculated by weighting and adding the evaluation values of one or more regions.
前記ボケブレ評価部は、前記画像が、前記被写体領域とそれ以外の2以上の領域とに分割された場合に、該被写体領域からの距離に応じて、該被写体領域以外の2以上の領域の重み付けを小さくするものである請求項4に記載の画像処理装置。   The blur blur evaluation unit weights two or more regions other than the subject region according to a distance from the subject region when the image is divided into the subject region and two or more other regions. The image processing apparatus according to claim 4, wherein the image processing apparatus is made smaller. 前記画像分割部は、顔検出、人物検出、ペット検出、フォーカスエリア検出のいずれかにより、前記画像から前記被写体領域を抽出するものである請求項4または5に記載の画像処理装置。   The image processing apparatus according to claim 4, wherein the image dividing unit extracts the subject region from the image by any one of face detection, person detection, pet detection, and focus area detection. 前記画像分割部は、オートフォーカス時に、ピントを合わせた測距点に対応する領域を前記被写体領域とするものである請求項4または5に記載の画像処理装置。   The image processing apparatus according to claim 4, wherein the image dividing unit sets an area corresponding to a focused distance-measuring point during autofocus as the subject area. 前記被写界深度算出部は、前記付帯情報として、前記画像の撮影時に取得される絞り値を、前記被写界深度の概算値として使用するものである請求項1〜7のいずれかに記載の画像処理装置。   The depth-of-field calculating unit uses, as the auxiliary information, an aperture value acquired when the image is captured as an approximate value of the depth of field. Image processing apparatus. 前記被写界深度算出部は、前記付帯情報として、前記画像の撮影時に取得されるレンズの焦点距離および絞り値を用いて、前記レンズ焦点距離/前記絞り値により前記被写界深度の概算値を算出するものである請求項1〜7のいずれかに記載の画像処理装置。 The depth of field calculation unit uses the focal length and aperture value of the lens acquired at the time of capturing the image as the incidental information, and approximates the depth of field by the focal length of the lens / the aperture value. The image processing apparatus according to claim 1, which calculates a value. 前記被写界深度算出部は、前記付帯情報として、さらに、前記画像の撮影時に取得される、カメラと被写体との間の距離を用いて、該距離が近くなるほど、前記被写界深度の概算値が大きくなるように調整するものである請求項8または9に記載の画像処理装置。   The depth-of-field calculating unit further uses the distance between the camera and the subject acquired when the image is captured as the incidental information, and the rougher the depth of field, the closer the distance is. The image processing apparatus according to claim 8, wherein the image processing apparatus is adjusted to increase the value. 前記ボケブレ評価部は、前記画像の評価値を算出する場合、前記付帯情報に含まれる前記画像の撮影時の絞り値に応じて、該絞り値が小さくなるほど前記画像の評価値が大きくなるように調整するものである請求項1〜7のいずれかに記載の画像処理装置。   When calculating the evaluation value of the image, the blurring evaluation unit is configured so that the evaluation value of the image increases as the aperture value decreases according to the aperture value at the time of shooting of the image included in the auxiliary information. The image processing apparatus according to claim 1, which is to be adjusted. さらに、複数の前記画像の評価値に基づいて、複数の該画像を並び替える画像処理部を備える請求項1〜11のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, further comprising an image processing unit that rearranges the plurality of images based on evaluation values of the plurality of images. さらに、前記ボケブレ評価部により前記画像が前記ボケブレ画像であると判定された場合に、前記評価値に基づいて、前記画像のボケもしくはブレを軽減するための補正処理を施す画像処理部を備える請求項3に記載の画像処理装置。   The image processing unit further includes an image processing unit that performs a correction process to reduce blur or blur of the image based on the evaluation value when the image is determined to be the blurred image by the blur blur evaluation unit. Item 4. The image processing apparatus according to Item 3. 画像を取得する画像取得ステップと、
前記画像取得ステップで取得された画像の付帯情報に基づいて、該画像の被写界深度を表す概算値を算出する被写界深度算出ステップと、
前記画像を複数の評価領域に分割する画像分割ステップと、
前記画像分割ステップにより分割された各々の評価領域について、ボケもしくはブレを検出し、該ボケもしくはブレの程度を評価するための評価値を算出するボケブレ評価を実施し、前記被写界深度の概算値に基づいて、前記被写界深度が浅くなるほど、前記画像の評価値が大きくなるように、前記評価領域の評価値から前記画像の評価値を算出するボケブレ評価ステップと、を備えることを特徴とする画像処理方法。
An image acquisition step of acquiring an image;
Depth of field calculation step of calculating an approximate value representing the depth of field of the image based on the incidental information of the image acquired in the image acquisition step;
An image dividing step of dividing the image into a plurality of evaluation regions;
For each evaluation region divided by the image division step, blur or blur is detected, blur evaluation is performed to calculate an evaluation value for evaluating the degree of blur or blur, and the depth of field is estimated And a blur blur evaluation step of calculating the evaluation value of the image from the evaluation value of the evaluation area so that the evaluation value of the image increases as the depth of field becomes shallower based on the value. An image processing method.
請求項14に記載の各々のステップをコンピュータに実行させる画像処理プログラム。   An image processing program for causing a computer to execute each step according to claim 14. 請求項14に記載の各々のステップをコンピュータに実行させる画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which an image processing program for causing a computer to execute each step according to claim 14 is recorded.
JP2011144306A 2011-06-20 2011-06-29 Image processing apparatus, image processing method, and image processing program Active JP5405531B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2011144306A JP5405531B2 (en) 2011-06-29 2011-06-29 Image processing apparatus, image processing method, and image processing program
US13/478,501 US9036936B2 (en) 2011-06-20 2012-05-23 Image processing device, image processing method, and image processing program
CN201210177069.2A CN102842110B (en) 2011-06-20 2012-05-31 Image processing device and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011144306A JP5405531B2 (en) 2011-06-29 2011-06-29 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2013012906A JP2013012906A (en) 2013-01-17
JP5405531B2 true JP5405531B2 (en) 2014-02-05

Family

ID=47686415

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011144306A Active JP5405531B2 (en) 2011-06-20 2011-06-29 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP5405531B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5868053B2 (en) * 2011-07-23 2016-02-24 キヤノン株式会社 Image processing method, image processing apparatus, and program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4493416B2 (en) * 2003-11-26 2010-06-30 富士フイルム株式会社 Image processing method, apparatus, and program
JP2005122688A (en) * 2003-09-26 2005-05-12 Fuji Photo Film Co Ltd Image processing method, device, and program

Also Published As

Publication number Publication date
JP2013012906A (en) 2013-01-17

Similar Documents

Publication Publication Date Title
US9036936B2 (en) Image processing device, image processing method, and image processing program
US9998650B2 (en) Image processing apparatus and image pickup apparatus for adding blur in an image according to depth map
US8947523B2 (en) Image processing apparatus and associated methodology for blurring digital images
US9501834B2 (en) Image capture for later refocusing or focus-manipulation
US9723208B2 (en) Image processing apparatus, method for controlling the same, and storage medium
US7801432B2 (en) Imaging apparatus and method for controlling the same
US10298853B2 (en) Image processing apparatus, method of controlling image processing apparatus, and imaging apparatus
JP5453573B2 (en) Imaging apparatus, imaging method, and program
JP2008288975A (en) Imaging apparatus, imaging method and imaging program
JPWO2012132486A1 (en) Imaging apparatus, imaging method, program, and program storage medium
US9100569B2 (en) Method for adaptive focusing
US20120307009A1 (en) Method and apparatus for generating image with shallow depth of field
US20160269636A1 (en) Image processing apparatus, image processing method, and storage medium
US9792677B2 (en) Electronic camera, image processing device, and image processing program
US20180109745A1 (en) Image processing apparatus, image processing method, and computer-readable recording medium
JP2005332381A (en) Image processing method, device and program
JP2010279054A (en) Image pickup device, image processing device, image pickup method, and image processing method
JP4493416B2 (en) Image processing method, apparatus, and program
JP2010154306A (en) Device, program and method for imaging control
JP5405531B2 (en) Image processing apparatus, image processing method, and image processing program
JP6486453B2 (en) Image processing apparatus, image processing method, and program
JP2009118434A (en) Blurring correction device and imaging apparatus
US8498494B2 (en) Method and apparatus for processing a digital image signal, and a recording medium having recorded thereon a program for executing the method
JP5405529B2 (en) Image processing apparatus, image processing method, and image processing program
JP2013218031A (en) Imaging apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130405

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130514

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130708

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131030

R150 Certificate of patent or registration of utility model

Ref document number: 5405531

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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