JP6961423B2 - Image processing equipment, imaging equipment, control methods for image processing equipment, programs and recording media - Google Patents

Image processing equipment, imaging equipment, control methods for image processing equipment, programs and recording media Download PDF

Info

Publication number
JP6961423B2
JP6961423B2 JP2017164421A JP2017164421A JP6961423B2 JP 6961423 B2 JP6961423 B2 JP 6961423B2 JP 2017164421 A JP2017164421 A JP 2017164421A JP 2017164421 A JP2017164421 A JP 2017164421A JP 6961423 B2 JP6961423 B2 JP 6961423B2
Authority
JP
Japan
Prior art keywords
region
image
contrast value
composition ratio
image processing
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
JP2017164421A
Other languages
Japanese (ja)
Other versions
JP2019047145A5 (en
JP2019047145A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2017164421A priority Critical patent/JP6961423B2/en
Publication of JP2019047145A publication Critical patent/JP2019047145A/en
Publication of JP2019047145A5 publication Critical patent/JP2019047145A5/en
Application granted granted Critical
Publication of JP6961423B2 publication Critical patent/JP6961423B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ピント位置の異なる複数の画像を合成する画像処理装置に関するものである。 The present invention relates to an image processing device that synthesizes a plurality of images having different focus positions.

デジタルカメラなどの撮像装置からの距離が互いに大きく異なる複数の被写体を撮像する場合や、奥行き方向に長い被写体を撮像する場合に、被写界深度が足りないために被写体の一部にしかピントを合わせられない場合がある。これを解決するため、特許文献1には、ピント位置の異なる複数の画像を撮像し、各画像から合焦領域のみを抽出して1枚の画像に合成し、撮像領域全体に合焦している合成画像を生成する、所謂、深度合成の技術が開示されている。そこで、特許文献1では、それぞれの画像の同じ位置にある領域の中で、コントラスト値の最も高い領域を合焦領域とする。 When shooting multiple subjects whose distances from imagers such as digital cameras are significantly different from each other, or when shooting a subject that is long in the depth direction, the depth of field is insufficient, so focus is only on a part of the subject. It may not be possible to match. In order to solve this problem, in Patent Document 1, a plurality of images having different focus positions are captured, only the focusing region is extracted from each image, combined into one image, and the entire imaging region is focused. A so-called depth-of-field composition technique for generating a composite image is disclosed. Therefore, in Patent Document 1, among the regions at the same position of each image, the region having the highest contrast value is defined as the focusing region.

特開2015−216532号公報Japanese Unexamined Patent Publication No. 2015-216532

しかし、上述したような深度合成の方法を用いると、合成画像のエッジ部においてぼけ領域が出る場合がある。 However, when the method of depth composition as described above is used, a blurred region may appear at the edge portion of the composite image.

図10は、深度合成のための撮像を行う一例を説明するための図である。図10に示した場合では、撮像装置は、白地の背景の前にあるX型の被写体に対して、ピント位置を変えながら5枚の画像1010乃至1050を撮像し、撮像した画像に対して合成を行い、合成画像1000を生成したとする。画像1010乃至1050では、画素1011乃至1051は同じ位置にあり、画素1012乃至1052は同じ位置にあるとする。特許文献1に開示された技術を用いて合成画像を作成すると、画素1011乃至1051の中から最もコントラスト値の高いものを選んで合成画像の同じ位置に使う。そこで、撮像装置は、画素1031を合成画像1000に使うことが図示されている。しかしながら、撮像装置は、同様な方法で画素1012乃至1052の中から最もコントラスト値の高いものを選んで合成画像の同じ位置に使うと、画素1012または1052を選んで合成画像に使ってしまう。その結果、図示されているように、合成画像1000には、エッジ部の周辺にボケが生じてしまう。これは撮像装置に限らず、ピント位置を変えて撮像された複数の画像を取得し、これら複数の画像を合成する機能を有する画像処理装置全般に共通する課題である。 FIG. 10 is a diagram for explaining an example of performing imaging for depth synthesis. In the case shown in FIG. 10, the imaging device captures five images 1010 to 1050 of an X-shaped subject in front of a white background while changing the focus position, and synthesizes the captured images. Is performed to generate the composite image 1000. In images 1010 to 1050, it is assumed that the pixels 1011 to 1051 are in the same position and the pixels 1012 to 1052 are in the same position. When a composite image is created using the technique disclosed in Patent Document 1, the pixel 1011 to 1051 having the highest contrast value is selected and used at the same position in the composite image. Therefore, it is illustrated that the image pickup apparatus uses the pixel 1031 for the composite image 1000. However, if the image pickup apparatus selects the pixel 1012 to 1052 having the highest contrast value and uses it at the same position in the composite image in the same manner, the pixel 1012 or 1052 is selected and used in the composite image. As a result, as shown in the figure, the composite image 1000 is blurred around the edge portion. This is a problem common to all image processing devices having a function of acquiring a plurality of images captured by changing the focus position and synthesizing the plurality of images, not limited to the image pickup device.

本発明は、上記の課題を鑑みてなされたものであり、ピント位置の異なる複数の画像を用いて合成した画像に含まれるぼけを低減することができる画像処理装置を提供することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to provide an image processing apparatus capable of reducing blur included in an image synthesized by using a plurality of images having different focus positions. ..

上記課題を解決するため、本願発明は、画像の複数の領域のそれぞれからコントラスト値を取得する取得手段と、少なくとも一部の画角が重なり、かつ、ピント位置の異なる複数の画像に対して、領域ごとに前記取得手段が取得した前記コントラスト値に応じた合成比率を設定し、設定した前記合成比率に基づいて前記複数の画像の合成を行って合成画像を生成する合成手段と、を有し、前記合成手段は、前記合成手段は、前記複数の画像のそれぞれの第1の領域の前記コントラスト値の変化量が予め定められた第1の閾値以下であり、かつ、前記第1の領域の近傍に、前記複数の画像のそれぞれの領域間の前記コントラスト値の変化量が第2の閾値よりも大きい第2の領域が存在する場合は、前記第1の領域の前記合成比率を、前記第2の領域の前記合成比率と等しく設定することを特徴とする画像処理装置を提供する。 In order to solve the above problems, the present invention relates to an acquisition means for acquiring contrast values from each of a plurality of regions of an image, and for a plurality of images having at least a part of the angle of view overlapping and different focus positions. Each region has a compositing means that sets a compositing ratio according to the contrast value acquired by the acquisition means and synthesizes the plurality of images based on the set compositing ratio to generate a compositing image. The synthesis means is such that the amount of change in the contrast value between the first regions of the plurality of images is equal to or less than a predetermined first threshold value, and the first region When there is a second region in the vicinity of the image in which the amount of change in the contrast value between the regions of the plurality of images is larger than the second threshold value, the composition ratio of the first region is set to the above. Provided is an image processing apparatus characterized in that the composition ratio is set to be equal to the composition ratio of the second region.

本発明の構成によれば、ピント位置の異なる複数の画像を撮像して合成した画像に含まれるぼけを低減することができる画像処理装置を提供することができる。 According to the configuration of the present invention, it is possible to provide an image processing apparatus capable of reducing blur included in an image obtained by capturing and synthesizing a plurality of images having different focus positions.

本発明の実施形態に係るデジタルカメラの構造を示すブロック図である。It is a block diagram which shows the structure of the digital camera which concerns on embodiment of this invention. 本発明の実施形態における合成画像の生成について説明するためのフローチャートである。It is a flowchart for demonstrating the generation of the composite image in embodiment of this invention. 本発明の実施形態における撮像について説明するためのフローチャートである。It is a flowchart for demonstrating the imaging in Embodiment of this invention. 本発明の実施形態における位置合わせについて説明するためのフローチャートである。It is a flowchart for demonstrating alignment in Embodiment of this invention. 本発明の実施形態における画像の合成について説明するためのフローチャートである。It is a flowchart for demonstrating composition of an image in Embodiment of this invention. 第1の実施形態における合成マップの補正について説明するためのフローチャートである。It is a flowchart for demonstrating the correction of the synthetic map in 1st Embodiment. 本発明の実施形態におけるコントラスト値の変化量を説明するための図である。It is a figure for demonstrating the amount of change of the contrast value in embodiment of this invention. 本発明の実施形態における点広がり関数を説明するための図である。It is a figure for demonstrating the point spread function in embodiment of this invention. 第2の実施形態における合成マップの補正について説明するためのフローチャートである。It is a flowchart for demonstrating the correction of the synthetic map in 2nd Embodiment. 深度合成のための撮像を行う一例を説明するための図である。It is a figure for demonstrating an example of performing an image pickup for depth synthesis.

以下では、添付の図面を参照しながら、本発明の好適な実施形態について詳細に説明する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

(第1の実施形態)
図1は本実施形態に係る画像処理装置としてのデジタルカメラの構造を示すブロック図である。デジタルカメラ100は、静止画を撮像することができ、かつ、合焦位置の情報を記録し、コントラスト値の算出および画像の合成が可能なものである。さらに、デジタルカメラ100は、撮像して保存した画像、または、外部から入力した画像に対して、拡大処理または縮小処理を行うことができる。
(First Embodiment)
FIG. 1 is a block diagram showing a structure of a digital camera as an image processing device according to the present embodiment. The digital camera 100 can capture a still image, record information on the in-focus position, calculate a contrast value, and synthesize an image. Further, the digital camera 100 can perform enlargement processing or reduction processing on an image captured and saved or an image input from the outside.

制御部101は、例えばCPUやMPUなどのシグナルプロセッサであり、予め後述するROM105に内蔵されたプログラムを読み出しながら、デジタルカメラ100の各部分を制御する。たとえば、後述するように、制御部101が、後述する撮像部104に対して撮像の開始と終了について指令を出す。または、後述する画像処理部107に対して、ROM105に内蔵されたプログラムに基づいて、画像処理の指令を出す。ユーザによる指令は、後述する操作部110によってデジタルカメラ100に入力され、制御部101を通して、デジタルカメラ100の各部分に達する。 The control unit 101 is, for example, a signal processor such as a CPU or an MPU, and controls each part of the digital camera 100 while reading a program built in the ROM 105 described later in advance. For example, as will be described later, the control unit 101 issues a command to the imaging unit 104, which will be described later, regarding the start and end of imaging. Alternatively, an image processing command is issued to the image processing unit 107, which will be described later, based on the program built in the ROM 105. The command from the user is input to the digital camera 100 by the operation unit 110 described later, and reaches each part of the digital camera 100 through the control unit 101.

駆動部102は、モーターなどによって構成され、制御部101の指令の下で、後述する光学系103を機械的に動作させる。たとえば、制御部101の指令に基づいて、駆動部102が光学系103に含まれるフォーカスレンズの位置を移動させ、光学系103の焦点距離を調整する。 The drive unit 102 is composed of a motor or the like, and mechanically operates the optical system 103, which will be described later, under the command of the control unit 101. For example, based on the command of the control unit 101, the drive unit 102 moves the position of the focus lens included in the optical system 103 to adjust the focal length of the optical system 103.

光学系103は、ズームレンズ、フォーカスレンズ、および絞りなどにより構成される。絞りは、透過する光量を調整する機構である。レンズの位置を変えることによって、合焦位置を変えることができる。 The optical system 103 includes a zoom lens, a focus lens, an aperture, and the like. The aperture is a mechanism that adjusts the amount of transmitted light. The focusing position can be changed by changing the position of the lens.

撮像部104は、光電変換素子であり、入射された光信号を電気信号に変換する光電変換を行うものである。たとえば、撮像部104に、CCDセンサやCMOSセンサなどを適用することができる。撮像部104は、動画撮像モードを設け、時間的に連続する複数の画像を動画の各々のフレームとして、撮像することができる。 The imaging unit 104 is a photoelectric conversion element, and performs photoelectric conversion that converts an incident optical signal into an electric signal. For example, a CCD sensor, a CMOS sensor, or the like can be applied to the image pickup unit 104. The imaging unit 104 is provided with a moving image imaging mode, and can capture a plurality of images that are continuous in time as each frame of the moving image.

ROM105は、記録媒体としての読み出し専用の不揮発性メモリであり、デジタルカメラ100が備える各ブロックの動作プログラムに加え、各ブロックの動作に必要なパラメータ等を記憶している。RAM106は、書き換え可能な揮発性メモリであり、デジタルカメラ100が備える各ブロックの動作において出力されたデータの一時的な記憶領域として用いられる。 The ROM 105 is a read-only non-volatile memory as a recording medium, and stores, in addition to the operation program of each block included in the digital camera 100, parameters and the like necessary for the operation of each block. The RAM 106 is a rewritable volatile memory, and is used as a temporary storage area for data output in the operation of each block included in the digital camera 100.

画像処理部107は、撮像部104から出力された画像、あるいは後述する内蔵メモリ109に記録されている画像信号のデータに対して、ホワイトバランス調整、色補間、フィルタリングなど、様々な画像処理を行う。また、撮像部104が撮像した画像信号のデータに対して、JPEGなどの規格で、圧縮処理を行う。 The image processing unit 107 performs various image processing such as white balance adjustment, color interpolation, and filtering on the image output from the image pickup unit 104 or the image signal data recorded in the built-in memory 109 described later. .. Further, the image signal data captured by the imaging unit 104 is compressed according to a standard such as JPEG.

画像処理部107は、特定の処理を行う回路を集めた集積回路(ASIC)で構成される。あるいは、制御部101がROM105から読み出したプログラムに従って処理することで、制御部101が画像処理部107の機能の一部または全部を兼用するようにしてもよい。制御部101が画像処理部107の全ての機能を兼用する場合には、画像処理部107をハードウェアとして有する必要はなくなる。 The image processing unit 107 is composed of an integrated circuit (ASIC) that collects circuits that perform specific processing. Alternatively, the control unit 101 may perform processing according to the program read from the ROM 105 so that the control unit 101 also has a part or all of the functions of the image processing unit 107. When the control unit 101 also has all the functions of the image processing unit 107, it is not necessary to have the image processing unit 107 as hardware.

表示部108は、RAM106に一時保存されている画像、または、後述する内蔵メモリ109に保存されている画像、あるいは、デジタルカメラ100の設定画面などを表示するための液晶ディスプレイや有機ELディスプレイなどである。 The display unit 108 is a liquid crystal display, an organic EL display, or the like for displaying an image temporarily stored in the RAM 106, an image stored in the built-in memory 109 described later, a setting screen of the digital camera 100, or the like. be.

内蔵メモリ109は、撮像部104が撮像した画像や画像処理部107の処理を得た画像、および、画像撮像時の合焦位置の情報などを記録する場所である。内蔵メモリの代わりに、メモリカードなどを用いてもよい。 The built-in memory 109 is a place for recording an image captured by the imaging unit 104, an image processed by the image processing unit 107, information on the focusing position at the time of image imaging, and the like. A memory card or the like may be used instead of the built-in memory.

操作部110は、たとえば、デジタルカメラ100につけるボタンやスイッチ、キー、モードダイアルなど、あるいは、表示部108に兼用されるタッチパネルなどである。ユーザによる指令は、操作部110を経由して、制御部101に達する。 The operation unit 110 is, for example, a button, a switch, a key, a mode dial, or the like attached to the digital camera 100, or a touch panel that is also used as the display unit 108. The command from the user reaches the control unit 101 via the operation unit 110.

図2は、本実施形態における合成画像の生成について説明するためのフローチャートである。ステップS201では、撮像部104は、ピント位置の異なる複数の画像を撮像する。ステップS202では、制御部101は、ステップS201で撮像部104が撮像した複数の画像に対して位置合わせを行う。ステップS203で、画像処理部107は、位置合わせを行った後の画像に対して合成を行い、合成画像を生成する。以下では、それぞれのステップについて詳細に説明する。 FIG. 2 is a flowchart for explaining the generation of the composite image in the present embodiment. In step S201, the imaging unit 104 captures a plurality of images having different focus positions. In step S202, the control unit 101 aligns the plurality of images captured by the imaging unit 104 in step S201. In step S203, the image processing unit 107 synthesizes the image after the alignment is performed, and generates a composite image. Each step will be described in detail below.

図3は、本実施形態におけるステップS201での撮像について説明するためのフローチャートである。 FIG. 3 is a flowchart for explaining the imaging in step S201 in the present embodiment.

ステップS301で、制御部101は、ピント位置の設定を行う。たとえば、ユーザは表示部108が兼用するタッチパネルを通して合焦位置を指定し、その合焦位置に相当するピント位置の光軸方向の前後に等間隔に複数のピント位置を指定する。同時に、制御部101は、設定したピント位置において、距離順に撮像順番を決める。 In step S301, the control unit 101 sets the focus position. For example, the user specifies the focusing position through the touch panel that is also used by the display unit 108, and specifies a plurality of focusing positions at equal intervals before and after the focus position corresponding to the focusing position in the optical axis direction. At the same time, the control unit 101 determines the imaging order in the order of distance at the set focus position.

ステップS302で、撮像部104は、ステップS301で設定したピント位置のうち、未撮像のものの中で、撮像順番が最も先のピント位置において撮像する。 In step S302, the imaging unit 104 takes an image at the focus position in which the imaging order is the earliest among the unimpressed focus positions set in step S301.

ステップS303で、制御部101は、ステップS301で設定したすべてのピント位置において撮像を行ったかどうかについて判断する。すべてのピント位置に撮像した場合は、このフローチャートでの処理を終了し、まだ撮像していないピント位置があれば、ステップS302に戻る。 In step S303, the control unit 101 determines whether or not imaging has been performed at all the focus positions set in step S301. When all the focus positions are imaged, the process in this flowchart is finished, and if there is a focus position that has not been imaged yet, the process returns to step S302.

図4は、本実施形態におけるステップS202での位置合わせについて説明するためのフローチャートである。 FIG. 4 is a flowchart for explaining the alignment in step S202 in the present embodiment.

ステップS401では、制御部101は、ステップS201で撮像部104が撮像した画像のうちから、位置合わせの基準画像を取得する。位置合わせの基準画像は、撮像順番が最も早いものとする。あるいは、ピント位置を変えながら撮像することで、わずかながら撮像された画像間で画角が変化するため、撮像した画像の中で画角が最も狭いものにしてもよい。 In step S401, the control unit 101 acquires a reference image for alignment from the images captured by the imaging unit 104 in step S201. The reference image for alignment shall have the earliest imaging order. Alternatively, by taking an image while changing the focus position, the angle of view changes slightly between the captured images, so that the angle of view may be the narrowest among the captured images.

ステップS402では、制御部101は、位置合わせの処理の対象画像を取得する。対象画像は、ステップS401で取得した基準画像以外の画像で、位置合わせの処理が済んでいないものとする。制御部101は、撮像順番が最も早いものを基準画像とするならば、撮像した順番で順次に対象画像を取得すればよい。 In step S402, the control unit 101 acquires the target image for the alignment process. It is assumed that the target image is an image other than the reference image acquired in step S401 and the alignment process has not been completed. If the image having the earliest imaging order is used as the reference image, the control unit 101 may acquire the target images in the order of imaging.

ステップS403では、制御部101は、基準画像と対象画像との位置のずれ量を算出する。算出方法の一例は、以下に述べる。まず、制御部101は、基準画像に、複数のブロックを設定する。制御部101は、各々のブロックのサイズが同じになるように設定することが好ましい。次に、制御部101は、対象画像の、基準画像のそれぞれのブロックと同じ位置に、基準画像のブロックよりも広い範囲を、探索範囲を設定する。最後に、制御部101は、対象画像のそれぞれの探索範囲に、基準画像のブロックとの輝度の差分絶対値和(Sum of Absolute Difference、以下、SADをいう)が最小となる対応点を算出する。制御部101は、基準画像のブロックの中心と前述した対応点から、ステップS403でいう位置のずれをベクトルとして算出する。制御部101は、前述する対応点の算出において、SADのほかに、差分二乗和(Sum of Squared Difference、以下SSDをいう)や正規化相互相関(Normalized Cross Correlation、以下NCCをいう)などを用いてもよい。 In step S403, the control unit 101 calculates the amount of displacement between the reference image and the target image. An example of the calculation method will be described below. First, the control unit 101 sets a plurality of blocks in the reference image. The control unit 101 is preferably set so that the size of each block is the same. Next, the control unit 101 sets a search range of the target image at the same position as each block of the reference image, in a range wider than the block of the reference image. Finally, the control unit 101 calculates a corresponding point in each search range of the target image that minimizes the sum of the absolute differences in brightness from the block of the reference image (Su of Absolute Difference, hereinafter referred to as SAD). .. The control unit 101 calculates the deviation of the position in step S403 as a vector from the center of the block of the reference image and the corresponding point described above. In addition to SAD, the control unit 101 uses Sum of Squared Difference (hereinafter referred to as SSD), normalized cross-correlation (hereinafter referred to as NCC), and the like in the calculation of the corresponding points described above. You may.

ステップS404で、制御部101で、基準画像と対象画像との位置のずれ量から変換係数を算出する。制御部101は、変換係数として、例えば射影変換係数を用いる。ただし、変換係数として射影変換係数だけに限定するわけではなく、アフィン変換係数や水平垂直シフトのみの簡略化した変換係数を用いてもよい。 In step S404, the control unit 101 calculates the conversion coefficient from the amount of positional deviation between the reference image and the target image. The control unit 101 uses, for example, a projective conversion coefficient as the conversion coefficient. However, the conversion coefficient is not limited to the projection conversion coefficient, and a simplified conversion coefficient of only the affine transformation coefficient or the horizontal / vertical shift may be used.

ステップS405で、画像処理部107は、ステップS404で算出した変換係数を用いて対象画像に対して変換を行う。 In step S405, the image processing unit 107 converts the target image using the conversion coefficient calculated in step S404.

たとえば、制御部101は、(式1)に示した式を用いて変形を行うことができる。 For example, the control unit 101 can be transformed by using the equation shown in (Equation 1).

Figure 0006961423
Figure 0006961423

(式1)では、(x´、y´)は変形を行った後の座標を示し、(x、y)は変形を行う前の座標を示す。行列AはステップS404で制御部101が算出した変形係数を示す。 In (Equation 1), (x', y') indicates the coordinates after the transformation, and (x, y) indicates the coordinates before the transformation. The matrix A shows the deformation coefficient calculated by the control unit 101 in step S404.

ステップS406で、制御部101は、基準画像以外のすべての画像に対して位置合わせを行ったかどうかについて判断する。基準画像以外のすべての画像に対して位置合わせを行った場合は、このフローチャートでの処理を終了し、まだ処理していない画像があれば、ステップS402に戻る。 In step S406, the control unit 101 determines whether or not all the images other than the reference image have been aligned. When the alignment is performed on all the images other than the reference image, the process in this flowchart is finished, and if there is an image that has not been processed yet, the process returns to step S402.

図5は、本実施形態におけるステップS203での画像の合成について説明するためのフローチャートである。 FIG. 5 is a flowchart for explaining the composition of images in step S203 in the present embodiment.

ステップ501で、画像処理部107は、位置合わせを行った後のそれぞれの画像(基準画像を含む)に対してコントラスト値を算出する。コントラスト値の算出方法の一例としては、たとえば、まず、画像処理部107は、それぞれの画素の色信号Sr、Sg、Sbから、下記の(式2)を用いて輝度Yを算出する。
Y = 0.299Sr + 0.587Sg + 0.114Sb・・・(式2)
In step 501, the image processing unit 107 calculates the contrast value for each image (including the reference image) after the alignment is performed. As an example of the method of calculating the contrast value, for example, first, the image processing unit 107 calculates the luminance Y from the color signals Sr, Sg, and Sb of each pixel using the following (Equation 2).
Y = 0.299Sr + 0.587Sg + 0.114Sb ... (Equation 2)

次に、3×3の画素の輝度Yの行列Lに、下記の(式3)乃至(式5)に示したように、ソーベルフィルタを用いてコントラスト値Iを算出する。 Next, the contrast value I is calculated using the Sobel filter in the matrix L of the brightness Y of the 3 × 3 pixels as shown in the following (Equation 3) to (Equation 5).

Figure 0006961423
Figure 0006961423

Figure 0006961423
Figure 0006961423

Figure 0006961423
Figure 0006961423

また、上述のコントラスト値の計算方法は一例にすぎず、たとえば、使用するフィルタをラプラシアンフィルタ等のエッジ検出フィルタや所定の帯域を通過するバンドパスフィルタを用いることも可能である。 Further, the above-mentioned method of calculating the contrast value is only an example, and for example, an edge detection filter such as a Laplacian filter or a bandpass filter that passes through a predetermined band can be used as the filter to be used.

ステップS502で、画像処理部107は、合成マップを生成する。合成マップの生成方法としては、画像処理部107は、それぞれの画像の同じ位置にある画素のコントラスト値を比較し、コントラスト値の最も高い画素の合成比率を100%とし、同じ位置にあるほかの画素の合成比率を0%とする。画像処理部107は、こうした合成比率の設定を、画像のすべての位置に対して行う。 In step S502, the image processing unit 107 generates a composite map. As a method of generating a composite map, the image processing unit 107 compares the contrast values of the pixels at the same position in each image, sets the composite ratio of the pixel with the highest contrast value to 100%, and sets another one at the same position. The pixel composition ratio is 0%. The image processing unit 107 sets such a composition ratio for all positions of the image.

ステップS503で、制御部101は、ステップS502で画像処理部107が生成した合成マップに対して補正を行う。具体的な補正方法は後述する。 In step S503, the control unit 101 corrects the composite map generated by the image processing unit 107 in step S502. The specific correction method will be described later.

ステップS504では、画像処理部107は、ステップS503で制御部101が補正した合成マップに従い画素の置き換えを行い、合成画像を生成する。なお、このようにして算出した合成比率に対して、隣接画素間で合成比率が0%から100%に変化(あるいは100%から0%に変化)すると、合成境界での不自然さが目立つようになる。そのため、合成マップに対して所定の画素数(タップ数)を持つフィルタをかけ、隣接画素間で合成比率が急激に変化しないようにする。 In step S504, the image processing unit 107 replaces the pixels according to the composite map corrected by the control unit 101 in step S503, and generates a composite image. When the composition ratio changes from 0% to 100% (or changes from 100% to 0%) between adjacent pixels with respect to the composition ratio calculated in this way, the unnaturalness at the composition boundary becomes conspicuous. become. Therefore, a filter having a predetermined number of pixels (tap number) is applied to the composite map so that the composite ratio does not change suddenly between adjacent pixels.

以下では、ステップS503での合成マップの補正について詳細に説明する。 Hereinafter, the correction of the composite map in step S503 will be described in detail.

図6は、本実施形態におけるステップS503での合成マップの補正について説明するためのフローチャートである。ステップS601で、制御部101は、未処理の画素から着目画素を選定する。 FIG. 6 is a flowchart for explaining the correction of the composite map in step S503 in the present embodiment. In step S601, the control unit 101 selects the pixel of interest from the unprocessed pixels.

次に、ステップS602で、制御部101は、着目画素のコントラスト値の変化量を算出する。ここでいうコントラスト値の変化量を、位置合わせを行った後のそれぞれの画像(基準画像を含む)において、着目画素と同じ位置にある画素のうち、コントラスト値の最大値と最小値との差を指す。 Next, in step S602, the control unit 101 calculates the amount of change in the contrast value of the pixel of interest. The difference between the maximum value and the minimum value of the contrast value among the pixels at the same position as the pixel of interest in each image (including the reference image) after the alignment of the amount of change in the contrast value referred to here. Point to.

ステップS603で、制御部101は、ステップS602で算出したコントラスト値の変化量を予め定められた閾値と比較し、閾値以下であれば、ステップS604に進み、着目画素の合成比率の変更を行う。一方、閾値以下でなければ、ステップS605に進む。ここでは、制御部101は、コントラスト値の変化量が閾値以下の画素は、図10の画素1001のように、被写体のエッジボケである可能性が高いと判断した。 In step S603, the control unit 101 compares the amount of change in the contrast value calculated in step S602 with a predetermined threshold value, and if it is equal to or less than the threshold value, proceeds to step S604 to change the composition ratio of the pixel of interest. On the other hand, if it is not equal to or less than the threshold value, the process proceeds to step S605. Here, the control unit 101 has determined that the pixels in which the amount of change in the contrast value is equal to or less than the threshold value are likely to have edge blur of the subject as in pixel 1001 of FIG.

ステップS604で、制御部101は、着目画素の合成比率を変更する。ここで、制御部101は、着目画素の合成比率を、その近傍の、コントラスト値の変化量が閾値よりも大きい画素を参照して変更する。たとえば、制御部101は、着目画素の合成比率を、その近傍のコントラスト値の変化量が閾値よりも大きい画素のうち、最も大きいものの合成比率にする。または、その近傍のコントラスト値の変化量が閾値よりも大きい画素のうち、最も近いものの合成比率にする。このステップS604における閾値は、ステップS603で比較に用いた閾値と同じ値としてもよいし、ステップS603で比較に用いた閾値よりも大きな値としてもよい。近傍にコントラスト値の変化量が閾値より大きくなる画素が存在しなければ、その画素の近傍にはエッジが無く、その画素がエッジボケである可能性は低いとして、合成比率の補正は行わない。なお、ここでいう「近傍」の範囲については、後述する。図8は、本実施形態におけるコントラスト値の変化量を説明するためのである。図7(a)では、複数の画像の同じ位置にある画素711乃至715のコントラスト値と画像撮像時のピント位置との関係を示している。画素713がある画像を撮像したときのコントラスト値が最大であり、このピント位置においてこの画素はピントが合っていると判断し、このピント位置をベストピントとも呼ぶ。ここで、コントラスト値の最も大きい画素513のコントラスト値と、コントラスト値の最も小さい画素715のコントラスト値の差、つまり前述したコントラスト値の変化量を算出し、前述した閾値より大きいと仮定する。 In step S604, the control unit 101 changes the composition ratio of the pixel of interest. Here, the control unit 101 changes the composition ratio of the pixel of interest with reference to a pixel in the vicinity of which the amount of change in the contrast value is larger than the threshold value. For example, the control unit 101 sets the composition ratio of the pixel of interest to the composition ratio of the pixel in which the amount of change in the contrast value in the vicinity thereof is larger than the threshold value. Alternatively, the composition ratio of the closest pixel among the pixels in which the amount of change in the contrast value in the vicinity is larger than the threshold value is set. The threshold value in step S604 may be the same value as the threshold value used for comparison in step S603, or may be a value larger than the threshold value used for comparison in step S603. If there is no pixel in the vicinity where the amount of change in the contrast value is larger than the threshold value, there is no edge in the vicinity of the pixel, and it is unlikely that the pixel has edge blur, and the composition ratio is not corrected. The range of "neighborhood" referred to here will be described later. FIG. 8 is for explaining the amount of change in the contrast value in the present embodiment. FIG. 7A shows the relationship between the contrast values of the pixels 711 to 715 at the same position of a plurality of images and the focus position at the time of image imaging. The contrast value when an image with the pixel 713 is captured is the maximum, and it is determined that the pixel is in focus at this focus position, and this focus position is also referred to as the best focus. Here, the difference between the contrast value of the pixel 513 having the largest contrast value and the contrast value of the pixel 715 having the smallest contrast value, that is, the amount of change in the contrast value described above is calculated and assumed to be larger than the threshold value described above.

一方で、図7(b)は、画素711乃至715のそれぞれの近傍にある同じ位置の画素721乃至725のコントラスト値とピント位置との関係を示している。図7(b)では、画素725のコントラスト値が最も高いが、それと、コントラスト値の最も低い画素723のコントラスト値との差、つまり、コントラスト値の変化量は閾値以下とする。コントラスト値の変化量が閾値以下である場合、前述したように、制御部は、この画素はコントラスト値の小さな被写体の領域の位置にあり、周囲の被写体のエッジのボケの影響を受けている可能性があるとして、合成比率の変更を行う。変更の方法として、制御部101は、図7(a)の画素711のベストピントとなるピント位置を、図7(b)の画素723におけるベストピントと判断する。そして、制御部101は、このピント位置にある画素723の合成比率を100%にし、画素725を含むほかの画像の同じ位置の画素の合成比率を0%にする。このような変更は、図10に例えると、画像処理部107は合成画像1000を作成するとき、図10の画素1051の代わりに、画素1031を合成画像に使うことになり、エッジボケを防ぐことになる。 On the other hand, FIG. 7B shows the relationship between the contrast value and the focus position of the pixels 721 to 725 at the same position in the vicinity of the pixels 711 to 715. In FIG. 7B, the contrast value of the pixel 725 is the highest, but the difference between it and the contrast value of the pixel 723 having the lowest contrast value, that is, the amount of change in the contrast value is set to be equal to or less than the threshold value. When the amount of change in the contrast value is less than or equal to the threshold value, as described above, the control unit may be affected by the blurring of the edges of the surrounding subject because the pixel is located in the area of the subject having a small contrast value. Assuming that there is a property, the composition ratio is changed. As a method of changing, the control unit 101 determines that the focus position that is the best focus of the pixel 711 in FIG. 7 (a) is the best focus in the pixel 723 of FIG. 7 (b). Then, the control unit 101 sets the composition ratio of the pixel 723 at the focus position to 100%, and sets the composition ratio of the pixels at the same position of other images including the pixel 725 to 0%. For example, in FIG. 10, when the image processing unit 107 creates the composite image 1000, the pixel 1031 is used for the composite image instead of the pixel 1051 in FIG. 10 to prevent edge blurring. Become.

ステップS605で、制御部101は、すべての画素を処理したかどうかについて判断する。すべての画素を処理した場合このフローを終了し、まだ処理していない画素があれば、ステップS601に戻る。 In step S605, the control unit 101 determines whether or not all the pixels have been processed. When all the pixels have been processed, this flow ends, and if there are pixels that have not been processed yet, the process returns to step S601.

なお、前述したように、上記処理は、図7(a)に示した画素は図7(b)に示した画素の近傍にあることを前提にしている。ここでいう「近傍」の判断は、点広がり関数(Point spread function、以下PSFをいう)を用いて行うことができる。 As described above, the above processing is based on the premise that the pixels shown in FIG. 7A are in the vicinity of the pixels shown in FIG. 7B. The determination of "neighborhood" here can be performed using a point spread function (hereinafter referred to as PSF).

図8は、本実施形態におけるPSFを説明するための図である。図8では、横軸が画素の座標、縦軸がコントラスト値を示している。なお、実際のPSFは2次元的な広がりを持っているが、図8では簡略のため、1次元で表現している。図8(a)は理想的なレンズを用いて点像をベストピントの位置で結像させた場合のPSFを示している。図8(b)では、ピント位置を動かしたデフォーカス状態(撮像面の位置がベストピントの位置から離れる状態)での結像は曲線820のようになり、像の広がる(ボケが広がる)画素数Nは距離821に示したようになる。図8(c)では、さらにデフォーカス量が大きくなると結像は曲線830になり、像の広がる画素数Nは距離831になる。 FIG. 8 is a diagram for explaining PSF in this embodiment. In FIG. 8, the horizontal axis represents the pixel coordinates and the vertical axis represents the contrast value. Although the actual PSF has a two-dimensional spread, it is represented in one dimension in FIG. 8 for the sake of brevity. FIG. 8A shows a PSF when a point image is formed at the best focus position using an ideal lens. In FIG. 8B, the image formation in the defocused state (the state where the position of the imaging surface is separated from the best focus position) in which the focus position is moved becomes as shown by the curve 820, and the image spreads (blurred spreads) pixels. The number N is as shown at distance 821. In FIG. 8C, when the defocus amount is further increased, the image formation becomes a curve 830, and the number of pixels N at which the image spreads becomes a distance 831.

デフォーカス量(ピント位置の変更量)はステップS301での設定から計算することができるので、PSFに応じて像がどれだけ広がるかを計算することが可能である。前述した着目画素の「近傍」を、この画素数Nに収めるように設定するとよい。つまり、制御部101は、着目画素のコントラスト値の変化量が閾値以下であれば、予め計算したPSFに基づいて設定した範囲において、コントラスト値の変化量が閾値より大きい画素があるかどうかを確かめる。着目画素の近傍にあれば、制御部101は、前述した合成比率の変更を行う。 Since the defocus amount (change amount of the focus position) can be calculated from the setting in step S301, it is possible to calculate how much the image spreads according to the PSF. It is preferable to set the "neighborhood" of the pixel of interest described above to be within this number of pixels N. That is, if the amount of change in the contrast value of the pixel of interest is equal to or less than the threshold value, the control unit 101 confirms whether or not there is a pixel in which the amount of change in the contrast value is larger than the threshold value in the range set based on the PSF calculated in advance. .. If it is in the vicinity of the pixel of interest, the control unit 101 changes the composition ratio described above.

なお、上述した近傍の決め方は一例にすぎず、様々な変更をすることができる。たとえば、PSFの広がりで得られた画素数Nで判断したうえで、さらに、被写体の距離情報を用いて判断する。つまり、図7(a)と図7(b)とに示した画素の被写体距離の差が所定量以下でないと、制御部101は、その2つの画素は「近傍」にあると判断しない。距離情報は公知の技術で算出することが可能で、一例として1つの画素に複数の光電変換部を有する撮像素子が取得するステレオ画像から算出することができる。 It should be noted that the above-mentioned method of determining the neighborhood is only an example, and various changes can be made. For example, after making a judgment based on the number of pixels N obtained by spreading the PSF, the judgment is made using the distance information of the subject. That is, unless the difference between the subject distances of the pixels shown in FIGS. 7 (a) and 7 (b) is equal to or less than a predetermined amount, the control unit 101 does not determine that the two pixels are in the "neighborhood". The distance information can be calculated by a known technique, and as an example, it can be calculated from a stereo image acquired by an image sensor having a plurality of photoelectric conversion units in one pixel.

さらに、上記の「近傍」と判断された画素のうち、コントラスト値の変化の特性を考慮することも可能である。たとえば、図7(a)に示した画素はベストピントの位置でコントラスト値が最大で、ピント位置が変化するとコントラスト値が減少する特性を持っている。それに対して、エッジボケ画素は図7(a)のベストピントの位置でコントラスト値が最小で、ピント位置が変化するとコントラスト値が増加する特性をもつ可能性が高い。そのため、着目画素のコントラスト値の変化特性と逆のコントラスト値の変化特性をもつ画素のみ用いて、着目画素の合成比率の補正を行うようにするようにしても良い。 Further, it is also possible to consider the characteristics of the change in the contrast value among the pixels determined to be "nearby". For example, the pixel shown in FIG. 7A has a characteristic that the contrast value is maximum at the best focus position and the contrast value decreases when the focus position changes. On the other hand, the edge-blurred pixel has a characteristic that the contrast value is the minimum at the best focus position in FIG. 7 (a) and the contrast value increases when the focus position changes. Therefore, the composition ratio of the pixel of interest may be corrected by using only the pixel having the characteristic of changing the contrast value opposite to that of the pixel of interest.

第1の実施形態によれば、画素のコントラスト値の変化量を計算し、閾値以下の画素の合成比率を変更することによって、エッジボケを低減することができる。 According to the first embodiment, the edge blur can be reduced by calculating the amount of change in the contrast value of the pixels and changing the composition ratio of the pixels below the threshold value.

(第2の実施形態)
第1の実施形態では、着目画素のコントラスト値の変化量が閾値以下である場合に、その着目画素の合成比率を変更したが、第2の実施形態では、着目画素のコントラスト値の変化量が閾値より大きい場合に、その周辺画素の合成比率を変更するものである。以下では、第2の実施形態について、第1の実施形態と異なる所を中心に説明する。なお、第1の実施形態と同様な所は省略する。
(Second Embodiment)
In the first embodiment, when the amount of change in the contrast value of the pixel of interest is equal to or less than the threshold value, the composition ratio of the pixel of interest is changed, but in the second embodiment, the amount of change in the contrast value of the pixel of interest is When it is larger than the threshold value, the composition ratio of the peripheral pixels is changed. Hereinafter, the second embodiment will be described focusing on the points different from those of the first embodiment. The same parts as in the first embodiment will be omitted.

図9は、本実施形態におけるステップS503での合成マップの補正について説明するためのフローチャートである。ステップS901で、制御部101は、未処理の画素から着目画素を選定する。 FIG. 9 is a flowchart for explaining the correction of the composite map in step S503 in the present embodiment. In step S901, the control unit 101 selects the pixel of interest from the unprocessed pixels.

ステップS902で、制御部101は、着目画素のコントラスト値の変化量を算出する。算出の方法は第1の実施形態のステップS602と同様である。 In step S902, the control unit 101 calculates the amount of change in the contrast value of the pixel of interest. The calculation method is the same as in step S602 of the first embodiment.

ステップS903で、制御部101は、ステップS902で算出したコントラスト値の変化量が予め定められた閾値以上であれば、ステップS904に進み、閾値より小さければ、ステップS905に進む。ここでいう「閾値」は、第1の実施形態の合成マップの補正についての説明での「閾値」と異なるものである。 In step S903, the control unit 101 proceeds to step S904 if the amount of change in the contrast value calculated in step S902 is equal to or greater than a predetermined threshold value, and proceeds to step S905 if it is smaller than the threshold value. The "threshold value" referred to here is different from the "threshold value" in the description of the correction of the composite map of the first embodiment.

ステップS904で、制御部101は、着目画素の合成比率を参照し、近傍画素の合成比率を変更する。たとえば、制御部101は、着目画素の近傍の画素のうちコントラスト値の変化量が閾値以下である画素の合成比率を、着目画素と同じ合成比率にする。ここで、その近傍の画素に対して、着目画素よりも近い位置に、コントラスト値の変化量が予め定められた閾値以上となる他の画素が存在するならば、その画素に基づく合成比率を優先するようにしてもよい。また、着目画素の近傍に、コントラスト値の変化量が閾値以下の画素となる画素が無い場合には、この近傍の範囲において合成比率の変更は行わない。ここでいう「近傍」の判断方法は、第1の実施形態のステップS604で説明した方法と同様でよい。 In step S904, the control unit 101 refers to the composition ratio of the pixel of interest and changes the composition ratio of the neighboring pixels. For example, the control unit 101 sets the composition ratio of the pixels in the vicinity of the pixel of interest whose contrast value change amount is equal to or less than the threshold value to the same composition ratio as the pixel of interest. Here, if there is another pixel whose contrast value change amount is equal to or greater than a predetermined threshold value at a position closer to the pixel of interest with respect to a pixel in the vicinity thereof, priority is given to the composition ratio based on that pixel. You may try to do it. Further, if there is no pixel in the vicinity of the pixel of interest whose contrast value change amount is equal to or less than the threshold value, the composition ratio is not changed in the range in the vicinity. The method of determining the "neighborhood" referred to here may be the same as the method described in step S604 of the first embodiment.

ステップS905で、制御部101は、すべての画素を処理したかどうかについて判断する。すべての画素を処理した場合このフローを終了し、まだ処理していない画素があれば、ステップS901に戻る。 In step S905, the control unit 101 determines whether or not all the pixels have been processed. When all the pixels have been processed, this flow ends, and if there are pixels that have not been processed yet, the process returns to step S901.

ステップS903では、着目画素のコントラスト値が閾値以上である場合、ピント位置を変更することでエッジボケが広がる可能性が高く、近傍画素において単純にコントラスト値の最大値で合成比率を決定するとエッジボケした画像を出力する可能性がある。そのため、閾値以上のコントラスト値をもつ画素を検出した場合は、近傍にエッジボケの影響を受けやすいコントラスト値の変化量が小さな画素があれば、その画素の合成比率を着目画素と同じ合成比率に変更するようにする。 In step S903, when the contrast value of the pixel of interest is equal to or greater than the threshold value, there is a high possibility that the edge blur will spread by changing the focus position, and if the composition ratio is simply determined by the maximum value of the contrast value in the neighboring pixels, the edge blurred image will be obtained. May be output. Therefore, when a pixel with a contrast value equal to or higher than the threshold value is detected, if there is a pixel in the vicinity where the amount of change in the contrast value that is easily affected by edge blur is small, the composition ratio of that pixel is changed to the same composition ratio as the pixel of interest. To do.

第2の実施形態によれば、画素のコントラスト値の変化量を計算し、閾値以上の画素の近傍画素の合成比率を変更することによって、エッジボケを低減することができる。 According to the second embodiment, the edge blur can be reduced by calculating the amount of change in the contrast value of the pixels and changing the composition ratio of the neighboring pixels of the pixels above the threshold value.

(その他の実施形態)
以上の実施形態は、デジタルカメラでの実施をもとに説明したが、デジタルカメラに限定するものではない。たとえば、撮像素子が内蔵した携帯機器などで実施してもよく、画像を撮像することができるネットワークカメラなどでもよい。
(Other embodiments)
Although the above embodiments have been described based on the implementation with a digital camera, the above embodiment is not limited to the digital camera. For example, it may be carried out by a portable device having a built-in image sensor, or may be a network camera capable of capturing an image.

なお、本発明は、上述の実施形態の1つ以上の機能を実現するプログラムを、ネットワークまたは記憶媒体を介してシステムまたは装置に供給し、そのシステムまたは装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読み出し作動させる処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 In the present invention, a program that realizes one or more functions of the above-described embodiment is supplied to a system or device via a network or a storage medium, and one or more processors in the computer of the system or device program. It can also be realized by the process of reading and operating. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

100 デジタルカメラ
101 制御部
102 駆動部
103 光学系
104 撮像部
105 ROM
106 RAM
107 画像処理部
108 表示部
109 内蔵メモリ
110 操作部
100 Digital camera 101 Control unit 102 Drive unit 103 Optical system 104 Imaging unit 105 ROM
106 RAM
107 Image processing unit 108 Display unit 109 Built-in memory 110 Operation unit

Claims (16)

画像の複数の領域のそれぞれからコントラスト値を取得する取得手段と、
少なくとも一部の画角が重なり、かつ、ピント位置の異なる複数の画像に対して、領域ごとに前記取得手段が取得した前記コントラスト値に応じた合成比率を設定し、設定した前記合成比率に基づいて前記複数の画像の合成を行って合成画像を生成する合成手段と、を有し、
前記合成手段は、前記複数の画像のそれぞれの第1の領域の前記コントラスト値の変化量が予め定められた第1の閾値以下であり、かつ、前記第1の領域の近傍に、前記複数の画像のそれぞれの領域間の前記コントラスト値の変化量が第2の閾値よりも大きい第2の領域が存在する場合は、前記第1の領域の前記合成比率を、前記第2の領域の前記合成比率と等しく設定することを特徴とする画像処理装置。
An acquisition method for acquiring contrast values from each of a plurality of areas of an image,
For a plurality of images in which at least a part of the angles of view overlap and the focus positions are different, a composition ratio is set for each area according to the contrast value acquired by the acquisition means, and the composition ratio is based on the set composition ratio. It has a compositing means for generating a composite image by compositing the plurality of images.
The combining means, the amount of change in the contrast value between each of the first region of the plurality of images is equal to or less than the first threshold value predetermined and, in the vicinity of the first region, said plurality When there is a second region in which the amount of change in the contrast value between the respective regions of the image is larger than the second threshold value, the composite ratio of the first region is used as the composition ratio of the second region. An image processing device characterized in that it is set to be equal to the composition ratio.
前記合成手段は、前記複数の領域のうちの第1の領域の前記コントラスト値の変化量が予め定められた第1の閾値以下であり、かつ、前記第1の領域の近傍に前記コントラスト値の変化量が第2の閾値よりも大きい領域が存在しない場合は、前記第1の領域の前記合成比率を、前記第1の領域の前記コントラスト値に基づいて設定することを特徴とする請求項1に記載の画像処理装置。 In the synthesis means, the amount of change in the contrast value in the first region of the plurality of regions is equal to or less than a predetermined first threshold value, and the contrast value is located in the vicinity of the first region. Claim 1 is characterized in that when there is no region in which the amount of change is larger than the second threshold value, the synthesis ratio of the first region is set based on the contrast value of the first region. The image processing apparatus according to. 画像の複数の領域のそれぞれからコントラスト値を取得する取得手段と、
少なくとも一部の画角が重なり、かつ、ピント位置の異なる複数の画像に対して、領域ごとに前記取得手段が取得した前記コントラスト値に応じた合成比率を設定し、設定した前記合成比率に基づいて前記複数の画像の合成を行って合成画像を生成する合成手段と、を有し、
前記合成手段は、前記複数の画像のそれぞれの第1の領域の前記コントラスト値の変化量が予め定められた第1の閾値以下であり、かつ、前記第1の領域の近傍に、前記複数の画像のそれぞれの領域間の前記コントラスト値の変化量が第2の閾値よりも大きい第2の領域が存在する場合は、前記第1の領域の前記合成比率を、前記第2の領域の前記コントラスト値に基づいて設定し、前記複数の領域のうちの第1の領域の前記コントラスト値の変化量が予め定められた第1の閾値以下であり、かつ、前記第1の領域の近傍に前記コントラスト値の変化量が第2の閾値よりも大きい領域が存在しない場合は、前記第1の領域の前記合成比率を、前記第1の領域の前記コントラスト値に基づいて設定することを特徴とする画像処理装置。
An acquisition method for acquiring contrast values from each of a plurality of areas of an image,
For a plurality of images in which at least a part of the angles of view overlap and the focus positions are different, a composition ratio is set for each area according to the contrast value acquired by the acquisition means, and the composition ratio is based on the set composition ratio. It has a compositing means for generating a composite image by compositing the plurality of images.
The combining means, the amount of change in the contrast value between each of the first region of the plurality of images is equal to or less than the first threshold value predetermined and, in the vicinity of the first region, said plurality When there is a second region in which the amount of change in the contrast value between the regions of the image is larger than the second threshold value, the composite ratio of the first region is used as the composition ratio of the second region. The contrast value is set based on the contrast value, and the amount of change in the contrast value in the first region of the plurality of regions is equal to or less than a predetermined first threshold value and is located in the vicinity of the first region. When there is no region in which the amount of change in the contrast value is larger than the second threshold value, the synthesis ratio of the first region is set based on the contrast value of the first region. Image processing device.
前記合成手段は、前記複数の領域のうちの第3の領域の前記コントラスト値の変化量が前記第1の閾値より大きい場合は、前記第3の領域の前記合成比率を、前記第3の領域の前記コントラスト値に基づいて設定することを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。 When the amount of change in the contrast value of the third region among the plurality of regions is larger than the first threshold value, the synthesis means sets the synthesis ratio of the third region to the third region. The image processing apparatus according to any one of claims 1 to 3, wherein the image processing apparatus is set based on the contrast value of the above. 前記第2の閾値は、前記第1の閾値と同じ値か、前記第1の閾値より大きい値であることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 4 , wherein the second threshold value is the same value as the first threshold value or a value larger than the first threshold value. 前記領域は1つの画素からなる領域であることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 5 , wherein the region is a region composed of one pixel. 前記領域の前記コントラスト値の変化量は、前記領域に対応する前記複数の画像の領域のコントラスト値の最大値と最小値との差であることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 Any one of claims 1 to 6 , wherein the amount of change in the contrast value in the region is the difference between the maximum value and the minimum value of the contrast value in the plurality of image regions corresponding to the region. The image processing apparatus according to the section. 前記領域に対応する前記複数の画像の領域は、それぞれの前記画像において同じ位置にある領域であることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 7 , wherein the region of the plurality of images corresponding to the region is a region at the same position in each of the images. 前記合成手段は、点広がり関数を用いて前記近傍の範囲を定めることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 8 , wherein the synthesis means defines a range of the vicinity using a point spread function. 前記合成手段は、被写体の距離情報を用いて前記近傍の範囲を定めることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 9 , wherein the synthesizing means defines a range of the vicinity using distance information of a subject. 前記合成手段は、前記コントラスト値の変化特性を用いて前記近傍の範囲を定めることを特徴とする請求項1乃至10のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 10 , wherein the synthesizing means defines a range of the vicinity using the change characteristic of the contrast value. 前記ピント位置は、光軸方向で等間隔に設定されることを特徴とする請求項1乃至11のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 11 , wherein the focus positions are set at equal intervals in the optical axis direction. 画像を撮像する撮像手段を有し、
前記画像の複数の領域のそれぞれからコントラスト値を取得する取得手段と、
少なくとも一部の画角が重なり、かつ、ピント位置の異なる複数の画像に対して、領域ごとに前記取得手段が取得した前記コントラスト値に応じた合成比率を設定し、設定した前記合成比率に基づいて前記複数の画像の合成を行って合成画像を生成する合成手段と、を有し、
前記合成手段は、前記複数の画像のそれぞれの第1の領域の前記コントラスト値の変化量が予め定められた第1の閾値以下であり、かつ、前記第1の領域の近傍に、前記複数の画像のそれぞれの領域間の前記コントラスト値の変化量が第2の閾値よりも大きい第2の領域が存在する場合は、前記第1の領域の前記合成比率を、前記第2の領域の前記合成比率と等しく設定することを特徴とする画像処理装置。
It has an imaging means for capturing an image,
An acquisition means for acquiring a contrast value from each of a plurality of regions of the image, and
For a plurality of images in which at least a part of the angles of view overlap and the focus positions are different, a composition ratio is set for each area according to the contrast value acquired by the acquisition means, and the composition ratio is based on the set composition ratio. It has a compositing means for generating a composite image by compositing the plurality of images.
The combining means, the amount of change in the contrast value between each of the first region of the plurality of images is equal to or less than the first threshold value predetermined and, in the vicinity of the first region, said plurality When there is a second region in which the amount of change in the contrast value between the respective regions of the image is larger than the second threshold value, the composite ratio of the first region is used as the composition ratio of the second region. An image processing device characterized in that it is set to be equal to the composition ratio.
画像の複数の領域のそれぞれからコントラスト値を取得する取得ステップと、
少なくとも一部の画角が重なり、かつ、ピント位置の異なる複数の画像に対して、領域ごとに前記コントラスト値に応じた合成比率を設定し、設定した前記合成比率に基づいて前記複数の画像の合成を行って合成画像を生成する合成ステップと、を有し、
前記合成ステップにおいては、前記複数の画像のそれぞれの第1の領域の前記コントラスト値の変化量が予め定められた第1の閾値以下であり、かつ、前記第1の領域の近傍に、前記複数の画像のそれぞれの領域間の前記コントラスト値の変化量が第2の閾値よりも大きい第2の領域が存在する場合は、前記第1の領域の前記合成比率を、前記第2の領域の前記合成比率と等しく設定することを特徴とする画像処理装置の制御方法。
An acquisition step to acquire contrast values from each of multiple areas of the image,
For a plurality of images in which at least a part of the angles of view overlap and the focus positions are different, a composition ratio is set according to the contrast value for each region, and the composition ratio of the plurality of images is set based on the set composition ratio. It has a compositing step to perform compositing and generate a compositing image,
In the above synthesis step, the is a plurality of first threshold value or less amount of change in the contrast value between each of the first region of the image is predetermined, and, in the vicinity of the first region, the When there is a second region in which the amount of change in the contrast value between the respective regions of the plurality of images is larger than the second threshold value, the composite ratio of the first region is set to that of the second region. A control method for an image processing apparatus, characterized in that the composition ratio is set to be equal to the composition ratio.
画像処理装置のコンピュータに動作させるコンピュータのプログラムであって、
画像の複数の領域のそれぞれからコントラスト値を取得する取得ステップと、
少なくとも一部の画角が重なり、かつ、ピント位置の異なる複数の画像に対して、領域ごとに前記コントラスト値に応じた合成比率を設定し、設定した前記合成比率に基づいて前記複数の画像の合成を行って合成画像を生成する合成ステップと、を行わせ、
前記合成ステップにおいては、前記複数の画像のそれぞれの第1の領域の前記コントラスト値の変化量が予め定められた第1の閾値以下であり、かつ、前記第1の領域の近傍に、前記複数の画像のそれぞれの領域間の前記コントラスト値の変化量が第2の閾値よりも大きい第2の領域が存在する場合は、前記第1の領域の前記合成比率を、前記第2の領域の前記合成比率と等しく設定することを特徴とするプログラム。
A computer program that runs on the computer of an image processing device.
An acquisition step to acquire contrast values from each of multiple areas of the image,
For a plurality of images in which at least a part of the angles of view overlap and the focus positions are different, a composition ratio according to the contrast value is set for each region, and the composition ratio of the plurality of images is set based on the set composition ratio. Perform the compositing step to generate a compositing image by compositing,
In the above synthesis step, the is a plurality of first threshold value or less amount of change in the contrast value between each of the first region of the image is predetermined, and, in the vicinity of the first region, the When there is a second region in which the amount of change in the contrast value between the respective regions of the plurality of images is larger than the second threshold value, the composite ratio of the first region is set to that of the second region. A program characterized in that it is set to be equal to the synthesis ratio.
前記請求項15に記載のプログラムが記録されたコンピュータ読み出し可能な記録媒体。 A computer-readable recording medium on which the program according to claim 15 is recorded.
JP2017164421A 2017-08-29 2017-08-29 Image processing equipment, imaging equipment, control methods for image processing equipment, programs and recording media Active JP6961423B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017164421A JP6961423B2 (en) 2017-08-29 2017-08-29 Image processing equipment, imaging equipment, control methods for image processing equipment, programs and recording media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017164421A JP6961423B2 (en) 2017-08-29 2017-08-29 Image processing equipment, imaging equipment, control methods for image processing equipment, programs and recording media

Publications (3)

Publication Number Publication Date
JP2019047145A JP2019047145A (en) 2019-03-22
JP2019047145A5 JP2019047145A5 (en) 2020-08-06
JP6961423B2 true JP6961423B2 (en) 2021-11-05

Family

ID=65814777

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017164421A Active JP6961423B2 (en) 2017-08-29 2017-08-29 Image processing equipment, imaging equipment, control methods for image processing equipment, programs and recording media

Country Status (1)

Country Link
JP (1) JP6961423B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7409604B2 (en) 2019-12-18 2024-01-09 キヤノン株式会社 Image processing device, imaging device, image processing method, program and recording medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014067142A (en) * 2012-09-25 2014-04-17 Olympus Corp Image processing apparatus, image processing method, imaging apparatus, and imaging method
US9888163B2 (en) * 2013-08-07 2018-02-06 Sharp Kabushiki Kaisha Imaging device

Also Published As

Publication number Publication date
JP2019047145A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
US10917576B2 (en) Dual aperture zoom camera with video support and switching / non-switching dynamic control
JP6838994B2 (en) Imaging device, control method and program of imaging device
JP6800797B2 (en) Image pickup device, image processing device, control method and program of image pickup device
JP6833498B2 (en) Imaging device, imaging method and computer program
JP2018107526A (en) Image processing device, imaging apparatus, image processing method and computer program
JP6786311B2 (en) Image processing equipment, image processing methods, computer programs and storage media
JP6748847B2 (en) Imaging device
JP6961423B2 (en) Image processing equipment, imaging equipment, control methods for image processing equipment, programs and recording media
JP6728020B2 (en) Image processing apparatus, image processing method and program
JP2008053787A (en) Multiple-lens electronic camera and parallax correcting method of multi-lens electronic camera
JP2022083147A (en) Imaging apparatus, imaging method, program, and recording medium
JP2020160773A (en) Image processing device, imaging device, image processing method, and program
JP7458769B2 (en) Image processing device, imaging device, image processing method, program and recording medium
JP7409604B2 (en) Image processing device, imaging device, image processing method, program and recording medium
JP7214368B2 (en) Image processing device, imaging device, image processing method, program and recording medium
JP6828069B2 (en) Imaging equipment, imaging methods and programs
JP7262940B2 (en) IMAGE PROCESSING DEVICE, IMAGING DEVICE, CONTROL METHOD AND PROGRAM FOR IMAGE PROCESSING DEVICE
JP6818734B2 (en) Image processing equipment, imaging equipment, image processing methods and programs
JP6953594B2 (en) Image processing equipment, imaging equipment, image processing methods, programs and recording media
JP6833772B2 (en) Image processing equipment, imaging equipment, image processing methods and programs
JP2024002631A (en) Image processing device, imaging device, image processing method, computer program and recording medium
JP2024036872A (en) Imaging device, imaging method, program and recording medium
JP6827778B2 (en) Image processing equipment, image processing methods and programs
JP2022077591A (en) Image processing apparatus, image processing method, imaging apparatus, program and recording medium
JP2021180366A (en) Imaging apparatus and method for controlling the same, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200622

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200622

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210513

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210525

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210721

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211013

R151 Written notification of patent or utility model registration

Ref document number: 6961423

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151