JP2018133110A - Image processing apparatus and image processing program - Google Patents

Image processing apparatus and image processing program Download PDF

Info

Publication number
JP2018133110A
JP2018133110A JP2018095654A JP2018095654A JP2018133110A JP 2018133110 A JP2018133110 A JP 2018133110A JP 2018095654 A JP2018095654 A JP 2018095654A JP 2018095654 A JP2018095654 A JP 2018095654A JP 2018133110 A JP2018133110 A JP 2018133110A
Authority
JP
Japan
Prior art keywords
image
psf
weight
unit
mask
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018095654A
Other languages
Japanese (ja)
Other versions
JP2018133110A5 (en
Inventor
本間 行
Susumu Honma
行 本間
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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Publication of JP2018133110A publication Critical patent/JP2018133110A/en
Publication of JP2018133110A5 publication Critical patent/JP2018133110A5/ja
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus in which an excellent PSF estimation accuracy can be obtained.SOLUTION: An image processing device 1 includes: a blurred image generation unit 13 for generating a blurred image from an input image; a region identification unit 11 for dividing a region in the input image into a non-effective region and an effective region; a weight mask creation unit 12 for creating a weight mask for causing the weight to be larger in the non-effective region than in the effective region, and causing the weight to decrease, in the effective region, according to distance from a boundary with the non-effective region; an analysis image generation unit 14 for adding the blurred image weighted by the weight mask created by the weight mask creation unit 12 and the input image weighted by a mask obtained by inverting the weight mask, and generating an analysis image; and a PSF estimation unit 15 for estimating a point-spread function by using the analysis image.SELECTED DRAWING: Figure 2

Description

本発明は、画像処理装置及び画像処理プログラムに関するものである。   The present invention relates to an image processing apparatus and an image processing program.

従来、画像内の手振れやピントのずれによるボケを表すPSF(Point Spread Function:点広がり関数)を高速で推定する技術が提案されている(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, a technique for estimating a PSF (Point Spread Function) representing blur due to camera shake or out-of-focus in an image at high speed has been proposed (see, for example, Patent Document 1).

特開2010−157210号公報JP 2010-157210 A

しかしながら、多くのPSF推定方法が輝度勾配情報を用いるために、画像の中に光源などが写り込んで飽和した白飛び画素や、輝度が極端に低い黒つぶれ画素などがあると、正確な輝度勾配が得られず、その結果、良好な推定精度が得られない。
また、被写体ブレなどの影響で画像内に異なるPSFを持つ領域が混在する場合にも、正確なPSFの推定が困難である。
However, since many PSF estimation methods use luminance gradient information, if there is a whiteout pixel saturated with a light source or the like reflected in an image, or a blackout pixel with extremely low luminance, an accurate luminance gradient is obtained. As a result, good estimation accuracy cannot be obtained.
In addition, it is difficult to accurately estimate the PSF even when regions having different PSFs are mixed in the image due to subject blurring or the like.

本発明の課題は、良好なPSF推定精度を得ることのできる画像処理装置及び画像処理プログラムを提供することである。   An object of the present invention is to provide an image processing apparatus and an image processing program capable of obtaining good PSF estimation accuracy.

本発明は、以下のような解決手段により前記課題を解決する。
本発明の第1の見地によると、入力画像から、ぼかし画像を生成するぼかし画像生成部と、前記入力画像中の領域を、非有効領域と有効領域とに分ける領域識別部と、前記非有効領域においては前記有効領域より重みを大きくし、前記有効領域においては前記非有効領域との境界からの距離に応じて重みを減少させる重みマスクを作成する重みマスク作成部と、前記重みマスク作成部により作成された前記重みマスクにより重みを付けたぼかし画像と、前記重みマスクを反転させたマスクにより重みを付けた入力画像と、を加算して解析用画像を生成する解析用画像生成部と、前記解析用画像を用いて点広がり関数の推定を行うPSF推定部と、を備えること、を特徴とする画像処理装置を提供する。
The present invention solves the above problems by the following means.
According to a first aspect of the present invention, a blurred image generation unit that generates a blurred image from an input image, a region identification unit that divides a region in the input image into an ineffective region and an effective region, and the ineffective A weight mask creating unit that creates a weight mask that increases the weight in the region than the effective region and decreases the weight in accordance with the distance from the boundary with the ineffective region in the effective region; and the weight mask creating unit An analysis image generation unit that generates an analysis image by adding the blurred image weighted by the weight mask created by the above and an input image weighted by a mask obtained by inverting the weight mask; There is provided an image processing apparatus comprising: a PSF estimation unit that estimates a point spread function using the analysis image.

本発明によれば、良好なPSF推定精度を得ることのできる画像処理装置及び画像処理プログラムを提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the image processing apparatus and image processing program which can obtain favorable PSF estimation precision can be provided.

本発明に係る画像処理装置の一実施形態のブロック構成図である。It is a block block diagram of one Embodiment of the image processing apparatus which concerns on this invention. PSF情報作成部のブロック構成図である。It is a block block diagram of a PSF information creation part. 元画像を示す図である。It is a figure which shows an original image. PSF情報作成部によるPSF情報作成工程を示すフローチャートである。It is a flowchart which shows the PSF information creation process by a PSF information creation part. PSF情報作成工程における画像およびマスクを段階的に示す説明図である。It is explanatory drawing which shows the image and mask in a PSF information preparation process in steps. PSF情報作成部による解析用画像を示す図である。It is a figure which shows the image for analysis by a PSF information preparation part. 解析PSFを示す図である。It is a figure which shows analysis PSF. 解析PSFを示す図である。It is a figure which shows analysis PSF. 解析PSFを示す図である。It is a figure which shows analysis PSF. 第2実施形態におけるPSF情報作成部によるPSF情報作成工程を示すフローチャートである。It is a flowchart which shows the PSF information creation process by the PSF information creation part in 2nd Embodiment. 重みマスク作成部における画像およびマップ等の輝度を示す説明図である。It is explanatory drawing which shows the brightness | luminances of an image, a map, etc. in a weight mask preparation part. 重みマスク作成部における画像およびマップ等の輝度を示す説明図である。It is explanatory drawing which shows the brightness | luminances of an image, a map, etc. in a weight mask preparation part. 重みマスク作成部における画像およびマップ等の輝度を示す説明図である。It is explanatory drawing which shows the brightness | luminances of an image, a map, etc. in a weight mask preparation part. 第3実施形態のPSF情報作成部のブロック構成図である。It is a block block diagram of the PSF information creation part of 3rd Embodiment. 元画像を示す説明図である。It is explanatory drawing which shows an original image. 第3実施形態のPSF情報作成部によるPSF情報作成工程を示す別のフローチャートである。It is another flowchart which shows the PSF information creation process by the PSF information creation part of 3rd Embodiment. 有効領域が含まれていないメッシュと、有効領域が含まれているメッシュとを分類した図である。It is the figure which classified the mesh in which the effective area | region is not included, and the mesh in which the effective area | region is included.

(第1実施形態)
以下、図面等を参照して、本発明の実施形態について説明する。
図1は、本発明に係る画像処理装置の一実施形態のブロック構成図である。図2は、そのPSF情報作成部のブロック構成図である。図3は、元画像30を示す図である。図4は、PSF情報作成部10によるPSF情報作成工程を示すフローチャートである。図5は、PSF情報作成工程における画像およびマップ等を段階的に示す説明図である。図6は、PSF情報作成部10による解析用画像30′を示す図である。図7は、解析PSFを示す図である。
(First embodiment)
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram of an image processing apparatus according to an embodiment of the present invention. FIG. 2 is a block diagram of the PSF information creation unit. FIG. 3 is a diagram showing the original image 30. FIG. 4 is a flowchart showing a PSF information creation process by the PSF information creation unit 10. FIG. 5 is an explanatory view showing images, maps, and the like in the PSF information creation step in stages. FIG. 6 is a diagram showing an analysis image 30 ′ by the PSF information creation unit 10. FIG. 7 is a diagram showing an analysis PSF.

画像処理装置1は、PSF情報作成部10と、画像処理部20と、により構成されている。なお、本実施形態は、たとえば、PC(パソコン)をプログラムによって画像処理装置1として機能させる例である。
画像処理装置1(PC)には、メモリカードを介して、または、ケーブルや無線伝送路を介して接続されたカメラ等から、処理対象画像が入力される。
The image processing apparatus 1 includes a PSF information creation unit 10 and an image processing unit 20. In the present embodiment, for example, a PC (personal computer) is caused to function as the image processing apparatus 1 by a program.
An image to be processed is input to the image processing apparatus 1 (PC) from a memory card or a camera connected via a cable or a wireless transmission path.

PSF情報作成部10は、入力された処理対象画像に基づいて、解析用画像を作成し、画像内の手振れやピントのずれによるボケを表すPSF(Point Spread Function:点像分布関数)を推定する。
画像処理部20は、PSF情報作成部10が推定したPSFに基づいて、入力画像に対して手振れやピントのずれによるボケを補正する画像処理を施す。
そして、画像処理装置1は、ボケを補正した画像を出力する。
The PSF information creation unit 10 creates an analysis image based on the input processing target image, and estimates a PSF (Point Spread Function) representing blur due to camera shake or out-of-focus in the image. .
Based on the PSF estimated by the PSF information creation unit 10, the image processing unit 20 performs image processing for correcting blur due to camera shake or out-of-focus on the input image.
Then, the image processing apparatus 1 outputs an image with the blur corrected.

以下、PSF情報作成部10について、詳細に説明する。
PSF情報作成部10は、領域識別部11、重みマスク作成部12、ぼかし画像生成部13、解析用画像生成部14、PSF推定部15、の各機能部を備えている。
本構成におけるPSF情報作成部10は、画像の中に光源等の飽和した白飛び画素や輝度が極端に低い黒つぶれ画素等が有る場合であっても、精度の高いPSF推定を行う。
すなわち、たとえば、図3に示すように、撮影時に手振れが生じた画像30(主要被写体31はブレている)内に、蛍光灯等の光源32が写り込んで飽和した白飛びを起こしている画像があるとする。この場合、光源32の像はブレを生じていてもその輪郭のエッジが鋭い(輝度勾配が大きい)ためにブレと認識できない。その結果、良好な推定精度が得られない。PSF情報作成部10は、このような白飛びや黒つぶれに起因するPSFの誤推定を抑制し、精度の高いPSF推定情報を出力する。
Hereinafter, the PSF information creation unit 10 will be described in detail.
The PSF information creation unit 10 includes functional units such as an area identification unit 11, a weight mask creation unit 12, a blurred image generation unit 13, an analysis image generation unit 14, and a PSF estimation unit 15.
The PSF information creation unit 10 in this configuration performs high-precision PSF estimation even when there are saturated whiteout pixels such as a light source or blackout pixels with extremely low luminance in the image.
That is, for example, as shown in FIG. 3, an image 30 in which camera shake occurs during shooting (the main subject 31 is blurred) is a saturated whiteout due to a light source 32 such as a fluorescent light being reflected. Suppose there is. In this case, even if the image of the light source 32 is blurred, it cannot be recognized as a blur because the edge of its contour is sharp (the luminance gradient is large). As a result, good estimation accuracy cannot be obtained. The PSF information creation unit 10 suppresses such erroneous PSF estimation due to overexposure or underexposure, and outputs highly accurate PSF estimation information.

つぎに、PSF情報作成部10における各機能部の作用とPSF情報作成部10によるPSF情報作成工程とを、図4に示すフローチャートに沿って図5のA−Fを参照しつつ説明する。なお、図中および以下の説明においてステップを「S」とも略記する。
まず、入力画像Iを取得し(S401)、そのグレースケール画像Igを作成する(S402)。入力画像Iは、図5のAである。
Next, the operation of each functional unit in the PSF information creation unit 10 and the PSF information creation process by the PSF information creation unit 10 will be described with reference to FIGS. 5A to 5F along the flowchart shown in FIG. In the drawings and the following description, step is also abbreviated as “S”.
First, the input image I is acquired (S401), and the gray scale image Ig is created (S402). The input image I is A in FIG.

ついで、ぼかし画像生成部13によって、ぼかし画像Bを作成する(S403)。
ぼかし画像Bは、グレースケール画像Igと、ぼかしフィルタB_filt1とのコンボリューションにより作成される。
すなわち、
B_filt1は、ぼかしフィルタであって、本実施形態では次の式で表されるガウス型のフィルタを使用する。
(xc,yc)は、ぼかしフィルタの中心の座標を表す。
分母の和は次の範囲で行い、フィルタB_filt1の和が1になるように規格化する。
1≦x,y≦fs
Next, the blurred image generation unit 13 creates a blurred image B (S403).
The blurred image B is created by convolution of the grayscale image Ig and the blur filter B_filt1.
That is,
B_filt1 is a blur filter, and in this embodiment, a Gaussian filter represented by the following equation is used.
(Xc, yc) represents the coordinates of the center of the blur filter.
The sum of the denominators is performed in the following range, and is normalized so that the sum of the filters B_filt1 is 1.
1 ≦ x, y ≦ fs

ここで、PSFのカーネルサイズをm×n、ks=max(m,n)とし、ぼかしフィルタのサイズをfs×fsとする。fsは、0.5×ks以上、2×ks以下程度とし、好ましくは、fs=ksの奇数(中心から均等に振り分けてぼかすため)とする。
また、σは、ボケ分布のほとんど全てを網羅するために、ぼかしフィルタサイズの、1/4とするのが好ましい。
Here, the kernel size of the PSF is m × n, ks = max (m, n), and the size of the blurring filter is fs × fs. fs is about 0.5 × ks or more and about 2 × ks or less, and is preferably an odd number of fs = ks (in order to distribute the blur equally from the center).
Also, σ is preferably ¼ of the blur filter size in order to cover almost all of the blur distribution.

カーネルサイズは、ブレの軌跡の大きさであって、当該画像処理装置1の操作者に入力を要求し、設定する。なお、ぼかしフィルタは、上記のようなガウス型のフィルタに限らず、ディスク型やバイノミアルフィルタなどでもかまわない。
ぼかし画像Bを、図5のBに示す。
The kernel size is the size of the blur locus, and is set by requesting the operator of the image processing apparatus 1 to input. The blur filter is not limited to the Gaussian filter as described above, and may be a disk type or binomial filter.
The blurred image B is shown in B of FIG.

つぎに、領域識別部11により、入力画像Iに基づいて、白飛びや黒つぶれのために輝度勾配が不連続になっている可能性のある領域を非有効領域non_validと定義し、その他の領域を有効領域validと定義する(S404)。
非有効領域non_validと有効領域validは、R,G,B各画素の輝度を、明暗それぞれの定められた所定の閾値(H_th,L_th)と比較して、以下の方法で求める。
Next, the area identifying unit 11 defines, based on the input image I, an area where the luminance gradient may be discontinuous due to overexposure or blackout as an ineffective area non_valid, and other areas Is defined as an effective area valid (S404).
The non-effective area non_valid and the effective area valid are obtained by the following method by comparing the brightness of each pixel of R, G, and B with a predetermined threshold value (H_th, L_th) for each of the light and dark.

すなわち、非有効領域non_valjd、および有効領域validは、R,G,B各画素の輝度が、
max(R(x,y),G(x,y),B(x,y))>H_th
または、
min(R(x,y),G(x,y),B(x,y))<L_th
ならば
non_vaid(x,y)=1
valid(x,y) =0
それ以外は、
non_vaid(x,y)=0
valid(x,y)=1
とする。
That is, in the non-valid region non_valjd and the valid region valid, the luminance of each of the R, G, and B pixels is
max (R (x, y), G (x, y), B (x, y))> H_th
Or
min (R (x, y), G (x, y), B (x, y)) <L_th
Then non_vaid (x, y) = 1
valid (x, y) = 0
Other than that,
non_vaid (x, y) = 0
valid (x, y) = 1
And

ここで、max(A,B,…)はA,B,…の中で最も大きい値を表し、min(A,B,…)はA,B,…の中で最も小さい値を表す。
なお、このステップ404は、入力画像Iに基づいて非有効領域と有効領域とを定義するため、ステップ401以降で有れば、前述の各ステップより前であっても良く、また、前述の各ステップと並行して行っても良い。
Here, max (A, B,...) Represents the largest value among A, B,..., And min (A, B,...) Represents the smallest value among A, B,.
Since this step 404 defines the ineffective area and the effective area based on the input image I, it may be before the above steps as long as it is after step 401. It may be performed in parallel with the steps.

ついで、重みマスク作成部12によって各画素の非有効領域からの距離に応じた距離マップdist(x,y)を求める(S405)。図5のCに距離マップdist(x,y)を示す。そして、ステップ405で求められた距離マップdist(x,y)に基づいて重みマスクw(x,y)を作成し(S406)する。
ステップ405における重みマスクw(x,y)は、
w(x,y)=max(1−coef1×dist(x,y),0)
によって求める。
ここで、coef1は、0.5×fs以上、2×fs以下程度が良好な結果を得られる。これにより得られた重みマスクは、図5のDに示すようになる。
Next, the distance mask dist (x, y) corresponding to the distance from the ineffective area of each pixel is obtained by the weight mask creating unit 12 (S405). FIG. 5C shows the distance map dist (x, y). Then, a weight mask w (x, y) is created based on the distance map dist (x, y) obtained in step 405 (S406).
The weight mask w (x, y) in step 405 is
w (x, y) = max (1−coef1 × dist (x, y), 0)
Ask for.
Here, a good result is obtained when coef1 is about 0.5 × fs or more and 2 × fs or less. The weight mask thus obtained is as shown in D of FIG.

さらに、解析用画像生成部14が、さらに、その重みマスクw(x,y)を用いて解析用の画像を形成する(S407)。
ステップ407における解析用の画像形成は、図5のAで示す入力画像Iにステップ406において作成された重みマスク[図5のD]を1から引いた(1−w(x,y))[図5のE]を掛けた画像と、ステップ403において作成されたぼかし画像[図5のB]にステップ406において作成された重みマスク[図5のD]を掛けた画像とを得て、それらを加算する。得られた画像が図5のFである。
Further, the analysis image generation unit 14 further forms an analysis image using the weight mask w (x, y) (S407).
In the image formation for analysis in step 407, the weight mask [D in FIG. 5] created in step 406 is subtracted from 1 (1-w (x, y)) on the input image I shown in A of FIG. An image obtained by multiplying [E] in FIG. 5 and an image obtained by multiplying the blurred image [B in FIG. 5] created in Step 403 by the weight mask [D in FIG. 5] created in Step 406 are obtained. Is added. The obtained image is F in FIG.

すなわち、
Ia(x,y)=(1−w(x,y))×I(x,y)+w(x,y)×B(x,y)
これにより、図6に示すように、白飛び部分(光源32)がボケたような解析用画像30′が作成される。
That is,
Ia (x, y) = (1−w (x, y)) × I (x, y) + w (x, y) × B (x, y)
As a result, as shown in FIG. 6, an analysis image 30 ′ in which a whiteout portion (light source 32) is blurred is created.

そして、PSF推定部15によって、ステップ407において作成された解析用画像を用いて、PSFを求める(S408)。
図7Bに、このようにして推定したPSFを示す。図7Aが正しいPSFであり、図7Cは、従来の手法による推定PSFを示す。このように、白飛び部分の周りの鋭いエッジが弱められているため、正解PSFに近い推定結果が得られる。
Then, the PSF estimation unit 15 obtains the PSF using the analysis image created in step 407 (S408).
FIG. 7B shows the PSF estimated in this way. FIG. 7A is the correct PSF, and FIG. 7C shows the estimated PSF by the conventional method. Thus, since the sharp edge around the whiteout part is weakened, an estimation result close to the correct PSF can be obtained.

(第2実施形態)
つぎに、図8及び図9A−図9Cを参照して、本発明の第2実施形態について説明する。
図8は第2実施形態のPSF情報作成部10によるPSF情報作成工程を示すフローチャートである。図9A−図9Cは、重みマスク作成部12における画像およびマップ等の輝度を示す説明図である。
(Second Embodiment)
Next, a second embodiment of the present invention will be described with reference to FIGS. 8 and 9A to 9C.
FIG. 8 is a flowchart showing a PSF information creation process by the PSF information creation unit 10 of the second embodiment. FIG. 9A to FIG. 9C are explanatory diagrams showing the brightness of images, maps, and the like in the weight mask creation unit 12.

前述した第1実施形態では、領域識別部11によって非有効領域と有効領域とを識別した後、重みマスク作成部12によって各画素の非有効領域からの距離マップを求め、その距離マップに基づいて解析用画像生成部14で重みマスクを作成している。これに対して第2実施形態は、距離マップを用いることなく、以下のように重みマスクを作成する。   In the first embodiment described above, after the ineffective area and the effective area are identified by the area identifying unit 11, a distance map from the ineffective area of each pixel is obtained by the weight mask creating unit 12, and based on the distance map. The analysis image generation unit 14 creates a weight mask. In contrast, the second embodiment creates a weight mask as follows without using a distance map.

なお、前述した第1実施形態と同機能の構成要素には、同符号を付して説明は省略する。また、図8に示すPSF情報作成部10によるPSF情報作成工程を示すフローチャートも、第1実施形態における距離マップ作成(S405)が、非有効領域の膨張処理(S905)に置き換わるのみであり、他の工程は同一である。   In addition, the same code | symbol is attached | subjected to the component of the same function as 1st Embodiment mentioned above, and description is abbreviate | omitted. Further, in the flowchart showing the PSF information creation process by the PSF information creation unit 10 shown in FIG. 8, the distance map creation (S405) in the first embodiment is merely replaced with the ineffective area expansion processing (S905). These steps are the same.

第2実施形態における重みマスク作成部12は、ステップ904において図9Aに示すように有効領域と非有効領域とを特定し、非有効領域で1、有効領域で0の一次予備マスクを作成する。
次いで図9Bに示すように非有効領域の膨張処理を行い(S905)、二次予備マスクを作成する。
そして、その二次予備マスクにぼかし処理を施して図9Cに示すような重みマスクを作成する。
In step 904, the weight mask creating unit 12 in the second embodiment identifies the effective area and the ineffective area as shown in FIG. 9A, and creates a primary preliminary mask of 1 in the ineffective area and 0 in the effective area.
Next, as shown in FIG. 9B, the ineffective area is expanded (S905), and a secondary preliminary mask is created.
Then, the secondary preliminary mask is subjected to a blurring process to create a weight mask as shown in FIG. 9C.

ステップ905において膨張させる大きさは、0.25×fs以上、2×fs以下程度が良好な結果を得られる。
本第2実施形態によっても、図9Cに示すように、前述した第1実施形態における図5のDに示す重みマスクと略同等の重みマスクが得られる。
以下、第1実施形態と同様の計算を行うことで、正確なPSFが得られる。
A good result is obtained when the size of the expansion in step 905 is about 0.25 × fs or more and 2 × fs or less.
Also in the second embodiment, as shown in FIG. 9C, a weight mask substantially equivalent to the weight mask shown in FIG. 5D in the first embodiment described above can be obtained.
Hereinafter, an accurate PSF can be obtained by performing the same calculation as in the first embodiment.

以上、本実施形態によると、以下の効果を有する。
(1)第1実施形態における画像処理装置1のPSF情報作成部10では、白飛びなどの領域とその他の領域との境界からの距離に応じて入力画像と入力画像をぼかしたぼかし画像とを加算した解析用の画像を作成する。そして、この解析用画像からPSFを推定することにより、推定精度の劣化を最小限に抑えることが可能である。
As described above, this embodiment has the following effects.
(1) In the PSF information creation unit 10 of the image processing apparatus 1 according to the first embodiment, an input image and a blurred image obtained by blurring the input image according to the distance from the boundary between the region such as whiteout and the other region Create the added image for analysis. Then, by estimating the PSF from the analysis image, it is possible to minimize the deterioration in estimation accuracy.

(2)第2実施形態におけるPSF情報作成部10では、白飛びなどの非有効領域に膨張処理を行った後にぼかし処理を施して重みマスクを作成する。そして、重みマスクの重みをつけたぼかし画像と、重みマスクを反転させたマスクの重みをつけた入力画像とを加算した解析用画像を生成し、この解析用画像からPSFを推定する。これにより、簡便な処理によって推定精度の劣化を抑えることができる。 (2) The PSF information creation unit 10 in the second embodiment creates a weight mask by performing a blurring process after performing an expansion process on an ineffective area such as a whiteout. Then, an analysis image is generated by adding the blurred image to which the weight of the weight mask is added and the input image to which the weight of the mask obtained by inverting the weight mask is added, and the PSF is estimated from the analysis image. Thereby, deterioration of estimation accuracy can be suppressed by simple processing.

(第3実施形態)
つぎに、図10及び図11を参照して、本発明の第3実施形態について説明する。
図10は、そのPSF情報作成部の別のブロック構成図である。図11は、元画像300を示す説明図である。図12は第3実施形態のPSF情報作成部によるPSF情報作成工程を示す別のフローチャートである。
(Third embodiment)
Next, a third embodiment of the present invention will be described with reference to FIGS.
FIG. 10 is another block diagram of the PSF information creation unit. FIG. 11 is an explanatory diagram showing the original image 300. FIG. 12 is another flowchart showing the PSF information creation process by the PSF information creation unit of the third embodiment.

本発明の第3実施形態について、図12に示すフローチャートに沿って図10、図11を参照しつつ説明する。
まず、入力画像Iを取得し(S401)、そのグレースケール画像Igを作成する(S402)。
次に、グレースケール画像Igに複数のメッシュMeを生成する(S503)。本実施例において、複数のメッシュMeのそれぞれは、同一の面積を有し、互いに重ならないように隣接して備えられている。
なお、複数のメッシュのそれぞれは、異なる面積を有していても良い。複数のメッシュのそれぞれは、少なくとも一部が重なるように備えられていても良いし、互いに間隔を隔てて備えられていてもよい。
A third embodiment of the present invention will be described with reference to FIGS. 10 and 11 along the flowchart shown in FIG.
First, the input image I is acquired (S401), and the gray scale image Ig is created (S402).
Next, a plurality of meshes Me are generated in the gray scale image Ig (S503). In the present embodiment, each of the plurality of meshes Me has the same area and is provided adjacent to each other so as not to overlap each other.
Each of the plurality of meshes may have a different area. Each of the plurality of meshes may be provided so that at least a part thereof overlaps, or may be provided at a distance from each other.

つぎに、領域識別部11により、入力画像Iに基づいて、白飛びや黒つぶれのために輝度勾配が不連続になっている可能性のある領域を非有効領域non_validと定義し、その他の領域を有効領域validと定義する(S404)。
次に、ステップ507において、解析用画像生成部14は、複数のメッシュMeのそれぞれについて、非有効領域non_validが含まれているか否かを判断し、非有効領域non_validが含まれているメッシュMe0と、非有効領域non_validが含まれていないメッシュMe1とに分類する。
解析用画像生成部14は、非有効領域non_validが含まれていないメッシュMe1を選択し解析用の画像を形成する。
次に、PSF推定部15によって、ステップ507において作成された解析用画像を用いて、PSFを求める(S408)。
Next, the area identifying unit 11 defines, based on the input image I, an area where the luminance gradient may be discontinuous due to overexposure or blackout as an ineffective area non_valid, and other areas Is defined as an effective area valid (S404).
Next, in step 507, the analysis image generation unit 14 determines whether or not each of the plurality of meshes Me includes the ineffective area non_valid, and the mesh Me0 including the ineffective area non_valid is determined. And the mesh Me1 that does not include the non-valid region non_valid.
The analysis image generation unit 14 selects a mesh Me1 that does not include the ineffective area non_valid, and forms an analysis image.
Next, the PSF estimator 15 obtains the PSF using the analysis image created in step 507 (S408).

(変形形態)
本発明は、以上説明した実施形態に限定されることなく、以下に示すような種々の変形や変更が可能であり、それらも本発明の範囲内である。
(1)上記実施形態では、領域識別部11により、白飛びや黒つぶれのために輝度勾配が不連続になっている領域を非有効領域とし、その他の領域を有効領域とした。しかし、画像における目標被写体等の任意のエリアを有効領域として設定するように構成しても良い。これにより、画面内に様々な異なるPSFを持つ領域が混在している場合において、目標被写体に限定したPSFの推定が可能となる。
例えば、図13においては、領域識別部11は、目標被写体である人物の顔、頭に対応する有効領域が含まれていないメッシュMe2と、人物の顔、頭に対応する有効領域が含まれているメッシュMe3とに分類する。解析用画像生成部14は、有効領域が含まれているメッシュMe3を選択し解析用の画像を形成する。
(Deformation)
The present invention is not limited to the embodiment described above, and various modifications and changes as shown below are possible, and these are also within the scope of the present invention.
(1) In the above-described embodiment, the region identifying unit 11 sets a region where the luminance gradient is discontinuous due to overexposure or blackout as an ineffective region, and other regions as effective regions. However, an arbitrary area such as a target subject in the image may be set as an effective area. This makes it possible to estimate the PSF limited to the target subject when areas having various different PSFs are mixed in the screen.
For example, in FIG. 13, the area identifying unit 11 includes a mesh Me2 that does not include an effective area corresponding to the face and head of the person who is the target subject, and an effective area that corresponds to the face and head of the person. The mesh Me3 is classified. The analysis image generation unit 14 selects the mesh Me3 including the effective region and forms an analysis image.

たとえば、複数の人がそれぞれ自由に動いている場面を撮影した場合、特定の人物のブレを表すPSFを計算しようとしても、そのままの画像で推定を行ったのでは、様々なPSFが影響し合い、正確には求められない。
そこで、PSFを求めたい特定の人物を有効領域、その他の部分を非有効領域として、上記の方法で解析用画像を作成し、その解析用画像でPSFを推定すると、該当する特定の人物のPSFを求めることができる。
For example, when shooting a scene in which a plurality of people are moving freely, even if an attempt is made to calculate a PSF representing the blur of a specific person, various PSFs affect each other if the estimation is performed with the image as it is. It is not exactly required.
Therefore, when an analysis image is created by the above method using a specific person whose PSF is to be obtained as an effective area and other portions as non-effective areas, and the PSF is estimated from the analysis image, the PSF of the corresponding specific person is obtained. Can be requested.

人物の特定方法は、既知の顔認識や、ユーザーにエリアを指定してもらう等の方法を用いることができる。
また、人物以外にも、車や、動物などの特定の目標物を認識(オブジェクト認識)し、同様に解析用の画像を作成して、任意形状の一部分だけのPSFを得ることも可能である。
As a method for identifying a person, a method such as known face recognition or having a user specify an area can be used.
In addition to a person, it is also possible to recognize a specific target such as a car or an animal (object recognition) and similarly create an image for analysis to obtain a PSF of only a part of an arbitrary shape. .

(2)上記実施の形態は、本発明を画像処理装置として説明したが、本発明は画像処理プログラムとして供給されるものを含む。その場合、プログラムは、CD−ROMなどの記録媒体やインターネットなどのデータ信号を通じて提供することができる。画像処理装置は、カメラに内蔵されていてもよい。 (2) In the above embodiments, the present invention has been described as an image processing apparatus, but the present invention includes what is supplied as an image processing program. In this case, the program can be provided through a recording medium such as a CD-ROM or a data signal such as the Internet. The image processing apparatus may be built in the camera.

上記実施形態および変形形態は適宜に組み合わせて用いることができるが、各実施形態の構成は図示と説明により明らかであるため、詳細な説明を省略する。さらに、本発明は以上説明した実施形態によって限定されることはない。   The above embodiments and modifications can be used in appropriate combinations, but the configuration of each embodiment is clear from the illustration and description, and thus detailed description thereof is omitted. Furthermore, the present invention is not limited by the embodiment described above.

1:画像処理装置、10:PSF情報作成部、11:領域識別部、12:重みマスク作成部、13:ぼかし画像生成部、14:解析用画像生成部、15:PSF推定部、20:画像処理部、30:画像、31:主要被写体、32:光源   1: image processing device, 10: PSF information creation unit, 11: region identification unit, 12: weight mask creation unit, 13: blurred image generation unit, 14: image generation unit for analysis, 15: PSF estimation unit, 20: image Processing unit, 30: image, 31: main subject, 32: light source

Claims (1)

入力画像から、ぼかし画像を生成するぼかし画像生成部と、
前記入力画像中の領域を、非有効領域と有効領域とに分ける領域識別部と、
前記非有効領域においては前記有効領域より重みを大きくし、前記有効領域においては前記非有効領域との境界からの距離に応じて重みを減少させる重みマスクを作成する重みマスク作成部と、
前記重みマスク作成部により作成された前記重みマスクにより重みを付けたぼかし画像と、前記重みマスクを反転させたマスクにより重みを付けた入力画像と、を加算して解析用画像を生成する解析用画像生成部と、
前記解析用画像を用いて点広がり関数の推定を行うPSF推定部と、
を備えること、を特徴とする画像処理装置。
A blurred image generation unit that generates a blurred image from an input image;
An area identifying unit that divides an area in the input image into an ineffective area and an effective area;
A weight mask creating unit that creates a weight mask that increases the weight in the ineffective area compared to the effective area and decreases the weight in accordance with the distance from the boundary with the ineffective area in the effective area;
For analysis to generate an analysis image by adding a blurred image weighted by the weight mask created by the weight mask creation unit and an input image weighted by a mask obtained by inverting the weight mask An image generator;
A PSF estimation unit for estimating a point spread function using the analysis image;
An image processing apparatus comprising:
JP2018095654A 2012-07-12 2018-05-17 Image processing apparatus and image processing program Pending JP2018133110A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012156100 2012-07-12
JP2012156100 2012-07-12

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014524894A Division JP6341087B2 (en) 2012-07-12 2013-07-12 Image processing apparatus and image processing program

Publications (2)

Publication Number Publication Date
JP2018133110A true JP2018133110A (en) 2018-08-23
JP2018133110A5 JP2018133110A5 (en) 2019-01-17

Family

ID=49916165

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2014524894A Active JP6341087B2 (en) 2012-07-12 2013-07-12 Image processing apparatus and image processing program
JP2018095654A Pending JP2018133110A (en) 2012-07-12 2018-05-17 Image processing apparatus and image processing program

Family Applications Before (1)

Application Number Title Priority Date Filing Date
JP2014524894A Active JP6341087B2 (en) 2012-07-12 2013-07-12 Image processing apparatus and image processing program

Country Status (2)

Country Link
JP (2) JP6341087B2 (en)
WO (1) WO2014010726A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020166628A (en) * 2019-03-29 2020-10-08 キヤノン株式会社 Image processing method, image processing device, program, image processing system, and learned model manufacturing method

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10708798B2 (en) 2015-12-29 2020-07-07 Telefonaktiebolaget Lm Ericsson (Publ) Network performance framework for wireless local area networks
KR102564855B1 (en) * 2018-01-08 2023-08-08 삼성전자주식회사 Device and method to recognize object and face expression, and device and method to train obejct and face expression robust to facial change
CN111788824B (en) * 2018-03-06 2022-07-08 索尼公司 Image processing apparatus, imaging apparatus, and image processing method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011099244A1 (en) * 2010-02-10 2011-08-18 パナソニック株式会社 Image processing device and method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4799428B2 (en) * 2007-01-22 2011-10-26 株式会社東芝 Image processing apparatus and method
JP2010088024A (en) * 2008-10-02 2010-04-15 Nikon Corp Photographing apparatus
CN102017607B (en) * 2009-02-25 2013-12-25 松下电器产业株式会社 Image correction device and image correction method
CN102203827B (en) * 2009-10-02 2013-05-29 香港中文大学 Methods and apparatus for editing images
CN102687501A (en) * 2010-12-20 2012-09-19 松下电器产业株式会社 Image processing apparatus,image pickup unit,and image processing method
JP2012155456A (en) * 2011-01-25 2012-08-16 Panasonic Corp Subject separation device, image restoration device, subject separation method, and image restoration method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011099244A1 (en) * 2010-02-10 2011-08-18 パナソニック株式会社 Image processing device and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020166628A (en) * 2019-03-29 2020-10-08 キヤノン株式会社 Image processing method, image processing device, program, image processing system, and learned model manufacturing method
JP7362284B2 (en) 2019-03-29 2023-10-17 キヤノン株式会社 Image processing method, image processing device, program, image processing system, and learned model manufacturing method

Also Published As

Publication number Publication date
JPWO2014010726A1 (en) 2016-06-23
JP6341087B2 (en) 2018-06-13
WO2014010726A1 (en) 2014-01-16

Similar Documents

Publication Publication Date Title
CN110008817B (en) Model training method, image processing method, device, electronic equipment and computer readable storage medium
KR101871098B1 (en) Apparatus and method for image processing
JP4799428B2 (en) Image processing apparatus and method
US11188777B2 (en) Image processing method, image processing apparatus, learnt model manufacturing method, and image processing system
JP2018133110A (en) Image processing apparatus and image processing program
CN108234858B (en) Image blurring processing method and device, storage medium and electronic equipment
US8422827B2 (en) Image correction apparatus and image correction method
CN103426147B (en) Image processing apparatus, image pick-up device and image processing method
US20180061086A1 (en) Image processing apparatus, image processing method, and medium
JP2013242617A (en) Image processing device, imaging device, distance measurement method, and distance measurement program
US8629868B1 (en) Systems and methods for simulating depth of field on a computer generated display
US20200296259A1 (en) Method and apparatus for determining depth value
JP2013192224A (en) Method and apparatus for deblurring non-uniform motion blur using multi-frame including blurred image and noise image
CN112785507A (en) Image processing method and device, storage medium and terminal
KR101394361B1 (en) Apparatus and method for single image defogging using alpha matte estimation and image fusion
JP7032913B2 (en) Image processing device, image processing method, computer program
CN115578286A (en) High dynamic range hybrid exposure imaging method and apparatus
TWI672639B (en) Object recognition system and method using simulated object images
US7412110B1 (en) Using forward and backward kernels to filter images
KR101437898B1 (en) Apparatus and method for generating a High Dynamic Range image using single image
JP5431501B2 (en) Image processing apparatus and method
Carbajal et al. Single image non-uniform blur kernel estimation via adaptive basis decomposition
CN112508801A (en) Image processing method and computing device
JP2021047710A (en) Image processing apparatus, image processing method, image processing system, and program
EP4047548A1 (en) Image processing method and apparatus, training method and apparatus of machine learning model, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180521

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181128

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190517

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190528

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20190717

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20191210